|Version 32 (modified by jrollins, 6 years ago) (diff)|
debirf is a system that will created diskless, all-in-ram images (kernel and initramfs) that boot entirely into ram and leaves the user in a functional Debian system.
debirf has a plugin 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:
- rescue - include a full complement of system repair utilities, including mdadm, lvm2, testdisk, foremost, etc
- kiosk - run a simple clean GUI interface for public-access web browsing
Debirf is made publicly available under the GNU General Public License.
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 all but your preferred locale/language, and 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.
debirf was inspired by RIP. CMRG has used RIP frequenty. However, we have occassionally 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 kernel patch* that Kent Robotti (RIP developer) uses to allow for overmounting a tmpfs on the initial initrd. The drawback of this was that it required compiling a kernel from scratch. We ultimately wanted to be able to use stock Debian kernels.
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 this system, 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.
Currently, we wrap the root filesystem cpio archive in another cpio archive with a couple of other functions to allow mounting the desired cpio archive on a tmpfs, instead of the rootfs. The creates a fully usable system with just a little bit of extra bloat. We're still working on how to pair that down as much as possible.
- The patch appears to have been initially authored by Chris Wedgwood.
- Recovery Is Possible, a GNU/Linux distro (slackware-based) designed to run from read-only media loaded initially into RAM.
- Debian Router by Vadim Berkgaut is another debian-based system designed to run only from RAM.
Get the latest version in source or .deb form:
Debirf is also available from the cmrg apt repository. Add 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
dkg is also posting debirf.cgz initramfs files and patched kernels for various architectures up on his site:
- make profile for super-light-weight system
- make debirf ssh module
- benchmark ram consumption of nest post boot
- allow specification of subarch for kernel
- consider discarding the linux-patch-inittmpfs
- do not install aptitude by default
- bootlogd failing to stop (bootlog module)
- canceling debirf with "ctrl-C" breaks fakeroot
- fake ldconfig remains in debirf
- do we really need root "overwrite" option?
- debirf fails to build etch image
- motd link not created properly on systems build in chroot
- debirf should pull the kernel package from /var/cache/apt/archives on the host if it exists
- fuse-utils fails during debirf make
- debirf should be able to use kernel parameters to preconfigure network
- debirf fails to build lenny image on squeeze
- x11-common fails to install in debirf root
- debirf fails to build on systems running nscd