The PXE environment allows you to boot a computer with SystemRescueCd even if this computer has no CDRom drive or USB socket. It allows you to boot SystemRescueCd from the network, and then it is faster to troubleshoot computers on your network once a PXE-boot-server is installed. It is also useful if you want to boot a computer that has no optical drive (CD or DVD) or to troubleshoot a remote computer to which you have no physical access to insert the disc.
The PXE boot server is made of three stages:
These three parts can be installed either on a single machine or on several computers.
You 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:
pxelinux) and the text files displayed on the screen by
sysresccd.img) to the client
ip=dhcpkernel boot parameters. Indeed the kernel does not know the IP address used by the computer at the pxelinux stage.
airootfs.sfsfile. If you use HTTP or TFTP for the third stage, then
airootfs.sfswill be downloaded into RAM so the client has to have enough memory (estimated requirement: 1GB). If you use either NFS or NBD then you don’t have this memory requirement and the client will make permanent requests to the server each time it needs a file from the root filesystem.
airootfs.sfsand it can now complete the boot process.
The 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 (vmlinuz), initramfs (sysresccd.img). The boot loader is
pxelinux.0 and it comes with a configuration file which
is sent to the client. This configuration file contains the boot command line
which will be used by the client to start the linux kernel. This command line is
important since it contains the SystemRescueCd boot options that are required to
run the third stage. The boot command line can be used to specify the network
settings and the method that the PXE client will use in the third stage of the
PXE boot process. Here are two examples of valid command lines for PXE boot:
SystemRescueCd-6.x is based on ArchLinux hence it supports PXE boot options implemented by the upstream. These boot options provide support for various protocols (HTTP, NFS, NBD) and are documented on the following page: https://git.archlinux.org/archiso.git/tree/docs
Here is an example of a PXE configuration which allows to boot SystemRescueCd using TFTP and HTTP only. It is one of the simplest PXE configuration you can have hence it is recommended to follow this example if you want a simple PXE configuration for SystemRescueCd.
In this example the boot loader is
pxelinux.0 and TFTP is used to
get the kernel image and initramfs images. It then uses an HTTP server to
download the large squashfs filesystem
When you configure the TFTP server you have to copy the boot loader (pxelinux
binary files), a pxelinux configuration file in
pxelinux.cfg/default, and you
need to copy the
sysresccd directory as it is (even though not all files are
required by the TFTP server) from the ISO image to provide files that will be
requested via TFTP.
Here is the list of all required files and their location on the TFTP server:
./sysresccd/boot/x86_64/vmlinuz ./sysresccd/boot/x86_64/sysresccd.img ./sysresccd/boot/memtest.COPYING ./sysresccd/boot/memtest ./sysresccd/boot/intel_ucode.LICENSE ./sysresccd/boot/intel_ucode.img ./sysresccd/boot/amd_ucode.LICENSE ./sysresccd/boot/amd_ucode.img ./sysresccd/VERSION ./sysresccd/pkglist.x86_64.txt ./pxelinux.cfg/default ./ldlinux.c32 ./pxelinux.0
And here is the example of a configuration located in
DEFAULT sysresccd LABEL sysresccd LINUX sysresccd/boot/x86_64/vmlinuz INITRD sysresccd/boot/intel_ucode.img,sysresccd/boot/amd_ucode.img,sysresccd/boot/x86_64/sysresccd.img APPEND archisobasedir=sysresccd archiso_http_srv=http://10.0.2.4/ checksum SYSAPPEND 1
You need to update the IP address of the HTTP server from which the squashfs image will be downloaded. In this example it will download this file and its checksum from the following URLs:
Make sure you are able to successfully download these files from a regular web
client before you try to boot from PXE. You can customize the boot command line
by adding options such as
setkmap=us after the