LIVE-BUILD(7)

๐Ÿ“ฆ
version 3.0~a57 ยท 3 versions
, in ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– LIVE-BUILD ๐Ÿ’–

okay so bestie, welcome to live-build(7) โ€” the Debian Live tool suite, brought to you by the Debian Live Project. this is the main character of the whole build situation, and i'm gonna walk you through it like we're texting at 2am. no cap. ๐Ÿซถ


โœจ NAME โœจ

live-build โ€” the Debian Live tool suite. that's it, that's the whole vibe. ๐Ÿ‘‘


โœจ SYNOPSIS โœจ

lb COMMAND [-h|--help] [-u|--usage] [-v|--version] [--breakpoints]
[--conffile] [--debug] [--force] [--quiet] [--verbose]

โœจ DESCRIPTION โœจ

so live-build is literally a set of scripts that build Debian Live system images. ๐Ÿฆ‹ the whole idea is that it's a tool suite that uses a configuration directory to completely automate and customize every single aspect of building a Live image. like, all of it. the entire thing. automated. slay.

the COMMAND is just a name of a live-build command โ€” there's a big ol' list further down, don't worry, we'll get there. ๐Ÿ’…

and if you want even more documentation about how to use live-build, there's the individual manpages for each helper, plus the manual at <http://live.debian.net/manual/>. the lore is deep, iykyk. ๐Ÿ“š


โœจ OPTIONS โœจ

๐ŸŒธ Shared live-build options

these ones? every single live-build program supports them. universal. iconic. no exceptions.

  • -h, --help โ€” display help and exit. the classic "help meee" move. ๐Ÿ™ˆ
  • -u, --usage โ€” show usage and exit. just the usage though, keep expectations realistic bestie.
  • -v, --version โ€” output version information and exit. so you know exactly which flavor you're on. โญ

๐ŸŒธ Common live-build options

these are supported by most live-build programs โ€” so like, check the man page of each individual program for a complete explanation of what each option actually does. don't come for me, i'm just the messenger. ๐Ÿ’€

  • --breakpoints โ€” run with breakpoints. pause-y energy.
  • --conffile โ€” use custom configuration file. your config, your rules.
  • --debug โ€” show debug information. the receipts. ๐Ÿงพ
  • --force โ€” force helper execution, even if stage file exists. it's giving "i said what i said". ๐Ÿ’…
  • --quiet โ€” be quiet. shhh. ๐Ÿคซ
  • --verbose โ€” be verbose. talk to me, tell me everything. ๐Ÿ—ฃ๏ธ

โœจ LIVE-BUILD COMMANDS โœจ

so we divide live-build into high level ("porcelain") commands and low level ("plumbing") commands. very fancy terminology, i know. ๐ŸŽ€

here's the complete list of all available live-build commands. and yeah, each one has its own man page for additional documentation. go read them, i believe in you.


โœจ HIGH-LEVEL COMMANDS (PORCELAIN) โœจ

we separate the porcelain commands into the main commands and some ancillary user utilities. organization? we love to see it. ๐ŸŒˆ

๐ŸŒธ Main porcelain commands

  • lb_config(1) โ€” create configuration for live-build. the setup era. โœจ
  • lb_bootstrap(1) โ€” create the first stage by bootstrapping a basic debian system. stage one, let's gooo. ๐Ÿš€
  • lb_chroot(1) โ€” create the second stage by customizing the chroot. stage two, getting personal. ๐Ÿ’œ
  • lb_binary(1) โ€” create the third stage by generating a binary image. stage three, the glow-up. ๐Ÿ”ฅ
  • lb_source(1) โ€” create the optional fourth stage by generating a source image. optional but iconic. ๐Ÿ‘‘
  • lb_clean(1) โ€” clean up system build directories. the post-build self-care routine. ๐Ÿงผ

๐ŸŒธ Ancillary Commands

  • lb(1) โ€” generic live-build wrapper. the humble lil front door. ๐Ÿšช
  • lb_build(1) โ€” alias for all stages. the "do everything" button. fr fr.
  • lb_local(1) โ€” helper for using a local live-build. supporting your local build, very community-minded. ๐Ÿซถ
  • lb_testroot(1) โ€” ensure that a system is built as root. checking credentials, gatekeeping appropriately. ๐Ÿ’…

โœจ LOW-LEVEL COMMANDS (PLUMBING) โœจ

okay so 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 โ€” bestie, stick with the porcelains, because they make sure all the different plumbing commands get executed in the right order. that's the whole point. ๐Ÿซ 

however, if you intend to reuse live-build commands in your own scripts, then the plumbings might actually be of interest for you. so there's that. ๐Ÿค

note: the interface (set of options and the semantics) to these low-level commands is meant to be a lot more stable than Porcelain level commands. the interface to Porcelain commands, on the other hand, is subject to change in order to improve the end user experience. so like, plumbing = commitment, porcelain = situationship. ๐Ÿ’€

