Live CD distributions

From LQWiki
Jump to navigation Jump to search

Live CD distributions are an excellent way to try out Linux without having to install a distribution to your hard drive. Some of these distributions have a consumer orientated emphasis, including packages such as KDE, Gnome and OpenOffice, whilst others are specifically for system rescue/diagnostics - either way, there's plenty of choice when it comes to portable Linux distributions.

To get started with a Live CD, simply put the CD into your CD-ROM drive, set your BIOS to boot from that drive, and boot-up.

For more information on the various Live CD distributions, click on the links below.

List of Live CD's

Creating your own Live CD

Linux Live is a utility which enables the creation of your own Live CD from your installed distribution. Excellent for creating your own system rescue disks or a Live CD customised to your needs for use no matter where you are.

Create your own Debian Live CD

The bootcd package allows you to create your very own custom live cd. The advantage over other customizable Live CD solutions is that it creates an exact copy of your running Debian system.

  • Important Files
    • bootcdwrite -- create a Live CD of the current running system
    • bootcdwrite.conf -- the bootcd configuration file
    • bootcd2disk -- copy the Live CD system to the hard disk
  • Editing /etc/bootcd/bootcdwrite.conf
    • Change SRCDISK=/nfs/host1 to SRCDISK=/
    • Change KERNEL=$SRCDISK/boot/vmlinuz-2.4.19 to KERNEL=/path_of_your_kernel
    • Change RAMDISK_SIZE=8192 to RAMDISK_SIZE=132768(or larger) if you are going to load X

(Recommended) If you want to create an ISO first before burning to a CD:

  • Change BLANKING=auto to BLANKING=no
  • Change ISO_ONLY="no" to ISO_ONLY="yes"

Now run bootcdwrite and wait. The CD image will be located at /var/spool/bootcd/cdimage.iso. Burn the ISO image e.g. with k3B.

You will need lots of space to create a Live CD. The default directory to store the image and temporary files is /var/spool/bootcd. If you have created a separate partition for /var, it needs to be sufficiently large to accommodate the temporary files created. The free space available should be at least 1.5x(preferably 2x) the size of your whole system. You could change the location to store the temporary files by changing the VAR variable in /etc/bootcd/bootwrite.conf.

  • Installing additional software from a running Live CD

Installing new software requires an additional ramdisk. When you run the Live CD, two ramdisks are created. One stores the /dev, /etc, /home, /root, and /tmp directories. The other stores the /var directory. Most software programs are installed in /usr. If the program you want to install places files in directories other than /usr, you will need to create ramdisk version of those directories as well.

We will first recreate the /usr directory so that it is no longer read-only. First we need to create the ramdisk and a mount point to mount it.

mke2fs /dev/ram3
mkdir /root/ram3
mount /dev/ram3 /root/ram3
Note: The size of the ramdisk will be limited by the value you specify for RAMDISK_SIZE when you created the Live CD. You may have to create additional ramdisks to bypass this size limitation.

Now copy the contents of /usr to /root/ram3 and mount /dev/ram3 to /usr.

cp -R /usr/* /root/ram3
mount /dev/ram3 /usr
umount /root/ram3
Note: Do NOT umount /root/ram3 before mounting it to /usr. /dev/ram3 shares its space with /dev/ram1 and /dev/ram2. Unmounting /dev/ram3 can overwrite some of the contents; hence this step is last.

Although /var is copied to the /dev/ram2, not everything is copied, so we need to copy the missing files over.

cp -R /var.ro/* /var

Now you use apt-get to install as usual.

  • Troubleshooting

I have encountered trouble while trying to run Firefox with a custom Live CD. The program would not load completely and it did not produce any error messages; it would load, but nothing would show. I can not say whether you will encounter the same problem, but here is the solution that I used. I replaced the contents of /var/lib/mozilla-firefox with the copy from /var.ro.

rm -rf /var/lib/mozilla-firefox
cp -R /var.ro/lib/mozilla-firefox /var/lib

External links