How To: Make a Debian Live CD

Linux Live CD’s are very useful. Installation disks and Rescue disks are the main application of the technologies used to make a live CD. I am going to talk about how to make a Debian Linux live CD. In this how-to I will cover how to use the application called live-helper. I use it extensibly to make live CD’s for many different applications. I will discuss how to make a basic Live CD for Debian 4.0 (Etch).

First thing you need is a Installation of Debian. It is best to use a Debian Sid host system to build the ISO’s with live-helper. Using Debian Sid ensures that you have all the newest tools and the latest features/fixes of live-helper. To simplify this write-up I will assume you are using Debian Sid. If you wish to use Debian Etch or Lenny, then you can set up Apt Pinning. It will allow you to grab the newest packages for live-helper and all the dependencies so you can keep your precious stable system, and still have the latest version of live-helper.

Start off by updating the apt/aptitude database and then upgrade any packages on your Sid system to the newest possible version:

su
password:
apt-get update
apt-get upgrade
apt-get dist-upgrade

Next, tell Apt to grab the latest live-helper:
apt-get install live-helper

Tip: If you are in Etch or Lenny you can tell Apt to show you the package and its version numbers so you know what you need to add to your Apt Pinning configuration. This assures you know what you are adding to your system that may cause a problem in the future.

apt-cache showpkg live-helper

Now you are ready to start building your first Debian Live CD. First thing to do is check the man pages so you know a little more about the extensive ammounts of live-helper switches. I am going to build a basic Debian Etch system that has no GUI and a few useful applications for Windows OS recovery type tasks.

The tools I am going to pick are: parted, testdisk, ntfs3g, ntfsprogs, clamav, clamav-freshclam, rar, unrar, zip, unzip, openssh-client, tcpdump, elinks, various hardware recogniztion packages, and linux-image-2.6.18.

First thing you have to do is create the directory you are going to work in. I usually call mine something that will tell me what was built in that directory.
cd /home/alk3
mkdir live-rescue
cd live-rescue

Note: In this how-to, everything is carried out by the root user.

Then you need to tell live-helper to run the configuration script. It makes all the approriate directories and config files that you can later edit to make your build even more custom. Here is the one-liner that will do all this for you:

lh_config -d etch --sections "main contrib non-free" --hostname "rescue"
--username "alk3" --packages "console-common kbd locales discover parted
testdisk ntfs3g ntfsprogs clamav clamav-freshclam rar unrar zip unzip
openssh-client tcpdump elinks"

After that, it is just a matter of running:

lh_build

You will see the live CD start building and you should end up with a ISO of a default Debian system with those extra tools I mentioned. Now try booting your new ISO with Qemu, VMware, VirtualBox, or any other virtual machine software. If you don’t have the means to install a virtualization software, then burn it to a CD/DVD and boot from the CD-ROM. I use Qemu because its quick and easy:

qemu -cdrom binary.iso -m 256

Note: If it doesn’t boot, then it could be a bug in the live-helper package, or one of the packages in Debian. You should search the bug lists and if it’s not already reported: report it to the list of the buggy package. :)

This is meant to be a simple tutorial that introduces the process of building Live CD’s on Debian systems. For documentation, FAQ, and examples, visit: http://debian-live.alioth.debian.org/.

Feel free to email me here: alk3 <<<>>> alkix-live <dot> com.

Post to Twitter Post to Plurk Plurk This Post Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Post to Ping.fm Ping This Post Post to Reddit Reddit Post to StumbleUpon Stumble This Post

One Comment

  1. almighty
    Posted October 24, 2007 at 8:02 pm | Permalink

    first!!
    fake… photoshopped
    pics or it didnt happen
    noob
    gtfo

    besides all that… not a bad write up

2 Trackbacks

  1. [...] Plan C added an interesting post on How To: Make a Debian Live CDHere’s a small excerptHow To: Make a Debian Live CD alk3 @ 02:14pm Linux, How-To Linux Live CD’s are very useful … for Windows OS recovery type tasks. The tools I am going to pick are: parted, testdisk, ntfs3g, ntfsprogs [...]

  2. By hotinfobase.com on January 18, 2010 at 11:23 am

    hotinfobase.com…

    Oh! Yes Guessing is usually the first password hacking style. So many Administrator went down for that as simple as it is. A lil bit of Social engineering coupled with some guessing attacks usually do it. Studying and collating information of ones targ…

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*