====== PXE Boot 2006.0 Minimal ISO ====== install-x86-minimal-2006.0.iso Ability to run the Gentoo install totally from the PXE boot. Modify booting to not need nfs to get the image.squashfs. ===== Create target directory ===== mkdir .../tftproot/gentoo20060 cd .../tftproot/gentoo20060 ===== Obtain the files ===== You need to obtain these files from the CD: isolinux/gentoo isolinux/gentoo.igz image.squashfs ===== pxelinux.cfg/default ===== label 3 kernel gentoo20060/gentoo append initrd=gentoo20060/gentoo.igz.new root=/dev/ram0 init=/linuxrc loop=/image.squashfs looptype=squashfs cdroot=1 real_root=/ vga=791 ip=dhcp ===== Tool unigz.pl ===== #!/usr/bin/perl -w # use strict; use File::Slurp qw(slurp); my $ifile = slurp($ARGV[0], binmode=> ':raw'); my $newfile; my $i=1; my @newfiles = split(/TRAILER!!!/,$ifile); `mkdir $ARGV[0].dir`; foreach $newfile (@newfiles) { open F, "> ./$ARGV[0].dir/$i"; print F $newfile; print F "TRAILER!!!\0"; close F; `cd $ARGV[0].dir; cpio -i -H newc < $i; rm $i; cd ..`; $i++; } ===== Unpack the .igz ===== mv gentoo.igz gentoo-image.gz ./unigz.pl gentoo-image ===== Modity the initrd ===== cd gentoo-image.dir mkdir -p mnt/cdrom/ cp ../image.squashfs mnt/cdrom/ cp init init.orig ===== init file ===== --- init.orig 2005-12-15 15:14:38.000000000 +1100 +++ init 2005-12-15 16:39:59.000000000 +1100 @@ -270,7 +270,7 @@ sdelay - [ "${REAL_ROOT}" = "/dev/nfs" ] || bootstrapCD + #[ "${REAL_ROOT}" = "/dev/nfs" ] || bootstrapCD if [ "${REAL_ROOT}" = '' ] then echo -n -e "${WARN}>>${NORMAL}${BOLD} No bootable medium found. Waiting for new devices" @@ -369,7 +369,7 @@ else bad_msg "Block device ${REAL_ROOT} is not a valid root device..." REAL_ROOT="" - got_good_root=0 + got_good_root=1 fi done @@ -452,7 +452,7 @@ fi fi - cache_cd_contents + #cache_cd_contents # Setup the loopback mounts if [ "${LOOPTYPE}" = 'normal' ] @@ -466,7 +466,8 @@ elif [ "${LOOPTYPE}" = 'squashfs' ] then good_msg 'Mounting squashfs filesystem' - mount -t squashfs -o loop,ro ${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP} ${NEW_ROOT}/mnt/livecd + #mount -t squashfs -o loop,ro ${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP} ${NEW_ROOT}/mnt/livecd + mount -t squashfs -o loop,ro /mnt/cdrom/${LOOPEXT}${LOOP} ${NEW_ROOT}/mnt/livecd test_success 'Mount filesystem' FS_LOCATION='mnt/livecd' copy to ./init ===== Repack the .igz file ===== find . -print | cpio -o -H newc > ../gentoo.igz.new reference [[http://www.byteclub.net/wiki/index.php?title=Gentoo_live]]