Creating a Bootable CD-ROM
I have no idea if creating a bootable Linux CD is trivial or not because I don't have the experience. But here is the how-to.
CD-ROM file tree
Createing a bootable CD under Linux requires to create an ISO image first and mkisofs is the right program for this. mkisofs expects the file/directory tree for the CD-ROM as input. A working sample layout is
isotree/
isolinux/
initrd.img
isolinux.bin
isolinux.cfg
linux.tgz
vmlinuz
where isotree becomes the root directory of the CD-ROM (isotree will not be copied to the CD-ROM, only its contents).
The files are
- initrd.bin
-
the initrd image.
- isolinux.bin
-
part of the syslinux package.
- isolinux.cfg
-
the boot loader configuration file, see below.
- linux.tgz
-
the target Linux image.
- vmlinuz
- the Linux kernel compatible to the initrd image.
A suitable isolinux.cfg is e.g.
default vmlinuz initrd=initrd.img im=/isolinux/linux.tgz timeout 100 prompt 1 label linux kernel vmlinuz append initrd=initrd.img im=/isolinux/linux.tgz
Creating the ISO filesystem
To create the isofs from the filetree I use the command
# mkisofs -o ariane.iso \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 \
-boot-info-table isotree
from the directory which contains the isotree directory. The resulting image and be written with k3b.