December 2003
Sadly, several people have thought this document was a "which Live CD should I download" survey, but it's not. It's a technical study on Live CD construction that refers to specific CDs as examples of how things can be done.
Most of the major GNU/Linux releases have produced a LiveCD version of their system and there are several systems built specifically to be run as Live CDs. I have tried:
Note: I was a bug-hunter and developer for dynebolic, until I stopped having anything to so with it when it became plain that it has serious structural and legal problems, which the author was not able to face.
Although it is made from free software, it in itself is not free software: there is no source code available for it; in fact they source code for it does not exist. It is a binary-only system assembled from pieces of different distributions, plus extra things compiled on various people's computers. It is full of bugs, cannot be updated, contains inconsistencies between applications and libraries, is extremely difficult to modify and, because there is no source code tree, it breaks the GPL license under which the included software may be used.
When you run it connected to internet, it allows root access on your machine to the author through sshd and notifies his home site of your IP address as soon as you open a browser since dyne.org is the default home page. I have no evidence that this is a deliberate effect, nor that it has ever been used.
Special features: It uses the windowmaker desktop instead of the ubiquitous KDE.
Special features: It has the full set of KDE internet & office tools, as well as a DOS emulator.
Features: KDE, OpenOffice, Mozilla browser. When I plugged my USB phone into it while it was running, an icon appeared on the desktop!
Special features:
The principal Gentoo Live CD is the one from which you install Gentoo to your hard disk.
It is the fastest to boot, runs in the most economical hardware ('386, 16MB RAM) and you can also boot it from a floppy disk which then accesses the CD.
If you don't specify a language at boot time by typing knoppix lang=XX, it hangs in the boot sequence (which is just worrying!) The boot is incredibly slow! What have they done to Knoppix? It comes in a pretty box, and is funded by public money, which explains a lot if you're familiar with the funded-by-public-money crowd.
These tests were run on a Dell Latitude CPx H500GT (500MHz Pentium III, 128MB RAM, 24X CD-ROM).
| LiveCD | Text | Graphics |
|---|---|---|
| dyne:bolic | 1:05 | 1:35(X) |
| Slackware | 0:50(+) | 1:55 |
| AL-AMLUG | 2:00 | 3:00(X) |
| Knoppix | 1:25 | 2:35(*) |
| Morphix | -:-- | 1:30 |
| MandrakeMove | -:-- | 2:50 |
| Gentoo Live CD installation 1.4 | 1:12 | -:--($) |
| LNX-BBC | 1:00(+) | 1:05(!) |
| Jux CD | 3:11(*) |
Most of "the system" comes from one or more compressed files on the CD, which are decompressed automatically (and transparently) when required. For more detailed information on the different types of compressed read-only filesystems available under Linux, see http://freaknet.org/martin/dynebolic/choices.html.
The writeable parts of the running system's filetree are in RAM disks, of which there are two main variants under Linux:
There are two main philosophies:
They all use three kernel-generated filesystems: devfs on /dev, proc on /proc and usbfs on /proc/bus/usb to generate hardware-dependent device files as a side-effect of the hardware autodetection.
Note, if you want to explore the structure of a running LiveCD filesystem, that often /etc/mtab is not correct, so "mount" lies to you. You need to cat /proc/mount to get a list from the running kernel, and use df on each individual volume for further details. Or, if /etc is writable in the distribution you are looking at, you can do:
rm /etc/mtab ln -s /proc/mounts /etc/mtaband then mount, df and so on will tell the truth.
/usr is decompressed on-the-fly from a read-only 437MB "squashfs" compressed filesystem from the file "/squashedfs". (See squashfs.sourceforge.net)
/home and /var are preloaded into "tmpfs" filesystems from the gzipped files /home.tgz and /var.tgz on the CD.
Alternatively, if the "nesting" mechanism is used, /home, /var and /etc persist from session to session in an ext2 filesystem memorised either on a USB pen drive, or in a single huge file on your existing hard disk. This nesting mechanism currently has security and reliability problems.
The existing hard disk partitions are automatically mounted as /vol/hd1, /vol/hd2 and so on. Extra CDROM drives cannot be used, nor can CD burners, due to bugs in the system startup. USB pen drives and floppy disks should appear under /rem (removable media) but these mechanisms are also buggy.
The CDROM itself is mounted under /mnt/dynebolic.
/bin, /lib, /opt, /sbin and /usr are decompressed on-the-fly from five separate "cramfs" files on the CD: /bin.img, /lib.img, /opt.img, /sbin.img and /usr.img.
A single "tmpfs" filesystem is mounted on /usr/local; /root and /tmp point into this (while, strangely, /usr/tmp and /var/tmp, usually used in preference to /tmp for large temporary files, live in the tiny initial RAM disk!)
Existing filesystems on hard disk partitions are automatically mounted under /mnt/hda1 and so on, while the CDROM itself appears under /dev/hdc (or whichever device you have the CD drive installed as).
It starts with a 12960K ramdisk preloaded by the kernel with an ext3 filesystem from the file /isolinux/miniroot.gz on the CD. Why you would want a journalling filesystem on something that comes from read-only media, and therefore cannot get corrupted?
The cdrom is mounted under /cdrom, and there is a regular Unix filetree under the directory /system on the CD.
/bin, /boot, /lib, /opt, /sbin and /usr are all symbolic links to /cdrom/system/{bin,boot,lib,...} while the rest is all on the 12MB fixed-size ramdisk.
Er... that's it. If you want your hard drive partitions mounted, you mount them!
The large, read-only parts of the system are mounted as a complete Unix filetree under /KNOPPIX from a compressed ISO file in /KNOPPIX/KNOPPIX on the CD, using "cloop", the Debian compressed loopback device. /bin, /boot, /lib, /opt, /sbin and /usr in the root are then just symbolic links to /KNOPPIX/bin, /KNOPPIX/boot etc.
There is a tmpfs ramdisk mounted on /ramdisk, into which /home and /var are symlinked in a similar way, while /tmp points to /var/tmp.
Your hard disk partitions get mounted, when you access them through the desktop icons, as /mnt/hda1 and so on. USB storage devices appear as /mnt/sda1 etc.
Knoppix can also do "nesting" in a huge file on your harddisk, like dynebolic.
The CDROM itself is mounted on /cdrom.
The main filesystem is mounted as an array of four compressed ISO image files, decompressed on-the-fly through the compressed loop device (see Knoppix above).
/image comes from the file /live_tree.clp on the CD, and is the big one (600MB compressed, 1.4GB uncompressed). The others come from similarly-names ".clp" files on the CD.
The CDROM itself is mounted on /cdrom.
Ok, the cdrom is mounted on /cdrom, and contains /base/boot.img and /base/morphix.
boot.img is a 2.88 MB vfat (MS-DOS/Windows) bootable filesystem containing a 1.6 MB vmlinuz and a 940K miniroot.gz. When I decompress miniroot and try to mount it, I get: "ioctl: LOOP_SET_FP: Invalid argument".
The big compressed volume is mounted on / (and is 900 MB), and this comes from a file /mainmod/MorphixMain-Game.mod.
There's something very wrong with this distribution. In /etc, the directory listing names many of the files twice (e.g. modules.conf!), and in the case of some files you cannot access either of them!
In the CD, in /isolinux, is a 1.6MB Gentoo kernel and a selection of four initial ramdisks: one to boot in text mode, and three framebuffer versions for the three common screen resolutions 800x600, 1024x768 and 1280x1024.
Once the system is running, the initial ramdisk is overlaid with a tmpfs volume, while the large read-only part of the system comes from the file /livecd.cloop on the CDROM, an ext2 filesystem accessed through the compressed loop device, and mounted under /mnt/cloop.
/bin, /boot, /lib, /opt, /sbin and /usr are all symlinks pointing to directories of the same names under /mnt/cloop.
A couple of other shared memory volumes are mounted: one on /var/state/.init.d (why? /var/state is already on a shared memory device - maybe to limit the size of .init.d?) and another on /dev/shm, apparently unused.
The CDROM itself is under /mnt/cdrom.
The bootable portion of the CD is a 1.44MB file, /linux.img, which is a bootable MSDOS filesystem containing the 1MB Linux kernel and a compressed initial RAMdisk in "root.bin" that expands to an 8192K ext2 filesystem.
In the running system, the root filesystem is a 110MB read-only filesystem that comes from a romfs filesystem compressed with the cloop device (romfs is a fast simple filesystem intended for use in ROM-based embedded systems).
The writable portions of the system live in a tmpfs volume mounted on /mnt/rw, into which /etc, /home, /local, /tmp and /var point. /usr is an alias for /.
The CDROM appears under /mnt/media, while hard disk partitions are mounted, read-only by default, under /mnt/discs/discX/partY where X and Y are the disk and partition numbers.
USB Storage devices are detected if plugged in while the system is running, and appear as /dev/scsi/host0/bus0/target0/lun0 (or similar) but my phone makes the kernel panic.
If you want a gaming CD, the Morphix Combined Gamer is messy but large, while dyne:bolic has a smaller but richer selection with no crappy board games or solitaire. Who knows, when you're bored with the games you might start making videos and publishing them on the web instead :)
If I wanted to produce a bootable CD with my own software on it, my personal favourite as a base would be the Linux Bootable Business Card for its simplicity, cleanness and extreme speed.
My recommendation for developers who want to present a large product as a bootable CD is gentoo.
For users who want to put their own bootable CD together from plug-together parts, I recommend Morphix.