LIVE-BUILD(7)
๐ 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 withcdebootstrap(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 withdebootstrap(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:
- if variables can be read from config files, then they override environment variables.
- 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-buildwill 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. ๐ฆ๐ธ๐
๐ฆ where this page comes from
- ubuntu jammy: live-build 3.0~a57-1ubuntu41 ยท GPL-3.0-or-later
- ubuntu jammy: live-build 3.0~a57-1ubuntu41.22.04.1 ยท GPL-3.0-or-later
- ubuntu noble: live-build 3.0~a57-1ubuntu49 ยท GPL-3.0-or-later
- ubuntu noble: live-build 3.0~a57-1ubuntu49.1 ยท GPL-3.0-or-later
- ubuntu questing: live-build 3.0~a57-1ubuntu52
- ubuntu resolute: live-build 3.0~a57-1ubuntu54 ยท GPL-3.0-or-later
- ubuntu stonking: live-build 3.0~a57-1ubuntu56 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms