CD image

From TUDOS-Wiki
Jump to navigationJump to search

Creating a CD image with L4 binaries is fairly easy. First you have to create a directory where you put all the files that should go on the CD. This directory will be the root of your CD image. Change into that directory and create a directory called boot in that directory you put another directory grub. Into the directory boot/grub you copy a Grub stage2 file that can boot CD images:

cp /usr/lib/grub/i386-pc/stage2_eltorito boot/grub/

Then you copy all the files to your CD image, that is, somewhere below the root directory of your CD image.

Grub will look for an menu.lst file in the boot/grub directory. Thus, either place your main menu.lst there or create a menu.lst that will load your other menu.lst. Either way, be aware that booting from a CD will load from (cd)/ instead of (nd)/tftpboot.

When all the files are placed "on the disk" we make a CD image from that directory using mkisofs:

mkisofs -R -b boot/grub/stage2_eltorito 
  -no-emul-boot -boot-load-size 4 -boot-info-table
  -J -joliet-long
  -o "cd-image.iso" .

Do not forget the dot at the end of the command line, as it tells mkisofs which directory to create the image from (here: current directory). The mkisofs command will create a CD image named cd-image.iso that can then be used to burn it to a CD disk or as image for virtual machines (QEmu, VMWare).

To ease the step of creating a CD image we provide a script in $(L4DIR)/tool/bin: isocreator. It takes two arguments: the directory to create the image from and the name of the CD image file. With the above setup, we would use isocreator like this:

 $(L4DIR)/tool/bin/isocreator . cd-image.iso