๐ŸŒธ Bootstrap commands

  • lb_bootstrap_cache(1) โ€” cache bootstrap stage. remembering things so you don't have to. ๐Ÿง 
  • lb_bootstrap_cdebootstrap(1) โ€” bootstrap a Debian system with cdebootstrap(1). c-flavored. ๐ŸŒธ
  • lb_bootstrap_copy(1) โ€” bootstrap by copying the host system. copy-paste but make it infrastructure. ๐Ÿ“‹
  • lb_bootstrap_debootstrap(1) โ€” bootstrap a Debian system with debootstrap(8). the og flavor. โญ

๐ŸŒธ Chroot commands

  • lb_chroot_apt(1) โ€” manage /etc/apt/apt.conf. apt management era. ๐Ÿ“ฆ
  • lb_chroot_cache(1) โ€” cache chroot stage. more caching, more remembering. ๐Ÿง 
  • lb_chroot_debianchroot(1) โ€” manage /etc/debian_chroot. very on-the-nose file naming, love that. ๐ŸŽ€
  • lb_chroot_devpts(1) โ€” mount /dev/pts. mounting things, as one does. โ›ฐ๏ธ
  • lb_chroot_dpkg(1) โ€” manage /sbin/dpkg. dpkg supervision duties. ๐Ÿ‘€
  • lb_chroot_hacks(1) โ€” execute hacks in chroot. yes it literally says hacks, and yes that's the vibe. ๐Ÿ’…
  • lb_chroot_hostname(1) โ€” manage /bin/hostname. name tags but for machines. ๐Ÿท๏ธ
  • lb_chroot_hosts(1) โ€” manage /etc/hosts. the guest list. ๐Ÿ“
  • lb_chroot_install-packages(1) โ€” install queued packages into chroot. the queue is moving, finally. ๐ŸŽข
  • lb_chroot_interactive(1) โ€” make build interactive. it's giving conversation. ๐Ÿ’ฌ
  • lb_chroot_linux-image(1) โ€” manage /etc/kernel-img.conf. kernel business. ๐Ÿง
  • lb_chroot_hooks(1) โ€” execute local hooks in chroot. hooking things up. ๐Ÿช
  • lb_chroot_local-includes(1) โ€” copy local files into chroot. bringing your own stuff. ๐ŸŽ’
  • lb_chroot_packages(1) โ€” queue install of packages into chroot. getting in line. ๐Ÿšถ
  • lb_chroot_local-patches(1) โ€” apply local patches against chroot. fix it yourself energy. ๐Ÿฉน
  • lb_chroot_local-preseed(1) โ€” use debconf local preseeding file. pre-answering the questions, very efficient. โœ…
  • lb_chroot_packagelists(1) โ€” queue install of package lists into chroot. bulk queuing. ๐Ÿ“š
  • lb_chroot_proc(1) โ€” mount /proc. another mount, another slay. โ›ฐ๏ธ
  • lb_chroot_resolv(1) โ€” manage /etc/resolv.conf. dns duties. ๐ŸŒ
  • lb_chroot_selinuxfs(1) โ€” mount /selinux. security-flavored mounting. ๐Ÿ”’
  • lb_chroot_archives(1) โ€” manage /etc/apt/sources.list. the source of sources. ๐Ÿ—‚๏ธ
  • lb_chroot_sysfs(1) โ€” mount /sys. mounting the system itself, meta. ๐Ÿ˜Œ
  • lb_chroot_sysv-rc(1) โ€” manage /usr/sbin/policy-rc.d. policy queen. ๐Ÿ‘‘
  • lb_chroot_task-lists(1) โ€” install task lists into chroot. tasks, installed. โœ”๏ธ

