DEBIRF(1)
π DEBIRF π
okay bestie, sit DOWN, because we're talking about debirf from the User Commands section and honestly? she's iconic. it's giving "DEBian on Initial Ram Filesystem" and she's about to run an entire Debian system from RAM like it's nothing. no cap. π§β¨
πΈ NAME πΈ
debirf β build an initrd to boot a full Debian system entirely from RAM
π SYNOPSIS π
debirf <subcommand> [options] [args]
β¨ DESCRIPTION β¨
so. debirf β short for DEBian on Initial Ram Filesystem, which is a chef's kiss acronym β is a whole set of tools whose entire job is creating and preparing a kernel plus an initial ram filesystem that can run a full-blown Debian environment entirely from RAM. like. the whole thing. in your memory. living there. rent free. π
debirf has various subcommands (go look at SUBCOMMANDS below, babe) and they all act on a specified debirf profile (that's the PROFILES section, keep up π«Ά).
the debirf system is outlined at:
http://cmrg.fifthhorseman.net/wiki/debirf
π¦ EXAMPLES π¦
make a stock debirf rescue image using the default settings:
$ tar xzf /usr/share/doc/debirf/example-profiles/rescue.tgz
$ debirf make rescue
make a debirf rescue image, but specify the mirror AND a local HTTP proxy, because you're fancy like that:
$ tar xzf /usr/share/doc/debirf/example-profiles/rescue.tgz
$ DEBIRF_MIRROR=http://ftp.debian.org/debian http_proxy=http://127.0.0.1:3128/ debirf make rescue
π SUBCOMMANDS π
debirf takes various subcommands, and here's the whole lineup:
make [options] PROFILEβ create a debirf system based on profile PROFILE. this is the big one, bestie: it creates the root for the profile, runs all the modules on that root, and then generates the kernel image (peep KERNEL) and the debirf initramfs. this subcommand takes various options too (see OPTIONS). multitasking queen. πenter PROFILEβ chroot into the root of profile PROFILE, with the full profile environment. it's giving "step inside, make yourself at home".makeiso PROFILEβ create a bootable CD-ROM image from the kernel and initramfs in PROFILE. this needs a bootloader to be available, no bootloader no party. ifgrub-mkrescue(in thegrub-commonpackage on debian) is available, it will be used. otherwise,isolinuxis used if it's available. you can use theDEBIRF_ISO_BOOTLOADERenvironment variable to specify a preference manually (see below, i got you π).helpβ output a brief usage summary. short, sweet, to the point.
π OPTIONS π
heads up, these are for the make subcommand only. nobody else gets them.
-c,--check-varsβ check variables before make-n,--newβ create new root, even if old one exists-o,--overwriteβ debootstrap on top of old root if it exists-s,--skipβ skip debootstrap step altogether if old root exists-r,--root-buildβ use real chroot to build instead of fakechroot (requires superuser privileges orCAP_SYS_CHROOT)-w,--no-warningβ skip superuser warning-i,--initrd-onlyβ remake initramfs from existing root (skip debootstrap and module stages)-k,--kernel-deb=KERNELβ install KERNEL.deb, instead of default kernel
π PROFILES π
a debirf profile is a directory containing a debirf.conf config file and a modules sub-directory (see MODULES). that's it. that's the profile. simple, clean, main character energy.
π PACKAGE INCLUDES/EXCLUDES π
if the profile directory includes a packages file, it is interpreted as a list of packages to include/exclude during the debootstrap stage. packages should be specified one per line, with a + prefix to indicate inclusion during debootstrap, or a - prefix to indicate exclusion. yes bestie, one per line. we're organized in this house.
π§ MODULES π§
modules are used to configure the debirf system, and can be used to extend the capabilities of debirf. modules are bash shell scripts that are executed in alpha-numeric order by run-parts in a chroot in the debirf root during the module stage of the debirf build. the module stage is right after the debirf debootstrap stage, and right before the initramfs archive is created. all shell variables beginning with "DEBIRF_", including those defined in the debirf.conf file, are available to the modules. so like, share the wealth, yk? π
modules may specify packages to be included/excluded during the debootstrap stage with special #DEBIRF_PACKAGE> comments anywhere in the module. lines beginning with #DEBIRF_PACKAGE>+ specify packages to include, and lines beginning with #DEBIRF_PACKAGE>- indicate packages to exclude. only ONE package should be specified per comment line (no spaces, i'm serious). so for instance, the lines:
#DEBIRF_PACKAGE>+emacs
#DEBIRF_PACKAGE>+ed
#DEBIRF_PACKAGE>-nano
would include the packages emacs and ed, and would exclude the package nano. (rip nano, you served your purpose π«‘)
NOTE: some modules are more important to the proper functioning of debirf than others, and the ordering of modules is important. some modules may depend on certain other modules having already been, or not yet been, run. for instance, the module that cleans the debirf apt cache (z1_clean_root) should be the last module run at the end of the module stage. do not skip this note. do not pass go. do not collect $200. π¨
β KERNEL β
the debirf install-kernel module will try to pick the most up-to-date kernel for the suite you are installing (versions 2.6 only), with the arch determined by the kernel running on the host build system. she picks the freshest one, periodt.
π FUNCTIONS π
a set of pre-defined bash shell functions are available to the modules to fasciliate configuring the debirf system (yes, "fasciliate", it's in the original and we respect it π):
debirf_exec <command>β execute <command> within debirf root (DEBIRF_ROOT) with chroot.msg <message>β output a message to standard out during the build process.failure <message> <exit-code>β cause debirf script to fail with <exit-code>, and <message> to stderr.debirf_info_sh <message>β write one line ofshcode to thedebirf.infofile on the debirf root.debirf_info_comment <message>β write one line of comment to thedebirf.infofile on the debirf root.
π ENVIRONMENT π
the following environment variables are used by debirf (and yes, every single one of them matters):
DEBIRF_LABELβ debirf label (default:debirf)DEBIRF_BUILDDβ where to build the debirf (default:./)DEBIRF_ARCHβ architecture to build (default is the architecture of the build machine)DEBIRF_SUITEβ suite to build from (default determined fromlsb_release, otherwise"sid")DEBIRF_DISTROβ distro for suite (default determined fromlsb_release, otherwise"debian")DEBIRF_MIRRORβ mirror to pull suite (default determined byDEBIRF_DISTRO)DEBIRF_KEYRINGβ keyring to verify debootstrap (default determined byDEBIRF_DISTRO)DEBIRF_KERNEL_FLAVORβ the flavor of kernel debirf should install. supply everything from a typical debian package name after the version number. e.g.486,vserver-686-bigmem,openvz-amd64. (default chosen based on currently-running kernel)DEBIRF_ISO_BOOTLOADERβ whether to use"grub"or"isolinux"as the El Torito bootloader for debirfmakeiso. if not specified,"grub"is the default.
π¦ FILES π¦
$DEBIRF_PROFILE/debirf.confβ debirf profile configuration file. contains values for the various debirf environment variables (see ENVIRONMENT). variables specified in thedebirf.confoverride those specified on the command line. yes, the config file wins the argument. queen behavior. π$DEBIRF_ROOT/etc/debirf/debirf.infoβ file that stores various information about the debirf build. this is a bash-sourceable file.
πΈ AUTHOR πΈ
written by Jameson Rollins and Daniel Kahn Gillmor. legends, honestly.
π BUGS π
debirf does not work as a non-privileged user across different versions of libc. in particular, this means that you probably won't be able to build an image from a different version of the operating system than you're using without building as root. (see http://bugs.debian.org/650242)
bestie this one is real. if you try to be cute about it as a normal user across libc versions, it will not be cute back. build as root or perish. π
please report bugs in debirf via the debian BTS: http://bugs.debian.org/
π«Ά COPYRIGHT π«Ά
Copyright Β© 2007-2011 Jameson Rollins and Daniel Kahn Gillmor
this is free software. you may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. there is NO WARRANTY, to the extent permitted by law. (no warranty, no promises, no refunds, that's the deal π
)
π SEE ALSO π
/usr/share/doc/debirf/README, debootstrap(8), fakechroot(1)
and that's the whole vibe, bestie π this was debirf version 0.32, dating all the way back to Dec 2011 β a true vintage icon, still serving. go build something that lives entirely in RAM. slay. β¨ππ¦
π¦ where this page comes from
- ubuntu jammy: debirf 0.38 Β· GPL-3.0-or-later
- ubuntu noble: debirf 0.38 Β· 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