Examples for generating a Debian Live CDs and others.

This page is really intended to be for command line examples of live-helper. This page assumes you have live-helper installed. Many of the basic examples are also in the man pages. As always, please look at the man page to understand more about the listed examples and other options offered.

See also DebianLive/BuildingImages for alternate ways to build images which can be combined with the examples shown below to give you finer control over the build process as needed.

0. Prepare your working directory and become root

Start by creating a working directory where live-helper will create the image file and also the config, cache, chroot and binary directories. Remember to execute lh_build in this working directory as root. If you prefer, use sudo instead of su (e.g. lh_config && sudo lh_build) for all of the following examples.

mkdir debian-live
cd debian-live
su

1. Basic lh_build examples

The lh_config helper accepts a number of command-line switches to generate a configuration for different kinds of images.

To build a basic image with default settings, run this:

lh_config && lh_build

To generate the a kde desktop image:

lh_config -p kde-desktop && lh_build

To generate a gnome desktop image:

lh_config -p gnome-desktop && lh_build

To generate an xfce desktop image:

lh_config -p xfce-desktop && lh_build

To make live CDs of specific architectures:

lh_config -a i386 && lh_build
lh_config -a amd64 && lh_build

To make live CDs of different distributions (default is etch):

lh_config -d lenny && lh_build
lh_config -d sid && lh_build

2. More complex lh_config examples

Gnome with audacity:

lh_config -a i386 --categories "main contrib non-free" -p gnome --packages audacity && lh_build

Make a netboot for network booting servers:

lh_config -a i386 -d etch -t net && lh_build

Make a live CD with custom files injected into the image:

lh_config

lh_build

Make a live CD with unofficial debian packages installed into the image:

Make one live CD with some hooks

lh_config
cp script config/chroot_local-hooks
lh_build

lh_config
lh_bootstrap
lh_chroot
lh_chroot_hosts install
lh_chroot_resolv install
lh_chroot_proc install
chroot chroot
  #do the hacks here
lh_chroot_hosts remove
lh_chroot_resolv remove
lh_chroot_proc remove
lh_binary

lh_clean --binary
# change what you need in the chroot directory or follow the last note about making some hacks
lh_binary

This assumes your bootstrap stage is still intact from previous calls to lh_bootstrap (or lh_build)

DebianLive/Examples (last edited 2009-03-16 03:36:59 by localhost)