About Live CDs & How to Cut a Live Disc Using UCK

0
332
Cut my own disc!

Cut my own disc!

When I heard the term Live CD, I thought it was a rock band — but very soon, I learnt what a wonderful thing it was. This article not only introduces readers to the concept, but also shows you how to create a Live CD of your own.

A Live CD is a convenient and easy approach for users to try out an operating system and run preconfigured software, or do virtually everything that you can with an installed system. It’s a bootable CD-ROM disk that loads an operating system without the need to permanently install it on a storage device like a hard drive.

The origin of the Live CD was not a CD at all, but a bootable floppy disk. Usually, hardware manufacturers and anti-virus developers produced bootable floppy disks for various operating systems, to perform certain administrative tasks that were not possible with the OS already running. For example, anti-virus software needed users to boot their system in a known safe condition, so that any virus infections on the machine would not interfere with virus-testing activity. Hardware manufacturers distributed bootable floppy disks to allow the system user to test the hardware products without OS intervention, and to be sure that the firmware was working correctly.

Now, from the general user’s point of view, Live CDs can be used to repair non-working systems. For example, I used it to repair my GRUB bootloader after a Windows installation. You can also use it to browse the Internet if, for instance, you go to a cyber café, where you’re sceptical about whether the computer has keyloggers or other spyware on it, that could steal your personal information.

You can just insert a Live CD, and within a short time, you’re ready to use the computer with your own, clean and secure operating system! You can even use your pen drive as a storage medium, or can play online/offline games. The best part is that your CD is read-only, and cannot be tampered with, or infected, so it is far safer than an installed OS.

Now, let’s talk about some history. The first Live CD was FM town OS, first released in 1989. The first Linux-based Live CD was Yggdrasil Linux, released in 1992-93, with the aim of describing Linux as plug-and-play, but very soon, its production stopped. Then, in 2000, the Finnix Live CD was born; it is still in production. The most remarkable Linux Live CD is Klaus Knopper’s creation, Knoppix — a Debian-derivative Linux distribution. Presently, almost all Linux distributions provide live environments — for example, Fedora, Mandriva, Ubuntu, etc.

How does a Live CD boot?

How does a computer system run from a CD, without the need to permanently install to hard disk? When you press the power button, the first thing that happens is that the BIOS performs a POST (Power-On Self-Test). The POST is a built-in diagnostic program that checks computer hardware to ensure that all detected hardware is functioning properly.

If everything is all right, it looks into an ordered list of boot devices, and loads an operating system from the first device that offers a bootable image. To make a computer boot from a Live CD, it is often necessary to go into the BIOS setup screens and change the boot order to put the CD-ROM (or DVD) drive ahead of the hard disk drive (HDD).

Once loaded, the Live CD operating system detects hardware attached to the motherboard, such as PCI controllers, processor resources, etc. It loads drivers into memory for the detected hardware. After hardware initialisation, it creates an area in the RAM called a RAM-disk, to store the necessary OS components. The Live CD then loads the required OS components into the RAM-disk, and then loads up the services and applications needed for Live CD functionality.

Frankly speaking, the process is more complex than I’ve explained. This is because with a hard drive installation, at boot time, the location of the root filesystem is fixed; it is passed to the kernel using the root=/dev/... parameter. However, in a Live CD, the location of the root device is not fixed, since the user might have multiple CD-ROM drives. Also, to fit on a CD, the filesystem is compressed using squashfs, and it requires proper modules to mount it with transparent decompression.

Although it is true that CDs are still slower than hard disks, normal users generally don’t care about a few seconds’ delay. And with the advances in CD-ROM speed, the future seems promising.

Spin your own Live CD

So why not spin your own Live CD? I’m going to discuss the creation of a personal Ubuntu Live CD (from a preinstalled copy of Ubuntu) using a GUI tool called UCK (Ubuntu Customisation Kit). UCK helps users customise official Ubuntu Live CDs to their needs. Users can add any package to the live system—any applications, games, etc.

To install UCK, open a terminal window, and run the following set of commands:

sudo add-apt-repository ppa:uck-team/uck-stable
sudo apt-get update
sudo apt-get install uck
uckstartup

Make sure your UCK version is 2.0.10 or higher, because with older versions you cannot customise recent versions of Ubuntu like Karmic or Lucid. The UCK startup screen shows its version — see Figure 1.

UCK startup screenshot
Figure 1: UCK startup screenshot

You need the ISO image of the Ubuntu version you want to customise; either obtain it from the Ubuntu website, or you can create one from the installation CD: insert the CD in the CD drive, and issue one of the following commands in a terminal window to create the ISO image in your home folder:

dd if=/dev/dvd of=my_dvd.iso  ## for dvd
dd if=/dev/cdrom of=my_cd.iso  ##for cdrom
Note: Some systems have /dev/sr0 as the device name for the optical disk drive, and do not mount the CD by default.

It’s better if you are using the same Ubuntu version which you intend to customise. If not, do these changes:

  1. In a terminal, run gedit /etc/apt/sources.list.
  2. Change the name of the Ubuntu version to the one you are customising. For example, change Lucid to Karmic. Don’t forget to reverse these changes after you’ve finished customising your Live CD!

Now let’s move on to using UCK. Launch Applications –> Ubuntu Customisation Kit. Choose the language packages to install; just click OK if you do not want an ISO with custom languages. Do the same thing for the choice of language used during the bootup process. Choose the desktop environment. (Make sure that your ISO image has that environment; choose GNOME for Ubuntu, and KDE for Kubuntu.)

Select the Ubuntu ISO file. Keep Windows-related files if you want to use the CD under Windows.

When the UCK package manager opens, customise the list of packages you want (remove and add packages as desired). Select Continue Building, and your ISO image will be saved in /tmp/remaster-new-files/livecd.iso. Burn the images to a CD or DVD using your favourite CD/DVD burning application.

Live CDs are a wonderwall for me, as they enable me to work without worrying about security and storage space. They enable me to play with new Linux distros without installation. They even let me recover a crashed system! In my opinion, it is very handy for everyone to have a Live CD in their pocket.

LEAVE A REPLY

Please enter your comment!
Please enter your name here