2.2: Bootloader
In this book we will use GRUB, since it's the easiest thing getting to boot.
#Make sure all your things are finally prepared for launch.
cd ~/lfz
mkdir -p iso/boot/grub
cp <KENRELIMAGE> iso/boot/
cp <INITRAMFS> iso/boot/
cd iso/boot/grub
#Ofcourse, replace the <KERNEL> and Initramfs.cpio.gz as needed.
cat << EOF > grub.cfg
set timeout=5
set default=0
menuentry "LF0 Distribution"{
linux /boot/<KERNEL>
initrd /boot/initramfs.cpio.gz
}
EOF
cd ~/lfz
grub-mkrescue -o lfz.iso iso
Well, thats that! Now if youve configured grub correctly you should have a bootable iso
We can test it with:
qemu-system-x86_64 -cdrom lfz.iso -m 2G