Build an ubuntu live CD from scratch with debian's live-helper
Foreword
This page briefly describes how to create an ubuntu live CD from scratch with debian's live helper. However, I would suggest to think twice before following it: I personnally prefer to follow
these other instructions which aim at customizing an already fully functional Ubuntu live CD (this process is less network bandwidth consuming, and makes me more confident in the boot process of the resulting CD [100% ubuntu, instead of a mixture debian/ubuntu]).
Overview
The default ubuntu (jaunty) distribution ships with (an almost un-modified version of)
debian's live-helper. Unfortunately, this version doesn't allow to build an ubuntu live CD out-of-the box. It needs some twiddling.
The following instructions have been tested on an x86_64 host running jaunty (ubuntu 9.04), for an x86_32 jaunty target.
Pre-requisites
- Some packages on the hosts:
sudo aptitude install genisoimage squashfs-tools cdebootstrap live-helper
- a good internet connection or a local ubuntu mirror
Base changes
Before going further, the globally installed live-helper scripts need to be altered because ubuntu doesn't follow the same convention as debian for the "updates" repository names. Edit
/usr/bin/lh_chroot_sources and replace all the
${LH_DISTRIBUTION}/updates with
${LH_DISTRIBUTION}-updates (4 total on my jaunty).
Creating the live CD
- First, prepare a new working area and configure it:
shell# cd /some/dir
shell# mkdir my_live_cd_working_area && cd my_live_cd_working_area
shell# lh_config -a i386 --mode ubuntu --tasks "ubuntu-desktop" -d jaunty \
--mirror-bootstrap "http://fr.archive.ubuntu.com/ubuntu" \
--mirror-chroot "http://fr.archive.ubuntu.com/ubuntu" \
--mirror-chroot-security "http://security.ubuntu.com/ubuntu" \
--mirror-binary "http://fr.archive.ubuntu.com/ubuntu" \
--mirror-binary-security "http://security.ubuntu.com/ubuntu" \
--categories "main restricted universe multiverse" \
-k generic --linux-packages="linux-image" \
--initramfs casper --bootstrap cdebootstrap
You may want to use other ubuntu mirror URLs.
Instead of "i386" (that builds an x86_32 live CD), you may want to use "amd64" (for x86_64) or just not specify any "-a" option.
And instead of "ubuntu-desktop", you can use the other flavors such as "minimal" (for a minimal 120 MB CD), or "ubuntu-live" or anything known to tasksel (tasksel --list-tasks to get the list).
Et voilą ! A
binary.iso file will be created, which contains the ISO image suitable for qemu/VirtualBox/kvm tests, or direct boot. Yes, the boot splash screen will be rather minimalist (debian style ;) and usplash won't show off with its animated progress bar. But, under the hood, everything just works the same way as for an official Ubuntu live CD. Use
unetbootin (
aptitude install unetbootin) to transfer it to an USB memory stick.
The
chroot directory contains the contents of the root file system on the CD, and thus can be used to
chroot (or better:
schroot) to it from your running host in order to use the distribution "natively".
References
And the bright future: