- Booting linux from network
- PXE Boot from network (DHCP, TFTP, NFS, Samba, FTP, HTTP) — Linux server
- 1. Setup
- 1.1. Extract the Plop Linux files
- 1.2. Setup the DHCP server
- 1.3. Setup the TFTP server
- 2. NFS
- 2.1. Boot with NFS
- 2.2. Boot ISO over NFS
- 3. Samba network share
- 3.1. Boot with Samba network share
- 3.2. Boot ISO over Samba
- 4. TFTP
- 4.1. Boot only with TFTP
- 4.2. Boot ISO over TFTP
- 5. FTP
- 5.1. Boot with FTP
- 5.2. Boot ISO over FTP
- 6. HTTP
- 6.1. Boot with HTTP
- 6.2. Boot ISO over HTTP
- 7. Boot problems
Booting linux from network
This is a very old way to operate but it used to be the only one available for a long time. Usually you won’t need to boot from network, except in some very specific cases ( e.g. unsupported I/O devices). That’s why it is detailed here.
When this is done, restart inetd with═: /etc/init.d/inetd restart . You can also issue a killall -HUP inetd .
According to man 5 dhcpd.conf , edit the /etc/dhcpd.conf file to contain something like═:
[hostname] is the name of the PA-RISC system.
[mac address] is the colon-delimited ethernet address of the PA-RISC system, which can be obtained by typing lanaddress at the ‘ BOOT_ADMIN> ‘ prompt (see Section 3.1.2.3 ).
[ip address] is the IP address you wish to assign to the PA-RISC system.
[boot filename] is the name of the bootable kernel image you want to boot your system with.
[root path] is the path to the NFS root filesystem exported by the server.
You’ll end up with something like this for each box you want to netboot ═:
When this is done, restart inetd with═: /etc/init.d/inetd restart . You can also issue a killall -HUP inetd .
According to man 5 bootptab , edit the /etc/bootptab file to contain═:
[hostname] is the name of the PA-RISC system.
[mac address] is the NOT-delimited ethernet address of the PA-RISC system, which can be obtained by typing lanaddress at the ‘ BOOT_ADMIN> ‘ prompt (see Section 3.1.2.3 ).
[ip address] is the IP address you wish to assign to the PA-RISC system.
[boot filename] is the name of the bootable kernel image you want to boot your system with.
[root path] is the path to the NFS root filesystem exported by the server.
You’ll end up with something like this═:
vodka:hd=/tftpboot:\ :rp=/usr/src/parisc/:\ :ht=ethernet:\ :ha=080069088717:\ :ip=140.244.9.208:\ :bf=lifimage:\ :sm=255.255.255.0:\ :to=7200:
To conclude with the developers’ way to boot the kernel, this section will tell you how to actually boot your system from a network server. But it tends to be less and less used. Most users will prefer to stick to Section 5.2 .
Here we are. These are just some tips to get the boot for those who tried the network way. We assume that you’ve done everything outlined above, your development PC is hooked up to your PA-RISC machine via a serial line, you’ve got a bootable PA/Linux kernel lifimage on your boot server, and you’re willing to give it a try. If everything is ready, as well as you, the following procedure will introduce you to the joy of network booting your PA box into Linux.
Make sure your development box is properly connected to your PA-RISC machine with a serial cable. Sounds obvious, but check anyway.
Start minicom on your development box.
Fire up your PA-RISC system.
Watch your minicom console. When the following message appears during the PA-RISC machine’s boot process, press and hold the Esc key═:
1. Setup |
1.1. Extract the Plop Linux files |
1.2. Setup the DHCP server |
1.3. Setup the TFTP server |
2. NFS |
2.1. Boot with NFS |
2.2. Boot ISO over NFS |
3. Samba network share |
3.1. Boot with Samba network share |
3.2. Boot ISO over Samba network share |
4. TFTP |
4.1. Boot only with TFTP |
4.2. Boot ISO over TFTP |
5. FTP |
5.1. Boot with FTP |
5.2. Boot ISO over FTP |
6. HTTP |
6.1. Boot with HTTP |
6.2. Boot ISO over HTTP |
7. Boot problems |
1. Setup
1.1. Extract the Plop Linux files
Extract the file ploplinux-pxeboot.tar.gz to your root directory.
tar xfz ploplinux-pxeboot.tar.gz -C /
Now you have the basic directory structure and files in ‘ /tftpboot ‘.
tar xfz ploplinux-21.3.tgz -C /tmp
Move the files to ‘ /tftpboot/ploplinux-netboot/ ‘.
mv /tmp/ploplinux-21.3/* /tftpboot/ploplinux-netboot/
Now you should have the following directories and files
1.2. Setup the DHCP server
You need the DHCP server software. If your distribution has none then you can use dhcp-4.4.2.tar.gz (or search for the latest on the net) and compile it.
This is the example DHCP server configuration.
The very important line is ‘ filename «/ploplinux-netboot/pxelinux.0»; ‘.
To start the DHCP server simply run ‘ dhcpd ‘.
Note: For testing you can run ‘ dhcpd -f ‘ to run dhcpd in the foreground and get some debug output.
Note: Change the ‘ next-server ‘ IP to set another TFTP server IP.
1.3. Setup the TFTP server
Download the latest TFTP server from ftp://www.kernel.org/pub/software/network/tftp/ and install it with ‘ ./configure —prefix=/usr && make && make install ‘.
To start the TFTP server we use Xinetd.
Here is the base Xinetd config file
And the configuration for the tftp server.
The important line is ‘ server_args = -s /tftpboot ‘ for the tftp root directory.
To start Xinetd simply run ‘ xinetd ‘.
Note: For testing you can run ‘ xinetd -d ‘ to run Xinetd in the foreground and get some debug output.
2. NFS
2.1. Boot with NFS
Requirements are the DHCP and TFTP Server (Setup).
Basic configs for your NFS server, without security aspects:
Example: nfsmount=10.0.0.1:/tftpboot/ploplinux-netboot
Example: nfsmount=10.0.0.1:/tftpboot/ploplinux-netboot|rsize=2048,wsize=2048,nolock,vers=2,hard,intr
If the DHCP, Xinetd and NFS server are running correct you should be able to boot Plop Linux via network.
2.2. Boot ISO over NFS
You need the ISO ploplinux-21.3-x86_64.iso, the directory structure and files of ploplinux-pxeboot.tar.gz and the ‘ syslinux ‘ directory of ploplinux-21.3-x86_64.tar.gz. The DHCP and TFTP Server must work.
Basic configs for your NFS server, without security aspects:
Create a symlink ‘ ln -s ploplinux-21.3-x86_64.iso ploplinux.iso ‘.
Parameter: nfsmount=NFSSHARE|ADDITIONALPARAMS iso_filename=ISOFILE
On the server: /tftpboot/ploplinux-netboot/ploplinux.iso
Example: nfsmount=10.0.0.1:/tftpboot/ploplinux-netboot iso_filename=ploplinux.iso
Example: nfsmount=10.0.0.1:/tftpboot/ploplinux-netboot|rsize=2048,wsize=2048,nolock,vers=2,hard,intr iso_filename=ploplinux.iso
nfs-iso.conf is loaded by /tftpboot/ploplinux-netboot/pxelinux.cfg/default
Remove the ‘ # ‘ in the line with ‘ #include pxelinux.cfg/nfs-iso.conf ‘ to enable the loading of nfs-iso.conf .
3. Samba network share
3.1. Boot with Samba network share
Requirements are the DHCP and TFTP Server (Setup).
Basic configs for your Samba server, without security aspects:
Create the share ‘ ploplinux-netboot ‘.
File name: /etc/samba/smb.conf
SMBUSER : user to access the share. If the share permits access to all users then use «» for SMBUSER
SMBPASSWORD : password of the user to access the share. For an empty password use «»
Example: smbmount=//10.0.0.1/ploplinux-netboot:myuser:mypass
Example: smbmount=//10.0.0.1/ploplinux-netboot:myuser2:»»
smb.conf is loaded by /tftpboot/ploplinux-netboot/pxelinux.cfg/default
Remove the ‘ # ‘ in the line with ‘ #include pxelinux.cfg/smb.conf ‘ to enable the loading of smb.conf .
When the DHCP, Xinetd and Samba server are running correct you should be able to boot Plop Linux via network.
3.2. Boot ISO over Samba
You need the ISO ploplinux-21.3-x86_64.iso, the directory structure and files of ploplinux-pxeboot.tar.gz and the ‘ syslinux ‘ directory of ploplinux-21.3-x86_64.tar.gz. The DHCP and TFTP Server must work.
Basic configs for your Samba server, without security aspects:
Create the share ‘ ploplinux-netboot ‘.
File name: /etc/samba/smb.conf
Create there a symlink ‘ ln -s ploplinux-21.3-x86_64.iso ploplinux.iso ‘.
Parameter: smbmount=//SERVER/SHARE:SMBUSER:SMBPASSWORD iso_filename=ISOFILE
SMBUSER : user to access the share. If the share permits access to all users then use «» for SMBUSER
SMBPASSWORD : password of the user to access the share. For an empty password use «»
ISOFILE : ploplinux.iso (relative to the share)
On the server: /tftpboot/ploplinux-netboot/ploplinux.iso
Example: smbmount=//10.0.0.1/ploplinux-netboot:myuser:mypass iso_filename=ploplinux.iso
Example: smbmount=//10.0.0.1/ploplinux-netboot:myuser2:»» iso_filename=ploplinux.iso
smb-iso.conf is loaded by /tftpboot/ploplinux-netboot/pxelinux.cfg/default
Remove the ‘ # ‘ in the line with ‘ #include pxelinux.cfg/smb-iso.conf ‘ to enable the loading of smb-iso.conf .
4. TFTP
4.1. Boot only with TFTP
Requirements are the DHCP and TFTP Server (Setup).
Create the file ‘ /tftpboot/ploplinux-netboot/tftpfilelist ‘ for TFTP boot that lists all Plop Linux files.
cd /tftpboot
find ploplinux-netboot > ploplinux-netboot/tftpfilelist
Parameter: tftpboot=SERVER|FILELIST dir=PLOPLINUXDIRECTORY
Example: tftpboot=10.0.0.1|ploplinux-netboot/tftpfilelist dir=/ploplinux-netboot/ploplinux
tftp.conf is loaded by /tftpboot/ploplinux-netboot/pxelinux.cfg/default
Remove the ‘ # ‘ in the line with ‘ #include pxelinux.cfg/tftp.conf ‘ to enable the loading of tftp.conf .
4.2. Boot ISO over TFTP
You need the ISO ploplinux-21.3-x86_64.iso, the directory structure and files of ploplinux-pxeboot.tar.gz and the ‘ syslinux ‘ directory of ploplinux-21.3-x86_64.tar.gz. The DHCP and TFTP Server must work.
Create the file ‘ /tftpboot/ploplinux-netboot/tftpfilelist-iso ‘ for TFTP boot with the Plop Linux ISO file name.
cd /tftpboot/ploplinux-netboot
echo ploplinux-netboot/ploplinux.iso > tftpfilelist-iso
Create a symlink ‘ ln -s ploplinux-21.3-x86_64.iso ploplinux.iso ‘.
Parameter: tftpboot=SERVER|FILELIST iso_filename=ISOFILE
Example: tftpboot=10.0.0.1|ploplinux-netboot/tftpfilelist-iso iso_filename=ploplinux-netboot/ploplinux.iso
tftp-iso.conf is loaded by /tftpboot/ploplinux-netboot/pxelinux.cfg/default
Remove the ‘ # ‘ in the line with ‘ #include pxelinux.cfg/tftp-iso.conf ‘ to enable the loading of tftp-iso.conf .
5. FTP
5.1. Boot with FTP
Requirements are the DHCP and TFTP Server (Setup) and a FTP Server.
The FTP root directory is in this example ‘ /tftpboot/ ‘.
Create the file ‘ /tftpboot/ploplinux-netboot/filelist ‘ for FTP boot that lists all Plop Linux files.
cd /tftpboot/ploplinux-netboot
find > ftpfilelist
ftp.conf is loaded by /tftpboot/ploplinux-netboot/pxelinux.cfg/default
Remove the ‘ # ‘ in the line with ‘ #include pxelinux.cfg/ftp.conf ‘ to enable the loading of ftp.conf .
5.2. Boot ISO over FTP
You need the ISO ploplinux-21.3-x86_64.iso, the directory structure and files of ploplinux-pxeboot.tar.gz and the ‘ syslinux ‘ directory of ploplinux-21.3-x86_64.tar.gz. The DHCP and TFTP Server must work. A FTP Server must be available.
The FTP root directory is in this example ‘ /tftpboot/ ‘.
Create the file ‘ /tftpboot/ploplinux-netboot/ftpfilelist-iso ‘ for FTP boot with the Plop Linux ISO file name.
cd /tftpboot/ploplinux-netboot
echo ploplinux.iso > ftpfilelist-iso
Create a symlink ‘ ln -s ploplinux-21.3-x86_64.iso ploplinux.iso ‘.
Parameter: url=ftp://FTPUSER:FTPPASSWORD@FTPSERVER/FTPDIRECTORY|FILELIST iso_filename=ISOFILE
Example: url=ftp://myuser:mypass@10.0.0.1/ploplinux-netboot|/ftpfilelist-iso iso_filename=ploplinux.iso
ftp-iso.conf is loaded by /tftpboot/ploplinux-netboot/pxelinux.cfg/default
Remove the ‘ # ‘ in the line with ‘ #include pxelinux.cfg/ftp-iso.conf ‘ to enable the loading of ftp-iso.conf .
6. HTTP
6.1. Boot with HTTP
Requirements are the DHCP and TFTP Server (Setup) and a WEB Server.
The Virtual Host root directory is in this example ‘ /tftpboot/ ‘.
Create the file ‘ /tftpboot/ploplinux-netboot/filelist ‘ for HTTP boot that lists all Plop Linux files.
cd /tftpboot/ploplinux-netboot
find > webfilelist
Example: url=http://www.ploplinux.com/ploplinux-netboot|/webfilelist
Example: url=http://myuser:mypass@www.ploplinux.com/ploplinux-netboot|/webfilelist
http.conf is loaded by /tftpboot/ploplinux-netboot/pxelinux.cfg/default
Remove the ‘ # ‘ in the line with ‘ #include pxelinux.cfg/http.conf ‘ to enable the loading of http.conf .
6.2. Boot ISO over HTTP
You need the ISO ploplinux-21.3-x86_64.iso, the directory structure and files of ploplinux-pxeboot.tar.gz and the ‘ syslinux ‘ directory of ploplinux-21.3-x86_64.tar.gz. The DHCP and TFTP Server must work. A WEB Server must be available.
The Virtual Host root directory is in this example ‘ /tftpboot/ ‘.
Create the file ‘ /tftpboot/ploplinux-netboot/webfilelist-iso ‘ for HTTP boot with the Plop Linux ISO file name.
cd /tftpboot/ploplinux-netboot
echo ploplinux.iso > webfilelist-iso
Create a symlink ‘ ln -s ploplinux-21.3-x86_64.iso ploplinux.iso ‘.
Parameter: url=http://USER:PASS@WEBSERVER/WEBDIRECTORY|FILELIST iso_filename=ISOFILE
Example: url=http://www.ploplinux.com/ploplinux-netboot|/webfilelist-iso iso_filename=ploplinux.iso
Example: url=http://myuser:mypass@www.ploplinux.com/ploplinux-netboot|/webfilelist-iso iso_filename=ploplinux.iso
http-iso.conf is loaded by /tftpboot/ploplinux-netboot/pxelinux.cfg/default
Remove the ‘ # ‘ in the line with ‘ #include pxelinux.cfg/http-iso.conf ‘ to enable the loading of http-iso.conf .
7. Boot problems
Maybe there is somewhere a wrong path. When you are in the boot menu, then press at the entry that you want to boot the tabulator key. Then add at the end of the line ‘ debug ‘. You will see more info’s during booting.
>
PXE Boot from network (DHCP, TFTP, Network share, FTP, HTTP) — Windows server
Источник