Joined: 25 Aug 2003
Location: New Zealand
|Posted: Wed Jun 15, 2005 5:02 am Post subject: PXE Booting 2005.0 CD
|I thought I'd post up some quick and dirty instructions on roughly how to PXE boot a 2005.0 cd.
The best way would be to customise you own using the instructions here:
But that can be time consuming, and someone else has already trimmed most of what is required into the livecd. So here goes, this is more a braindump of the steps involved but should be enough to point you in the right direction.
Patched 2.6.xx kernel (gentoo-sources)
Working pxelinux PXE server (with tft & dhcp)
squashfs, loopback support enabled in build host kernel.
squashfs-tools on build host
gentoo-sources kernel (this has squashfs kernel patches)
Download and mount the live minimal cd iso as a loopback device, copy the livecd.squashfs image from it and mount it.
Then create a ramdisk image large enough to copy all the contents of the livecd.squashfs image to it.
The example below creates a large ramdisk image and wont boot on a machine with less than 256MB. If you require a smaller image remove unused files from the squashfs directory prior to copying. EG locale-archive and python use approx 60MB alone. I know a disk image using count=85203 definitely boots with 128MB
mkdir /mnt/iso /mnt/initrd /mnt/squash
mount -o loop install-x86-minimal-2005.0.iso /mnt/iso
cp /mnt/iso/livecd.squashfs .
mount -o loop livecd.squashfs /mnt/squash
cp -a /mnt/squash/* squash/
dd if=/dev/zero of=initrd bs=1024 count=165000
mount -o loop initrd /mnt/initrd
cp -a squash/* /mnt/initrd/
cp initrd initrd2
This leaves you with a initrd2.gz image which can be placed in the pxelinux boot directory
The pxe boot kernel requires the following options, along with all the relevant network and disk drivers you require statically compiled in.
Device Drivers --->
Block devices --->
[*] Loopback device support
[*] Network block device support
[*] RAM disk support
[*] Initial RAM disk (initrd) support
Networking support --->
Networking options --->
[*] IP: kernel level autoconfiguration
[*] IP: DHCP support
[*] IP: BOOTP support
Graphics support --->
[*] VESA VGA graphics support
VESA driver type (vesafb)
[*] Support for the framebuffer splash
File systems --->
Miscellaneous filesystems --->
[*] SquashFS 2.1 - Squashed file system support
If you want to use the same kernel for nfs booting:
File systems --->
Network File Systems --->
[*] NFS file system support
[*] Provide NFSv3 client support
[*] Root file system on NFS
And heres a sample of the pxelinux.cfg config I used:
append ramdisk=165000 initrd=initrd2.gz root=/dev/ram0 udev nodevfs vga=791 splash=silent,theme:livecd-2005.0 acpi=off ip=dhcp
I originally started using help from here:
But found that it complicated matters by placing a the livecd.squashfs image inside of another initrd image.