๐ŸŒธ Binary commands

  • lb_binary_chroot(1) โ€” copy chroot into chroot. yes, it really does say that. iconic honestly. ๐Ÿ˜ญ
  • lb_binary_debian-installer(1) โ€” install debian-installer into binary. installing the installer, inception vibes. ๐ŸŒ€
  • lb_binary_disk(1) โ€” install disk information into binary. disk lore. ๐Ÿ’พ
  • lb_binary_grub(1) โ€” installs grub into binary. grub era. ๐Ÿ›
  • lb_binary_grub2(1) โ€” installs grub2 into binary. grub era, the sequel. ๐Ÿ›โœจ
  • lb_binary_includes(1) โ€” copy files into binary. files, relocated. ๐Ÿ“
  • lb_binary_iso(1) โ€” build iso binary image. iso moment. ๐Ÿ’ฟ
  • lb_binary_linux-image(1) โ€” install linux-image into binary. kernel, deployed. ๐Ÿง
  • lb_binary_local-hooks(1) โ€” execute local hooks in binary. local hooking. ๐Ÿช
  • lb_binary_local-includes(1) โ€” copy files into binary. again! yes. twice. both exist. ๐Ÿ“
  • lb_binary_local-packagelists(1) โ€” install local package lists into binary. your lists, your rules. ๐Ÿ“
  • lb_binary_manifest(1) โ€” create manifest. the receipts. ๐Ÿงพ
  • lb_binary_checksums(1) โ€” create binary checksums (md5, sha1, and/or sha256). integrity check, we love a verified queen. ๐Ÿ”
  • lb_binary_memtest(1) โ€” installs a memtest into binary. memory testing, very thorough. ๐Ÿงช
  • lb_binary_net(1) โ€” build netboot binary image. netboot nation rise. ๐ŸŒ
  • lb_binary_rootfs(1) โ€” build rootfs image. the root filesystem gets its moment. ๐ŸŒณ
  • lb_binary_silo(1) โ€” installs silo into binary. silo, installed. ๐Ÿ›๏ธ
  • lb_binary_syslinux(1) โ€” installs syslinux into binary. syslinux, installed. ๐Ÿง
  • lb_binary_tar(1) โ€” build harddisk binary image. tarball time. ๐Ÿ—œ๏ธ
  • lb_binary_hdd(1) โ€” build binary hdd image. hard disk drive image, very retro of it. ๐Ÿ’ฝ
  • lb_binary_virtual-hdd(1) โ€” build binary virtual-hdd image. hdd but virtual, the plot twist. ๐Ÿ‘ป
  • lb_binary_win32-loader(1) โ€” installs win32-loader into binary. cross-platform bestie behavior. ๐ŸชŸ
  • lb_binary_yaboot(1) โ€” installs yaboot into binary. yaboot, installed. ๐Ÿฅพ

๐ŸŒธ Source commands

  • lb_source_debian(1) โ€” download sources. go get 'em. โฌ‡๏ธ
  • lb_source_debian-live(1) โ€” copy debian-live config into source. config relocation. ๐Ÿ“ฆ
  • lb_source_disk(1) โ€” install disk information into source. disk lore, source edition. ๐Ÿ’พ
  • lb_source_iso(1) โ€” build iso source image. iso moment, source edition. ๐Ÿ’ฟ
  • lb_source_checksums(1) โ€” create source checksums (md5, sha1, and/or sha256). verification, but for source. ๐Ÿ”
  • lb_source_net(1) โ€” build source net image. netboot, source flavored. ๐ŸŒ
  • lb_source_tar(1) โ€” build source tarball. tarball, source flavored. ๐Ÿ—œ๏ธ
  • lb_source_hdd(1) โ€” build source hdd image. hdd, source flavored. ๐Ÿ’ฝ
  • lb_source_virtual-hdd(1) โ€” build source virtual-hdd image. virtual hdd, source flavored. ๐Ÿ‘ป

โœจ CONFIG FILES โœจ

so like, a lot of 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), there are some additional files you can use to configure the behavior of specific live-build commands. ๐Ÿ“‚

these files are typically named config/stage or config/stage_helper โ€” where "stage" is, of course, replaced with the name of the stage they belong to, and "helper" with the name of the helper. yes bestie, the naming is literally that straightforward. ๐ŸŽ€

for example, lb_bootstrap_debootstrap uses files named config/bootstrap and config/bootstrap_debootstrap to read the options it will use. see? told you. โœจ

check the man pages of individual commands for the deets 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. spicy. ๐ŸŒถ๏ธ

now here's the important part, so pay attention: live-build will respect environment variables that are present in the context of the shell it's running in. and the priority order is:

  1. if variables can be read from config files, then they override environment variables.
  2. if command line options are used, they override values from config files.
  3. if no value for a given variable can be found and thus is unset, live-build will automatically set it to the default value.

command line > config file > environment variable > default. that's the hierarchy, memorize it. ๐Ÿ‘‘

and in some rare cases, you may want to have different versions of these files for different architectures or distributions. so 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. fancy, right? ๐Ÿ’…

oh and one more thing: 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. yay for comments. ๐Ÿ’ฌ


โœจ FILES โœจ

  • /etc/live/build.conf
  • /etc/live/build.d/

โœจ SEE ALSO โœจ

this program is a part of live-build. ๐Ÿซถ


โœจ HOMEPAGE โœจ

more information about live-build and the Debian Live project can be found on the homepage at <http://live.debian.net/> and in the manual at <http://live.debian.net/manual/>. go read, bestie. ๐Ÿ“–


โœจ BUGS โœจ

found a bug? ๐Ÿ˜ญ bugs can be reported by submitting a bugreport for the live-build package in the Debian 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>. either way, we'll hear you. ๐Ÿ“ฌ


โœจ AUTHOR โœจ

live-build was written by Daniel Baumann <daniel@debian.org> for the Debian project. thank you for your service, legend. ๐Ÿซก๐Ÿ‘‘


and that's the whole page bestie!! ๐ŸŽ€๐Ÿ’–โœจ this one's from live-build version 3.0~a57-1, dated 2012-08-10, served up fresh from the Debian Live Project. now go build something cute. ๐Ÿฆ‹๐ŸŒธ๐Ÿ’