Today i will show you how to boot a Gentoo LiveCD via PXE (aka network boot).
- Download a minimal install iso
- Prepare a TFTP Server
- Mount the ISO file as a loopback device (
mount -o loop /path/to/install-x86-minimal-20100216.iso /mnt/cdrom/) - Copy the Kernel (/mnt/cdrom/isolinux/gentoo) to your TFTP-Root
- Copy the InitramFS and the squash'ed root fs to a temp dir (/mnt/cdrom/isolinux/gentoo.igz and /mnt/cdrom/image.squashfs)
- Unpack the initramfs (
gunzip -c gentoo.igz | cpio -idv) - Patch the init script with this patch
- Copy the RootFS to mnt/cdrom inside the initramfs (
mkdir -p mnt/cdrom; cp image.squashfs mnt/cdrom/) - Repack the initramfs (
find . -print | cpio -o -H newc |gzip -9 -c - > /path/to/tftp/root/initramfs.gz) - Edit your pxelinux.cfg/default file:
kernel gentoo
append initrd=initramfs.gz root=/dev/ram0 init=/linuxrc loop=/image.squashfs looptype=squashfs cdroot=1 real_root=/
