posted by Daniel de Kok on Mon 9th Jun 2003 16:56 UTC

"Live Slackware, Part II"
Making the system ready to boot

To make the system ready to boot you will need the Slackware "Ready-To-Boot Linux Disc". Mount the CD and copy all files from the isolinux/ directory to /root/livecd/isolinux/ and the kernel you want to use from kernels/ to the /root/livecd/kernels/ directory. In this example I will use the bare.i kernel (use kernels/bare.i/bzImage on the Slackware Slackware "Ready-To-Boot Linux Disc") and rename it to bare.i (/root/livecd/kernels/bare.i).

After that the /root/livecd/isolinux/isolinux.cfg needs to be configured. The original file provides a good example how isolinux can be configured. For the browser Live CD I only use the bare.i kernel without a boot prompt for entering extra parameters. This is my isolinux.cfg file:

default /kernels/bare.i initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 ramdis
k_size=16384 rw root=/dev/ram SLACK_KERNEL=bare.i vga=ask
prompt 0

The "vga=" is een important parameter. This parameter allows you to specify which graphical mode you want to use. Read the Documentation/fb/vesafb.txt file in the kernel source directory for more information and a summary of the VESA modes.

Toasting the CD

At this point isolinux and the system are ready to be used. The only things which are left to do is to create an ISO image and burning the CD. An ISO image can be created by executing the following command in the /root/livecd/ directory:

mkisofs -o /root/livecd.iso -R -J -hide-rr-moved -v -d -N -no-emul-boot -boot-lo
ad-size 32 -boot-info-table -sort isolinux/iso.sort -b isolinux/isolinux.bin -c 
isolinux/isolinux.boot .

This will create the ISO image /root/livecd.iso. The "-b" parmeter specifies which file has to be used as boot program for the CD. Normally this is used to specify a floppy image for BIOS floppy emulation. Isolinux does not need floppy emulations, so the "-no-emul-boot" parameter is also specified.

Last, but not least, you have to burn the ISO image to an empty CD. This case does not differ from burning another CD. E.g., if you have a 24 speed CD writer which is SCSI device 0,0,0 (you can get the device number by executing "

cdrecord -scanbus
"), you can burn the ISO by executing "
cdrecord -v speed=24 dev=0,0,0 /root/livecd.iso
". After that you can boot your Live CD to see if it works.

Some final remarks

It can be annoying to test you Live CD's. First of all, it can cost you a few CD's, so it is a good idea to test the live system with CD-RW discs. Besides that it takes a lot of time to make an ISO image, burn the CD, reboot, etc. Some virtual machines (VMWare, Bochs?) support booting from ISO images. When using a virtual machine you only have to recreate the ISO after making modifications.

If an ISO image is larger than 650 or 700 MB it does not fit on a normal CD-R disc. Linux kernel 2.4.14 and newer versions support transparant decompression which allows you to fit to 1500MB on a single CD-ROM in some situations. Have a look at the mkisofs and mkzftree manual pages for more information.

Some parts of the systems can not be tuned by modifying files in the live/ directory, like modifying initializations files or other /etc files, like /etc/motd, because they are included in initrd.img. initrd.img is a compressed disk image which can be decompressed with gunzip, after that you can mounted using the loopback interface (

mount -o loop "image"
"mountpoint"
).

Table of contents
  1. "Live Slackware, Part I"
  2. "Live Slackware, Part II"
e p (0)    8 Comment(s)