Using Debian Live

Concepts

  • Debian-Live is a collection of scripts and templates for building live-cd and stuff.
  • It creates a full linux system in ./chroot and converts it to a ISO image.

Configuration

First of all, create a folder as the root for the building, e.g. live-root. Then execute all commands under this folder.

The configuration files for building the target is stored in the config folder. To create this folder and populate with required config files, simply run:

lh config

The config structure created:

vps2:~/live-root# tree -p
.
|-- [drwxr-xr-x]  auto
|   `-- [drwxr-xr-x]  functions
`-- [drwxr-xr-x]  config
    |-- [-rw-r--r--]  binary
    |-- [drwxr-xr-x]  binary_debian-installer
    |-- [drwxr-xr-x]  binary_debian-installer-includes
    |-- [drwxr-xr-x]  binary_grub
    |-- [drwxr-xr-x]  binary_local-debs
    |-- [drwxr-xr-x]  binary_local-hooks
    |-- [drwxr-xr-x]  binary_local-includes
    |-- [drwxr-xr-x]  binary_local-packageslists
    |-- [drwxr-xr-x]  binary_local-udebs
    |-- [drwxr-xr-x]  binary_rootfs
    |-- [drwxr-xr-x]  binary_syslinux
    |-- [-rw-r--r--]  bootstrap
    |-- [-rw-r--r--]  chroot
    |-- [drwxr-xr-x]  chroot_apt
    |-- [drwxr-xr-x]  chroot_local-hooks
    |-- [drwxr-xr-x]  chroot_local-includes
    |-- [drwxr-xr-x]  chroot_local-packages
    |-- [drwxr-xr-x]  chroot_local-packageslists
    |-- [drwxr-xr-x]  chroot_local-patches
    |-- [drwxr-xr-x]  chroot_local-preseed
    |-- [drwxr-xr-x]  chroot_sources
    |-- [-rw-r--r--]  common
    |-- [drwxr-xr-x]  includes
    |-- [-rw-r--r--]  source
    `-- [drwxr-xr-x]  templates

Use a closer mirror to download packages

Edit file config/bootstrap to config which mirrors to use, example:

LH_MIRROR_BOOTSTRAP="http://ftp.hk.debian.org/debian/"
LH_MIRROR_CHROOT="http://ftp.hk.debian.org/debian/"

What packages to install to the target ISO?

This is controlled by the LH_PACKAGES_LISTS variable in the file chroot:

LH_PACKAGES_LISTS="standard" 

What the “standard” list contains is defined in /usr/share/live-helper/lists/standard. All predefined list is in this folder.

How to add additional packages

Create .list files (example: utils.list) inside folder config/chroot_local-packageslists.

# file utils.list
# install these network tools:
ntop iftop iptraf

How to add additional files

Put additional files under folder config/chroot_local-includes/.

For example, you want to add /var/www/index.html to the target, then place it as:
config/chroot_local-includes/var/www/index.html

How to make further modification

You can place scripts/programs in config/chroot_local-hooks/.

For example, place a script here to remove some unwanted package, generate keys, do some special task…etc

Bootstrap stage

This stage uses the config file bootstrap.

Run bootstrap stage:

lh bootstrap

After that, a root filesystem is created in chroot.

tips/using_debian_live.txt · Last modified: 2010-06-04 12:27 by admin
Back to top
GNU Free Documentation License 1.3
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0