9.1. Making the ISO live system bootable

This chapter assume you use grub2 for your LFS. Issue the following to modify the file grub.cfg:

cd $LFSMOUNT
echo 'menuentry "LFS" {' > boot/grub/grub.cfg  
echo "   search -n -l $LFSLIVE -s" >> boot/grub/grub.cfg
echo "        linux   /boot/lfskernel root=LABEL=$LFSLIVE quiet" >> boot/grub/grub.cfg
echo "        initrd  /boot/initrd.gz" >> boot/grub/grub.cfg
echo "}" >> boot/grub/grub.cfg

Rename kernel, according to menu.lst:

mv -v boot/lfskernel-<version> boot/lfskernel

Where <version> is your kernel version

Create our ISO::

export ISODIR=<path to the dir where you want to store your ISO>
cd $LFSMOUNT
grub-mkrescue -o $ISODIR/livecd.iso -V $LFSLIVE $LFSMOUNT &&
unset ISODIR

Now, you can burn your image on a cd or dvd, and enjoy the livecd !