Howto: Set up SliTaz 4.0 to PXE serve the Live CD
These are steps to let PXE clients boot SliTaz 4.0, with the same menus and 4-in-1 options as the Live CD.
We will copy the files from the Live CD or ISO image file, place them in the /boot directory on the server, then start the PXE services. The server is running SliTaz 4.0 stable. (Haven't tried this yet with other versions.)
1. On the server, create a temporary directory.
# cd /home/tux
# mkdir tempdir
2. As root, mount the Live CD (step 2a) or the ISO image (step 2b), and copy the files to the tempdir. (See Hacking SliTaz LiveCD.)
2a. Put the Live CD in the CD drive, and do the following:
# mount -t iso9660 /dev/cdrom /media/cdrom
# cp -a /media/cdrom/* tempdir
2b. Download the ISO image file (and check the md5 if desired):
# wget http://mirror.slitaz.org/iso/4.0/slitaz-4.0.iso
# wget http://mirror.slitaz.org/iso/4.0/slitaz-4.0.md5
# openssl dgst -md5 slitaz-4.0.iso
# cat slitaz-4.0.md5
Then do the following:
# mkdir /tmp/loop
# mount -o loop slitaz-4.0.iso /tmp/loop
# cp -a /tmp/loop/* tempdir
# umount /tmp/loop
3. Create the /boot directory and the /boot/pxelinux.cfg directory.
# mkdir /boot
# mkdir /boot/pxelinux.cfg
4. Move the file 'isolinux.cfg' from the tempdir to the pxelinux.cfg directory, and change the name to 'default'.
Note: 'default' means this config file will be used for all PXE clients. See the pxelinux documentation for other options.
# mv tempdir/boot/isolinux/isolinux.cfg /boot/pxelinux.cfg/default
5. Move the rest of the files in tempdir/boot/isolinux to the /boot directory.
# mv tempdir/boot/isolinux/* /boot
6. Move the rest of the files and folders in tempdir to the /boot directory.
# mv tempdir/* /boot
7. Remove the temporary directory (now empty).
# rmdir tempdir
8. The pxelinux binary is stored compressed in /usr/share/boot/pxelinux.0.lzma. Uncompress it and put it in the /boot directory.
Note: this file can also be downloaded from syslinux.org, in the syslinux 4.05 package (version number matching other files on the LiveCD).
# lzma d /usr/share/boot/pxelinux.0.lzma /boot/pxelinux.0
9. Use a text editor (such as LeafPad or vi) to edit the file /boot/pxelinux.cfg/default. Change line 32 from
kernel /boot/isolinux/ifmem.c32
to
kernel ifmem.32
10. Also edit the file /boot/common.cfg. Change line 89 from
kernel /boot/isolinux/ifmem.c32
to
kernel ifmem.32
11. Follow the steps at PXE Server Set-Up, under "Quick start with the Live CD", to configure a static IP address, start the TFTP server, update the DHCP server configuration, and start the DHCP server.
Note that the boot_file setting should be "/pxelinux.0", including the leading "/". (This is needed for pxelinux to find the config and menu files on the TFTP server. See the pxelinux documentation.)
The boot_file setting is not "/boot/pxelinux.0". See this discussion.
12. Optionally, test the TFTP server with the following commands:
# cd /home/tux
# tftp -r /pxelinux.0 -g localhost
and make sure the file pxelinux.0 is downloaded into /home/tux.
13. Follow the instructions at PXE Client Set-Up, and now you are ready to test booting the PXE clients into SliTaz 4.0 over the network!
Regards,
edux
P.S. The file /boot/md5sum also needs to be updated, to reflect files moved, renamed, or edited, for the "Check Media" command in the boot menu to work properly.