NAME
live-build - the live systems tool suite
SYNOPSIS
lb COMMAND [-h|--help] [-u|--usage] [-v|--version] [--breakpoints] [--conffile] [--debug] [--force] [--quiet] [--verbose]
DESCRIPTION
live-build is a set of scripts to build live system images. The idea behind live-build is a tool suite that uses a configuration directory to completely automate and customize all aspects of building a Live image.
The COMMAND is a name of a live-build command (see below).
More documentation about how to use live-build is available in the individual manpages for each helper and in the manual at <https://live-team.pages.debian.net/live-manual/>.
OPTIONS
Shared
live-build options
The following command line options are supported by all
live-build programs.
-h, --help
display help and exit.
-u, --usage
show usage and exit.
-v, --version
output version information and exit.
Common
live-build options
The following command line options are supported by most
live-build programs. See the man page of each program for a
complete explanation of what each option does.
--breakpoints
run with breakpoints.
--conffile
use custom configuration file.
--debug
show debug information.
--force
force helper execution, even if stage file exists.
--quiet
be quiet.
--verbose
be verbose.
LIVE-BUILD COMMANDS
We divide live-build into high level ("porcelain") commands and low level ("plumbing") commands.
Here is the complete list of all available live-build commands. See their man pages for additional documentation.
HIGH-LEVEL COMMANDS (PORCELAIN)
We separate the porcelain commands into the main commands and some ancillary user utilities.
Main
porcelain commands
lb config(1)
creates configuration for live-build
lb bootstrap(1)
executes the first build stage, creating (bootstraping) a basic Debian root filesystem
lb chroot(1)
executes the second build stage, building the live OS filesystem
lb installer(1)
executes the third build stage, obtaining installer components (optional)
lb binary(1)
executes the fourth build stage, generating a binary image
lb source(1)
executes the fifth build stage, generating a source image (optional)
lb clean(1)
cleans up system build directories
Ancillary
Commands
lb(1)
generic live-build script execution wrapper
lb build(1)
alias for all build stages
LOW-LEVEL COMMANDS (PLUMBING) - BUILD STAGE COMPONENTS
The actual work of live-build is implemented in the low-level commands, called plumbing. They are not supposed to be used by end users, they should stick with porcelains as they ensure that all the different plumbing commands are executed in the right order. However, if you intend to reuse live-build commands in your own scripts, then the plumbings might be of interest for you.
Note that the interface (set of options and the semantics) to these low-level commands are meant to be a lot more stable than Porcelain level commands. The interface to Porcelain commands on the other hand are subject to change in order to improve the end user experience.
Bootstrap
stage specific commands
lb bootstrap_archives(1)
applies apt archive configuration
in save mode, saves to cache a copy of the generated bootstrap directory, and in restore mode, restores from cache a previously generated copy
creates (bootstrap) a basic Debian root filesystem using debootstrap(8)
Chroot stage
specific commands
Note: The following chroot_ prefixed commands are used in
building the live OS filesystem. Another set of similarly
prefixed files are listed separately (see further down).
lb chroot_cache(1)
in save mode, saves to cache a copy of the chroot directory, and in restore mode, restores from cache a previously generated copy
compiles a list of firmware packages to be installed in the live OS root filesystem
executes local hacks against the live OS root filesystem, if any are provided
executes local hooks against the live OS root filesystem, if any are provided
copies a set of local files from the config directory into the live OS root filesystem, if any are provided
installs into the live OS root filesystem any packages listed in local package lists
pauses the build process and starts an interactive shell from the live OS root filesystem, providing an oportunity for manual modifications or testing; note that this is (currently) usually executed with several chroot prep modifications applied (see description of these further down)
compiles a list of kernel images to be installed in the live OS root filesystem
installs a set of live system specific packages to the live OS root filesystem
compiles a list of packages provided in the user´ local config to be installed in the live OS root filesystem
installs pre-configured answers to certain install prompts into the live OS root filesystem
Installer
stage specific commands
lb installer_debian-installer(1)
obtains and sets up Debian installer(d-i) components
installs pre-configured answers to certain install prompts
Binary stage
specific commands
lb binary_checksums(1)
creates checksums (md5, sha1, and/or sha256) for live image content
duplicates the chroot directory, to place a copy of what whould be the completed live OS root filesystem to one side, allowing the original to continue to be used in executing certain parts of the remainder of the build process
creates disk information files to be added to live image
installs grub into live image to provide image boot capability
installs grub2 into live image to provide image boot capability
compiles the final live image into an hdd image file
executes local hooks against the live image, if any are provided
copies a set of local files from the config directory into the live image, if any are provided
compiles the final live image into an iso file
copies the linux-image into the live image
bundles a copy of loadlin into the live image
creates manifest of packages installed into live OS filesystem, and list of packages to be excluded by a persistence mechanism installing the live OS to disk
bundles a copy of memtest into the live image
compiles the final live image into a netboot tar archive
processes local lists of packages to obtain and bundle into image (from which they could later be installed if not already)
wraps up the completed live OS root filesystem into a virtual file system image
installs syslinux into live image to provide image boot capability
compiles the final live image into a tar archive
bundles a copy of win32-loader into the live image and creates an autorun.inf file
builds zsync control files
Source stage
specific commands
lb source_checksums(1)
creates checksums (md5, sha1, and/or sha256) for source image content
downloads source packages for bundling into source image
creates disk information files to be added to source image
compiles the final source image into an hdd image file
executes local hooks against the source image, if any are provided
compiles the final source image into an iso file
copies live-build config into source
compiles the final source image into a tar archive
LOW-LEVEL COMMANDS (PLUMBING) - CHROOT PREP COMPONENTS
The notes above under the section regarding build-stage specific low-level plumbing commands also apply here.
The following
chroot_ prefixed commands are used throughout the various
primary stages of the build process to apply and remove
modifications to a chroot root filesystem. Generally these
are used to apply modification that setup the chroot for use
(execution of programs within it) during the build process,
and later to remove those modification, unmounting things
that were mounted, and making the chroot suitable for use as
the root filesystem of the live OS to be bundled into the
live image.
lb chroot_apt(1)
manages apt configuration; in apply mode it applies configuration for use during build process, and in remove mode removes that configuration
manages apt archive source lists; in apply mode it applies source list configurations suitable for use of the chroot in the build process, and in remove mode replaces that with a configuration suitable for the final live OS
manages a /etc/debian_chroot file
manages mounting of /dev/pts
manages dpkg; in apply mode disabling things like the start-stop-daemon, and in remove mode enabling them again
manages the hostname configuration
manages the /etc/hosts file
manages mounting of /proc
manages configuration of the /etc/resolv.conf file
manages mounting of /sys/fs/selinux
manages mounting of /sys
manages the /usr/sbin/policy-rc.d file
manages configuration of dpkg to use a tmpfs filesystem
manages use of upstart /sbin/initctl program; in apply mode blocking execution through a dpkg diversion, and in remove mode enabling execution again
CONFIG FILES
Many live-build commands make use of files in the config/ directory to control what they do. Besides the common config/common, which is used by all live-build commands, some additional files can be used to configure the behavior of specific live-build commands. These files are typically named config/stage or config/stage_helper (where "stage" of course, is replaced with the name of the stage that they belong to, and "helper" with the name of the helper).
For example, lb bootstrap_debootstrap uses files named config/bootstrap and config/bootstrap_debootstrap to read the options it will use. See the man pages of individual commands for details about the names and formats of the files they use. Generally, these files contain variables with values assigned, one variable per line. Some programs in live-build use pairs of values or slightly more complicated variable assignments.
Note that live-build will respect environment variables which are present in the context of the shell it is running. If variables can be read from config files, then they override environment variables, and if command line options are used, they override values from config files. If no value for a given variable can be found and thus is unset, live-build will automatically set it to the default value.
In some rare cases, you may want to have different versions of these files for different architectures or distributions. If files named config/stage.arch or config/stage_helper.arch, and config/stage.dist or config/stage_helper.dist exist, where "arch" is the same as the output of "dpkg --print-architecture" and "dist" is the same as the codename of the target distribution, then they will be used in preference to other, more general files.
All config files are shell scripts which are sourced by a live-build program. That means they have to follow the normal shell syntax. You can also put comments in these files; lines beginning with "#" are ignored.
FILES
/etc/live/build.conf
/etc/live/build/*
SEE ALSO
live-boot(7)
This program is a part of live-build.
HOMEPAGE
More information about live-build and the Live Systems project can be found on the homepage at <https://wiki.debian.org/DebianLive>.
BUGS
Bugs can be reported by submitting a bugreport for the live-build package in the Bug Tracking System at <http://bugs.debian.org/> or by writing a mail to the Live Systems mailing list at <debian-live [AT] lists.org>.
AUTHOR
live-build was written by Daniel Baumann <mail [AT] daniel-baumann.ch>.