Scroll to navigation

LIVE-BUILD(7) Debian Live Project LIVE-BUILD(7)

NOM

live-build - the Debian Live tool suite

SYNOPSIS

lb {-h|--help|-u|--usage|-v|--version}

lb COMMAND [OPTIONS]

DESCRIPTION

live-build est un ensemble de scripts pour construire des images de système live. L'idée derrière live-build est une suite d'outils qui utilise un répertoire de configuration pour automatiser complètement et personnaliser tous les aspects de la construction d'une image Live.

La COMMANDE est un nom d'une commande live-build (voir ci-dessous).

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

Options live-build partagées

Les options en ligne de commande suivantes sont supportées par l'ensemble des programmes live-build.

affiche l'aide et quitte
affiche l'utilisation et quitte
affiche les informations de version et quitte

Options live-build communes

Les options de lignes de commandes suivantes sont supportées par la plupart des programmes live-build. Voir la page de manuel de chaque programme pour une explication complète de ce que chaque option fait.

lance avec des points d'arrêt (breakpoints).
enable color use in messages.
affiche des informations de déboguage.
force l'exécution d'un assistant, même si le fichier de stage existe.
disable color use in messages.
soit discret.
soit verbeux.

COMMANDES LIVE-BUILD

We divide live-build into high level ("porcelain") commands, secondary major build stage ("porcelain") commands, and low level ("plumbing") commands.

Voici une liste complète de toutes les commandes live-build disponibles. Consultez leurs pages de manuel pour obtenir de la documentation additionnelle.

COMMANDES HAUT-NIVEAU (PORCELAINE)

Nous séparons les commandes porcelaine en commandes principales et en utilitaires utilisateur auxiliaires.

Commandes porcelaine principales

creates configuration for live-build
executes the build process (by executing all of the secondary level major build stages in sequence)
cleans up system build directories

Commandes auxiliaires

lb(1)
generic live-build script execution wrapper

SECONDARY-LEVEL BUILD COMMANDS (PORCELAIN)

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 lb build(1) command rather than use these individually.

executes the first build stage, creating (bootstraping) a basic Debian root filesystem
chroot(1)
executes the second build stage, building the live OS filesystem
executes the third build stage, obtaining installer components (optional)
executes the fourth build stage, generating the binary (live) image
executes the fifth build stage, generating a corresponding source image (optional)

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, 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.

Notez que l'interface (ensemble des options et des semantiques) de ces commandes bas-niveau sont pensées pour être beaucoup plus stables que les commandes de niveau Porcelaine. D'un autre côté, l'interface des commandes Porcelaine sont sujettes à changement afin d'améliorer l'expérience de l'utilisateur final.

Bootstrap stage specific commands

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 (bootstraps) 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).

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
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

obtains and sets up Debian installer (d-i) components
installs pre-configured answers to certain install prompts

Binary stage specific commands

creates checksums (md5, sha1, and/or sha256) for live image content
duplicates the chroot directory, to place a copy of what would 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
creates the config for grub-pc and grub-efi, and also enables loopback support (which depends upon it) in the live image
installs grub-efi (grub2 for EFI) into live image to provide image boot capability. It relies upon lb binary_grub_cfg to create the config.
installs grub into live image to provide image boot capability
installs grub-pc (grub2 for BIOS) into live image to provide image boot capability. It relies upon lb binary_grub_cfg to create the config.
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
installs onie into the live image
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

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.

Note that the lb chroot_prep(1) command can be used to run these components in bulk.

a helper to run the below components in bulk. The first parameter it takes is the execution mode - install or remove - to pass along. The second parameter is the set of helpers to run (they can be space or comma separated; remember to quote if space separated). Following this one or more of the special parameters 'mode-archives-chroot', 'mode-archives-binary', 'mode-archives-source' and 'mode-apt-install-binary' can optionally be used, to select the 'pass' parameter for lb chroot_archives(1) in the case of the first three (required if 'archives' is one of the helpers to be run), and to run lb chroot_apt(1) in 'install-binary' mode in the last case. Any remaining parameters (i.e. options like --force) are passed along to all scripts run. The second parameter can be simply 'all' in which case a default set of all components are used, or 'all-except-archives' which differs in skipping lb chroot_archives(1). Components can be specified without their filename 'chroot_' prefix for brevity. In remove mode the list of components are run in reverse order, so no need to provide them in reverse order yourself.
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

FICHIERS DE CONFIGURATION

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 (where "stage" of course, is replaced with the name of the stage that they belong to).

Notez que live-build respectera les variables d'environment présentes dans le contexte du shell lancé. Si les variables peuvent être lues depuis les fichiers de configuration, alors elles prennent le pas sur les variables d'environement, et si les options en ligne de commande sont utilisées, elles sont prioritaires sur les fichiers de configuration. Si pour une variable donnée, aucune valeur ne peut être trouvée et donc, est non-paramétrèe, live-build la paramètrera automatiquement à la valeur par défaut.

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 and config/stage.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.

Tous les fichiers de configuration sont des scripts shell qui sont sourcés par un programme live-build. Ceci signifie qu'ils doivent suivre la syntaxe de shell normale. Vous pouvez également mettre des commentaires dans ces fichiers; les lignes commençant par des "#" sont ignorées.

FICHIERS

/etc/live/build.conf
/etc/live/build/*

VOIR AUSSI

live-boot(7)

live-config(7)

Ce programme est une partie de live-build.

PAGE D'ACCUEIL

More information about live-build and the Debian Live project can be found on the homepage at <https://wiki.debian.org/DebianLive>.

BOGUES

Bugs can be reported by submitting a bug report for the live-build package in the Bug Tracking System at <http://bugs.debian.org/> or by writing a mail to the Debian Live mailing list at <debian-live@lists.debian.org>.

AUTEUR

live-build was originally written by Daniel Baumann <mail@daniel-baumann.ch>. Since 2016 development has been continued by the Debian Live team.

2023-05-02 1:20230502