, Johann Schmitz

Today i will show you how to boot a Gentoo LiveCD via PXE (aka network boot).

  1. Download a minimal install iso
  2. Prepare a TFTP Server
  3. Mount the ISO file as a loopback device (mount -o loop /path/to/install-x86-minimal-20100216.iso /mnt/cdrom/)
  4. Copy the Kernel (/mnt/cdrom/isolinux/gentoo) to your TFTP-Root
  5. Copy the InitramFS and the squash'ed root fs to a temp dir (/mnt/cdrom/isolinux/gentoo.igz and /mnt/cdrom/image.squashfs)
  6. Unpack the initramfs (gunzip -c gentoo.igz | cpio -idv)
  7. Patch the init script with this patch (patch < <patch-file>).
  8. Copy the RootFS to mnt/cdrom inside the initramfs (mkdir -p mnt/cdrom; cp image.squashfs mnt/cdrom/)
  9. Repack the initramfs (find . -print | cpio -o -H newc |gzip -9 -c - > /path/to/tftp/root/initramfs.gz)
  10. 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=/