[[PageOutline]] = debirf = `debirf` is a system that will create diskless, all-in-ram images (kernel and initramfs) that boot entirely into ram and leave the user in a fully functional Debian system. `debirf` has a module architecture that allows users to easily customize the images that they build, using simple shell scripts, to do basically anything the Debian can do. Some included examples "profiles" are: * minimal: very minimal system with no extras * rescue: includes a full complement of system repair utilities, including `mdadm`, `lvm2`, `testdisk`, `foremost`, etc * xkiosk: run a simple clean GUI web browser for public-access web browsing Debirf is made publicly available under the [http://www.gnu.org/copyleft/gpl.html GNU General Public License]. == limitations == At the moment, stock debirf installs require the host machine to have ~256MB of RAM. We'd like to make at least some of the debirf images capable of running in much less than that. Installing a custom kernel could cut that down completely (at the cost of specializing the image to specific hardware), as could pruning much of the documentation. Systems with no documentation suck, but if you've got an embedded target (for example) there may be no other options. == history == `debirf` was inspired by [http://www.tux.org/pub/people/kent-robotti/looplinux/rip/ RIP]. CMRG has used RIP frequently. However, we have occasionally found ourselves booted into RIP, not having a package that we needed, and wishing we could just 'apt-get' it. We realized that if we could make an all-in-ram version of Debian, we would have everything we need. We began by using the [http://www.tux.org/pub/people/kent-robotti/looplinux/rip/inittmpfs-2.6.14.diff.gz kernel patch] that Kent Robotti (RIP developer) uses to allow for overmounting a tmpfs on the initial rootfs, before the initramfs is unpacked. The drawback of this was that it required re-compiling the kernel, which is probably a significant barrier to widespread adoption. We ultimately wanted to be able to use stock Debian kernels. The kernel patch (which we're no longer using) appears to have been [http://lkml.org/lkml/2005/8/24/231 initially authored] by Chris Wedgwood. As of kernel 2.6, `debirf` would boot entirely with a stock, un-patched Debian kernel into the rootfs. This has a couple of limitations due to the fact that the rootfs is a heavily simplified filesystem that doesn't handle everything that you might expect. The benefit of running from the rootfs, though, is that it's "stupid simple". The initrd is nothing more than a gzip'd cpio (initramfs) of the desired filesystem, with a couple of simple tweaks. The initial executed script is just /sbin/init. We feel that this is really how it should be. No crazy init gymnastics to get a root filesystem mounted. The initrd ''is'' the root filesystem. But the drawbacks of running from a rootfs were frustrating. ''We should document the specific failures/difficulties we've seen with a straight rootfs'' So currently, we wrap the root filesystem cpio archive in another very simple cpio archive nest with a couple of other functions to allow mounting the desired cpio archive on a tmpfs, instead of the rootfs. This creates a fully usable system with just a tiny bit of extra bloat. We're still working on how to pair that down as much as possible. == qemu == Debirf works great with [http://www.qemu.org/ qemu]. It's also a great way to test your debirf builds before deployment. See the "qemu" package in Debian. Here's an example command to run a Debirf iso under qemu: {{{ qemu -m 256 -serial stdio -net nic -net user -cdrom /path/to/debirf-minimal_squeeze_2.6.30-1-686.iso }}} == xen == [wiki:dkg] did some experimentation with [wiki:debirf/xen debirf under xen], and seemed to have some success with it. == similar projects == * [http://www.emdebian.org/ emdebian] - very ambitious project to make Debian suitable for embedded systems * [http://www.tux.org/pub/people/kent-robotti/looplinux/rip/ Recovery Is Possible] - a GNU/Linux distro (slackware-based) designed to run from read-only media loaded initially into RAM. * [http://gate-bunker.p6.msu.ru/~berk/router.html Debian Router] - by Vadim Berkgaut is another debian-based system designed to run only from RAM. == download == [http://packages.qa.debian.org/debirf Debirf is of course available in Debian.] The latest version of `debirf` is also available from CMRG in [http://cmrg.fifthhorseman.net/debian/pool/cereal/d/debirf/ source or .deb form], or from the [http://cmrg.fifthhorseman.net/debian/ CMRG apt repository] by adding the following to your /etc/apt/sources.list: {{{ deb http://cmrg.fifthhorseman.net/debian unstable debirf deb-src http://cmrg.fifthhorseman.net/debian unstable debirf }}} Note: this repository is signed by [wiki:dkg]'s [http://fifthhorseman.net/dkg.gpg GPG key]. You can [wiki:apt/importing-keys import this key for apt] if you want cryptographic verification of these packages. Anonymous, read-only access to the source is available via svn: {{{ svn co http://cmrg.fifthhorseman.net/svn/trunk/debirf }}} You can also [http://cmrg.fifthhorseman.net/browser/trunk/debirf browse the source on this site]. You can also download pre-built a debirf disk rescue kernel and initramfs (or the same system packaged in an ISO) for i386-compatible computers at http://cmrg.mayfirst.org/debirf. There are also torrents available from the same location. == irc == Question? Comments? join us #debirf on the irc.oftc.net network. == open issues == [[TicketQuery(component=debirf&status=new|assigned|reopened&order=priority)]]