Creating bootable CD-ROMS Part 2 - bootcd

Posted by Steve on Sat 28 May 2005 at 07:04

Have you ever wanted to create your own livecd? A complete Debian system which runs entirely from CD-ROM is simple to create, and can be made in minutes with bootcd.

There are many bootable "live distributions" around which run entirely from CD-ROM. Argubly the most popular one in existance is Knoppix which is based upon Debian GNU/Linux.

It's possible to remaster, or update many of the existing "Live CD-ROMs" with your own packages, most of the live distributions. But this doesn't help you much if you wish to create something widely different from their offerings.

This article is a followup to a previous article describing how to create bootable CD-ROM images with dfsbuild.

Th advantage of using the bootcd package is that you can duplicate your existing system without any major changes. This allows you a lot of flexability compared to merely remastering an existing distribution, and avoids a lot of the trial and error of constructing a system from raw packages, as with dfsbuild

It's ideal for creating a backup of an existing system, or for creating clones of bare machines.

Install it with the predictable:

apt-get install bootcd

Once it is installed you can customize its operation by editting the file /etc/bootcd/bootcdwrite.conf.

One of the most obvious things to do to cut down on the space of your CD-ROM is to remove the /home partition.

Because you cannot exclude a directory /home directly you must instead exclude the directories beneath it:

NOT_TO_CDROM="/home/skx /home/qemu /home/misc /home/mp3"

Once you're happy with the way the basic setup lookss execute, as root, bootcdwrite to start the build process.

When the program runs it will tell you if there are any problems with your setup - such as requiring more space than will fit on a single CD-ROM (even with compression). At each point you can elect to ignore the warning and continue, or cancel.

Once the build process has finished you will be left with a bootable ISO image saved as /var/spool/bootcd/cdimage.iso.

Testing The Image

If you've installed qemu package you can test the new image upon your system without actually rebooting.

The output image, by default, will be created inside /var/spool/bootcd and you can load this by executing:

qemu -boot c -cdrom /var/spool/bootcd/cdimage.iso

This should allow you to verify that the image works before it is burnt to CD-ROM.

The most likely problem you will encounter is that your currently running system won't fit upon a single CD-ROM. This isn't really an avoidable problem at the moment unless your base system is a minimalist installation - although it might be something which is solvable in the future when DVD writer support arrives.

In the meantime though qemu doesn't care how big your CD-ROM is, so you can setup a virtual installation from your CD-ROM. It's not the most speedy setup, but it will allow you to play with backups and virtualisation.

To really get the best out of bootcd you will probably need to start from a bare, customized, and tailored environment.


This article can be found online at the Debian Administration website at the following bookmarkable URL:

This article is copyright 2005 Steve - please ask for permission to republish or translate.