Debirf – Build a kernel and initrd to run Debian from RAM

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.

The kernel and initramfs pair created by debirf can be used for a myriad of purposes, from quick-and-easy system repair to diskless thin clients. The kernel and initrd can be placed in your system boot partition, burnt to read-only media, or supplied by a netboot server.
The debirf tools use a module architecture which allows you to customize debirf for any possible purpose by specifying what components are included in the generated image.

Install debirf in Debian

#apt-get install debirf

Documentation

$ mkdir ~/debirf

$ cd ~/debirf

$ tar xzf /usr/share/doc/debirf/example-profiles/xkiosk.tgz

$ debirf make xkiosk

Debirf Configuration

Have a look at debirf//debirf.conf. There you will find some possibility of customization e.g. mirror and distro (Lenny, Sid) Also of interest would be debirf//modules.

If you’re booted to Lenny you should automatically get the default Lenny kernel. I was booted into sidux and decided to use the sidux kernel so I utilised the -k switch.

debirf make -k /var/cache/apt/archives/linux-image-2.6.28-0.slh.10-sidux-686_2.6.28-10_i386.deb xkiosk

Now debirf will proceed to bootstrap Debian and build an initrd.

debirf: modules complete.
debirf: creating debirf initrd (‘nested’)…
222 blocks
2529 blocks
292 blocks
debirf: creating rootfs.cgz…
637062 blocks
debirf: creating wrapper cgz…
271538 blocks
debirf: debirf initrd created.
debirf: kernel: xkiosk/vmlinuz-2.6.28-0.slh.10-sidux-686
debirf: initrd: xkiosk/debirf-xkiosk_lenny_2.6.28-0.slh.10-sidux-686.cgz

Now you just add it to menu.lst

title Debirf w/ sidux kernel
kernel /home/admin/debirf/xkiosk/vmlinuz-2.6.28-0.slh.10-sidux-686 vga=791
initrd /home/admin/debirf/xkiosk/debirf-xkiosk_lenny_2.6.28-0.slh.10-sidux-686.cgz

Notes:-

There is no root in this menu.lst entry as it is unnecessary.

There is no root password on the minimal build.

You will be prompted for a root password on the xkiosk build.

Set password for debirf-xkiosk superuser:
Enter new UNIX password:
Retype new UNIX password:

That’s it. Reboot your debian system

Sponsored Link

Leave a comment

Your email address will not be published. Required fields are marked *