DavidDecotigny

RemasterUbuntu

Navigation

  • Rechercher un mot :

Customize an Ubuntu Live CD / USB


The default ubuntu live CD is nice: it can boot fast, detect the hardware correctly, etc. But I always dreamed of customizing it (eg. add medibuntu support, etc.). The remaster_ubuntu.sh script offers a simple approach to do just this: we start with a working live CD ISO image, change its contents, and create a new live CD image. This script does not create a whole new CD from scratch (debootstrap, etc.): it starts with an existing live CD image. But if you're insteresting in building a live CD from scratch, there is this other page for that.

Besides allowing to create customized ubuntu live CDs, this script makes it also easy to setup a chroot environment (for schroot for example) without requiring neither to install the system on the disk the usual way (eg. boot from the live cd, install the OS on its own partition, etc.), nor to bootstrap the OS from scratch in a pristine chroot (debootstrap), nor to use some chemistery based on the installation of the system via a virtual machine (eg. qemu, VirtualBox, etc.). In my case, I used this script to create a small schroot installation to have access to the 32bits ubuntu software from my 64bits running system.

Overview


This script allows to customize an Ubuntu live CD in 3 simple steps:
  1. extract the contents of an ubuntu CD ISO image to your hard drive
  2. chroot to the working area containing the extracted CD contents. This allows to do all the /etc configs, aptitude purge/install, etc. to prepare the future ISO image
  3. generate a new ISO image containing the (hopefully modified) working area you just prepared


Tested configurations



It should work with the other ubuntu flavors (eg. kubuntu, xubuntu, edubuntu, gobuntu, etc.) and support the server live CDs as well.

Note: to remaster karmic (9.10) live CD images, the host must be running karmic or newer. For example, it is not possible to remaster a karmic live CD on a jaunty host. A workaround to this would be to compile a custom kernel for the host with a newer squashfs kernel support.

Prerequisites




Usage


All the following commands MUST be run as root (sudo).





The extract and regen operations will be verbose and stop at the first error that occurs. You can of course run the extract operation just once, and run the chroot or regen operations thousands of times on the same working area. You can also run several chroot sessions in parallel. But be sure NOT to run a chroot operation while a regen is in progress.


Advanced customization


If you're planning to update the kernel, or to change the live user configuration, follow these instructions.


To test


Try VirtualBox OSE (aptitude install virtualbox-ose) on the resulting iso file. Or burn a CD and reboot on it. Or use unetbootin (aptitude install unetbootin) to create a bootable USB memory stick.

References