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.
More documentation about how to use live\-build is available in the individual manpages for each helper and in the manual at <\fIhttps://live-team.pages.debian.net/live-manual/\fR>.
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.
executes the build process (by executing all of the secondary level build stages in sequence)
.IP"\fBlb clean\fR(1)"4
cleans up system build directories
.SSAncillaryCommands
.IP"\fBlb\fR(1)"4
generic live\-build script execution wrapper
.\" FIXME
.SHSECONDARY\-LEVELBUILDCOMMANDS(PORCELAIN)
.\" FIXME
The following are the commands that execute each major stage of the build process, in their necessary order of execution. Normally a user might just execute the higher level \fBlb build\fR(1) command.
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, who 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.
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).
.IP"\fBlb chroot_cache\fR(1)"4
in save mode, saves to cache a copy of the chroot directory, and in restore mode, restores from cache a previously generated copy
.IP"\fBlb chroot_firmware\fR(1)"4
compiles a list of firmware packages to be installed in the live OS root filesystem
.IP"\fBlb chroot_hacks\fR(1)"4
executes local hacks against the live OS root filesystem, if any are provided
.IP"\fBlb chroot_hooks\fR(1)"4
executes local hooks against the live OS root filesystem, if any are provided
.IP"\fBlb chroot_includes\fR(1)"4
copies a set of local files from the config directory into the live OS root filesystem, if any are provided
.IP"\fBlb chroot_install\-packages\fR(1)"4
installs into the live OS root filesystem any packages listed in local package lists
.IP"\fBlb chroot_interactive\fR(1)"4
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)
.IP"\fBlb chroot_linux\-image\fR(1)"4
compiles a list of kernel images to be installed in the live OS root filesystem
.IP"\fBlb chroot_package\-lists\fR(1)"4
compiles a list of packages provided in the user\' local config to be installed in the live OS root filesystem
.IP"\fBlb chroot_preseed\fR(1)"4
installs pre-configured answers to certain install prompts into the live OS root filesystem
installs pre-configured answers to certain install prompts
.SSBinarystagespecificcommands
.IP"\fBlb binary_checksums\fR(1)"4
creates checksums (md5, sha1, and/or sha256) for live image content
.IP"\fBlb binary_chroot\fR(1)"4
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
.IP"\fBlb binary_disk\fR(1)"4
creates disk information files to be added to 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
.IP"\fBlb binary_memtest\fR(1)"4
bundles a copy of memtest into the live image
.IP"\fBlb binary_netboot\fR(1)"4
compiles the final live image into a netboot tar archive
The notes above under the section regarding build-stage specific low-level plumbing commands also apply here.
.PP
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.
.IP"\fBlb chroot_apt\fR(1)"4
manages apt configuration; in apply mode it applies configuration for use during build process, and in remove mode removes that configuration
.IP"\fBlb chroot_archives\fR(1)"4
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
.IP"\fBlb chroot_debianchroot\fR(1)"4
manages a /etc/debian_chroot file
.IP"\fBlb chroot_devpts\fR(1)"4
manages mounting of /dev/pts
.IP"\fBlb chroot_dpkg\fR(1)"4
manages dpkg; in apply mode disabling things like the start-stop-daemon, and in remove mode enabling them again
.IP"\fBlb chroot_hostname\fR(1)"4
manages the hostname configuration
.IP"\fBlb chroot_hosts\fR(1)"4
manages the /etc/hosts file
.IP"\fBlb chroot_proc\fR(1)"4
manages mounting of /proc
.IP"\fBlb chroot_resolv\fR(1)"4
manages configuration of the /etc/resolv.conf file
.IP"\fBlb chroot_selinuxfs\fR(1)"4
manages mounting of /sys/fs/selinux
.IP"\fBlb chroot_sysfs\fR(1)"4
manages mounting of /sys
.IP"\fBlb chroot_sysv\-rc\fR(1)"4
manages the /usr/sbin/policy\-rc.d file
.IP"\fBlb chroot_tmpfs\fR(1)"4
manages configuration of dpkg to use a tmpfs filesystem
Many live\-build commands make use of files in the \fIconfig/\fR directory to control what they do. Besides the common \fIconfig/common\fR, 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.
Bugs can be reported by submitting a bugreport for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\fIdebian-live@lists.debian.org\fR>.