debirf - build an initrd to boot a full Debian system entirely from RAM
debirf <subcommand> [options] [args]
debirf (DEBian on Initial Ram Filesystem) is a set of tools designed to
create and prepare a kernel and initial ram filesystem that can run a
full-blown Debian environment entirely from RAM.
debirf has various subcommands (see SUBCOMMANDS) which act on a
specified debirf profile (see PROFILES).
The debirf system is outlined at:
debirf takes various subcommands:
make [options] PROFILE
Create a debirf system based on profile PROFILE. This will
create the root for the profile, run all modules on the root,
and then generate the kernel image (see KERNEL) and debirf
initramfs. This subcommand takes various options (see OPTIONS).
Chroot into root of profile PROFILE, with full profile
Create a bootable CD-ROM image from the kernel and initramfs in
PROFILE. This requires a bootloader to be available. If grub-
mkrescue (in the grub-common package on debian) is available, it
will be used. Otherwise, isolinux (from the syslinux-common
package) is used if it is available. You may use the
DEBIRF_ISO_BOOTLOADER environment variable to specify a
preference manually (see below).
help Output a brief usage summary.
OPTIONS (for make subcommand only)
check variables before make
create new root, even if old one exists
debootstrap on top of old root if it exists
skip debootstrap step altogether if old root exists
use real chroot to build instead of fakechroot (requires
superuser privileges or CAP_SYS_CHROOT)
skip superuser warning
remake initramfs from existing root (skip debootstrap and module
install KERNEL .deb, instead of default kernel
A debirf profile is a directory containing a debirf.conf config file
and a modules sub-directory (see 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 begining with
"DEBIRF_", including those defined in the debirf.conf file, are
available to the modules.
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
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.
A set of pre-defined bash shell functions are available to the modules
to fasciliate configuring the debirf system:
Execute <command> within debirf root (DEBIRF_ROOT) with chroot.
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
Write one line of sh code to the debirf.info file on the debirf
Write one line of comment to the debirf.info file on the debirf
The following environment variables are used by debirf:
debirf label (default: debirf)
where to build the debirf (default: ./)
architecture to build (default is the architecture of the build
suite to build from (default "karmic" on Ubuntu, "squeeze"
distro for suite (default determined by DEBIRF_SUITE)
mirror to pull suite (default determined by DEBIRF_DISTRO)
keyring to verify debootstrap (default determined by
whether to use "grub" or "isolinux" as the El Torito bootloader
for debirf makeiso. if not specified, "grub" is the default.
Debirf profile configuration file. Contains values for the
various debirf environment variables (see ENVIRONMENT).
Variables specified in the debirf.conf override those specified
on the command line.
File that stores various information about the debirf build.
This is a bash-sourceable file.
Written by Jameson Rollins and Daniel Kahn Gillmor.
Report bugs to <email@example.com>.
Copyright © 2007 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.