http://www.sysresccd.org/Sysresccd-manual-en_PXE_network_bootingAboutThe PXE environment allows you to boot a computer with SystemRescueCd even if this computer has no CDRom driver or USB socket. It allows to boot SystemRescueCd from the network, and then it's faster to troubleshoot computers of your network once a PXE-boot-server is installed. It's also useful if you want to boot a computer that has no optical drive (CD or DVD) or to troubleshoot a remote computer on which you have no physical access to insert the disc. For the moment, SystemRescueCd supports only PXE booting on the x86 architecture (all PC computers: i386 and amd64). Requirements
How the PXE boot process worksThe PXE boot serverThe PXE boot server is made of three stages:
These three parts can be installed either on a single machine or on
several computers. SystemRescueCd provides a full PXE-boot-server out
of the box that you can run on a single computer. The The PXE boot processYou may need to understand what happens when you boot SystemRescueCd from the network. You will need this knowledge for troubleshooting in case of problems. Here are the most important steps of the PXE boot process:
The pxebootsrv serviceIn SystemRescueCd the PXE server setup is done with a single service
named The Setup the PXE-boot-server on a typical configurationAboutThis sections explains how to setup a SystemRescueCd PXE boot server with all the services running on a single machine. It means the DHCP server and the TFTP server and the HTTP server are running on the single machine of your network. If you want to run these services on separate computers please read the next section. OverviewYou just have to start a SystemRescueCd from the CD/USB/HDD and configure it to act as a PXE boot server on your local network. HTTP will be used for the third stage. The configuration is very simple, you just have to write your settings in a config file and start the pxebootsrv service and that's it. You can then boot other computer from the network with PXE. Steps to configure PXE on the server
Here is a copy of a typical
# ------------------------ CONFIGURATION ------------------------------- # By default the current systems acts as DHCP and TFTP and HTTP server # If you want another machine of you network to act as one of those # you will have to turn the appropriate option yo "no" # Set to "yes" if you want this machine to act as a DHCP server PXEBOOTSRV_DODHCPD="yes" # Set to "yes" if you want this machine to act as a TFTP server PXEBOOTSRV_DOTFTPD="yes" # Set to "yes" if you want this machine to act as an HTTP server PXEBOOTSRV_DOHTTPD="yes" # Here is a typical PXE-Boot configuration --> update with your settings PXEBOOTSRV_SUBNET="192.168.1.0" PXEBOOTSRV_NETMASK="255.255.255.0" PXEBOOTSRV_DEFROUTE="192.168.1.254" PXEBOOTSRV_DNS="192.168.1.254" PXEBOOTSRV_DHCPRANGE="192.168.1.100 192.168.1.150" PXEBOOTSRV_LOCALIP="192.168.1.5" # Keep these values to $PXEBOOTSRV_LOCALIP if the current computer # acts as TFTP server and HTTP server as well as DHCP server PXEBOOTSRV_TFTPSERVER="$PXEBOOTSRV_LOCALIP" # IP address of the TFTP server PXEBOOTSRV_HTTPSERVER="http://$PXEBOOTSRV_LOCALIP/sysrcd.dat" # download URL Setup the PXE-boot-server on a custom configurationAboutIn this section you will learn how to install a PXE-boot environment with the three services (DHCP, TFTP, HTTP/TFTP/NFSv4/NBD) running on different machines. Make sure you understand how to PXE boot process works before you install the PXE boot server with a configuration different from the typical case. Customization of the pxebootsrv serviceYou may configure the pxebootsrv service to act only as the
requirements you have. For example if you already have a DHCP server
running on your network you may not work to install another DHCP again.
In that case you can configure SystemRescueCd pxebootsrv to act only as
TFTP/HTTP servers. You just have to turn off the
# ------------------------ CONFIGURATION ------------------------------- # By default the current systems acts as DHCP and TFTP and HTTP server # If you want another machine of you network to act as one of those # you will have to turn the appropriate option yo "no" # Set to "yes" if you want this machine to act as a DHCP server PXEBOOTSRV_DODHCPD="no" # Set to "yes" if you want this machine to act as a TFTP server PXEBOOTSRV_DOTFTPD="yes" # Set to "yes" if you want this machine to act as an HTTP server PXEBOOTSRV_DOHTTPD="yes" If you use another DHCP server, you will have to update the
next-server 192.168.1.5; # IP addr of the TFTP server Here is an example of a typical subnet configuration that you can
add to the end of your subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.200 192.168.1.210; range dynamic-bootp 192.168.1.211 192.168.1.220; next-server 192.168.1.5; filename "pxelinux.0"; } Customization of the boot command lineThe PXE server is made of several services. In the second stage, the
server uses TFTP to send multiple things to the client: boot loader
(pxelinux.0), kernel image (rescuecd/rescue64/altkerxx), initramfs
(initram.igz). The boot loader is In the first example the client will use a static IP address
(192.168.157.100) and it will connect to an HTTP server to download label mybootentry1 kernel rescuecd append initrd=initram.igz ethx=192.168.157.100 netboot=http://192.168.157.1:8080/sysrcd.dat Here is another example where the client runs a 64bit kernel. It uses a dynamic IP address and connects to an NBD server (192.168.157.1:2000) in the third stage: label mybootentry2 kernel rescue64 append initrd=initram.igz dodhcp netboot=nbd://192.168.157.1:2000 Steps to boot the client with PXE
Alternative methods: boot from NFS or NBDIn the previous sections, the client uses an HTTP/TFTP server to download the root filesystem (which is stored in sysrcd.dat)· This file is stored in memory on the client machine, and then it can only work is the client computer has enough memory (512 MB or more in general). In SystemRescueCd-1.4.0 (and more recent) you can use either NFS (Network File System) or NBD (Network Block Device) as a replacement of HTTP/TFTP. You will still need DHCP and TFTP for the early stages anyway. NFS or NBD are only used to retrieve the root filesystem. In other words these alternatives are used for steps 9, 10, 11 in the PXE boot process described in the previous sections, and steps 1 to 8 are still based on DHCP/TFTP. NFS is more popular than NBD but NBD is much easier to configure since it only uses a single TCP port to work. In both cases the root filesystem will be mounted through the network. It means the client will have to be connected until you shut it down. If the connection breaks then it will stop working. Here are the two boot options introduced in SystemRescueCd-1.4.0:
About NBDNBD (Network Block Device) provides a standard
block device (called In SystemRescueCd, NBD is used to mounted the loopback root
filesystem which is stored in Here is an example NBD server configuration file that you can use: # /etc/nbd-server/config [generic] user = nbd group = nbd listenaddr = 192.168.1.1 [partimage] exportname = /mnt/cdrom/sysrcd.dat port = 2000 And here is an NBD server command: nbd-server 2000 /mnt/cdrom/sysrcd.dat About NFSTo configure an NFS v3 server, you have to install the appropriate
packages on your favourite linux distribution, and then you can add
such an entry in the /tftpboot *(ro,no_subtree_check,all_squash,insecure,anonuid=1000,anongid=1000) NFS require multiple ports to work so it may be complicated if you have a firewall between the NFS server and the SystemRescueCd client. Also you have to check that the # ls -lh /tftpboot/sysrcd.* -rw-r--r-- 1 root root 198M 2010-02-21 21:06 /tftpboot/sysrcd.dat -rw-r--r-- 1 root root 45 2010-02-21 21:06 /tftpboot/sysrcd.md5 Here is an example of boot command for the client: setkmap=uk ethx=192.168.52.2 nfsboot=192.168.52.1:/tftpboot gw=192.168.52.1 -- Subscription settings: http://groups.google.com/group/linuxkernelnewbies/subscribe?hl=en |