Making System Rescue CD as PXE-bootable in an existing PXE/NFS environment
This short document explains how I made SystemRescueCD PXE-bootable.
The System Rescue CD documentation concerning the matter is located at http://www.sysresccd.org/Sysresccd-manual-en_PXE_network_booting. The original document is very clear, but this page describes following setting:
The NFS server was preferred as it works with low-memory clients. The server used is Debian lenny.
- there is an existing DHCP server (no need to start a workstation with System Rescue CD to act as a DHCP server)
- there is an existing NFS server (no need to start a workstation with System Rescue CD to act as a NFS server)
- there is an existing TFTP server (no need to start a workstation with System Rescue CD to act as a TFTP server)
1) Get the server stuff out of System Rescue CD
There may be an elegant way to do (by mounting the images directly) this but I preferred the straightforward way.
2) Edit the existing PXE boot menu
- Prepare a SysRescCD boot media
- Boot a workstation with the media
- Copy all files and folder from /tftpboot to your server to a new
directory in your tftp root directory. In lenny the path is
/opt/tftpboot so we want the stuff to /opt/tftpboot/sysresccd. Example:
- On SysResc Workstation:
scp -r /tftpboot normaluser@mytftpserver:.
- On Server, as root:
mv ~normaluser/tftpboot/* sysresccd/
chown -R root.root sysresccd/
In my case I had a working PXE environment so I just had to make the
copied System Rescue CD kernel and initrd bootable. I already had an
existing PXE image for installing Ubuntu 10.04 in the
/opt/tftpboot/ubuntu-installer. I wanted a menu for selecting the
SysRescCD or Ubuntu image.
This is a file which I placed to /opt/tftpboot/pxelinux.cfg/default:
MENU DEFAULT sysreccd
MENU TITLE PXE harkko
MENU LABEL Ubuntu boot disk
MENU LABEL System Rescue CD
I had difficulties in writing the settings file and it turned out that
my existing pxelinux.0 (/opt/tftpboot/pxelinux.0, the file that is
referred by the DHCP server) was outdated. When I replaced my copy with
the /opt/tftpboot/sysresccd/pxelinux.0 everything worked much better.
The configuration above is far from elegant since I didn't have the
interested to make all the MENU settings needed for a neat menu to the
screen. Title "PXE harkko" refers to my PXE/TFTP server.
3) NFS export
Since my internal network is 192.168.0.*, I added following row to the /etc/exports
After this is restarted the NFS server (as root):
4) System Rescue CD boot parameters
The final step is to edit System Rescue CD boot parameters found in the
SysRescCD boot menu /opt/tftpboot/sysresccd/pxelinux.cfg/default.
Since the location of the kernels and initrd is changed from the TFTP
root to sysresccd directory, you have to update the paths to all
referring occurences. Find/replace with following strings:
You also have to replace the default disk image location with your NFS export:
- "LINUX rescue" -> "LINUX sysresccd/rescue"
- "LINUX altker" -> "LINUX sysresccd/altker"
- "INITRD initram" -> "INITD sysresccd/initram"
The "netboot=http://192.168.1.5/sysrcd.dat" is the default string (your
mileage may vary) and the new value is build from two values.
"192.168.0.1" is the IP of my NFS server and the
"/opt/tftpboot/sysresccd" is the path exported in phase 3.
- "netboot=http://192.168.1.5/sysrcd.dat" -> "nfsboot=192.168.0.1:/opt/tftpboot/sysresccd"
Now you're done. In case you want to add more PXE-bootable images
later, just place their stuff under /opt/tftpboot and create new LABEL
to /opt/tftpboot/pxeboot.cfg/default that refers the main menu of the
Updated 3-SEP-2010 / Matti Lattu