Contents

ramusb.igz: a script to build a initramfs suitable to boot Linux from removable media

Usually, to boot Linux we must define a kernel image and a mount point for root "/". At boot time, if kernel not syncing root partition, often we can have a "kernel panic". With ramusb.igz we can avoid this error, because this system performs several tries to mount root partition and, if boot will fail, open a text console. Ramusb.igz can also boot USB stick or other removable media.

How it works

init in ramusb.igz works with principle of "Signature File", in other words search a file inside all disks. File name is user defined; these are the operations:

1) looks for the "Signature File" on disks HDs

2) if not found then looks on disks SDs and|or if "Signature" is|was found then:

a) if "Signature" is a file then try to mount it as loop device and chroot inside

b) if "Signature" is a file ending with .igz then try to use it as a initramfs

c) if "Signature" is a directory then try to chroot to this directory

3) If cannot find anything try booting the device passed as root=

4) If all else fails then asks

5) If also asking there is nothing to do, then open a text console (so it is not the last word)

Build script

The script to build ramusb.igz run in Slackware and creates files using /usr/share/mkinitrd/initrd-tree.tar.gz as base system (Note: it build a 64bit system if you work in Slackware64). Copy source below in a file named "makeramusb-slack.sh" and exec the script as root:

# chmod 755 makeramusb-slack.sh
# ./makeramusb-slack.sh

It create a work tree. The RAMDISK "ramusb.igz" will be located inside "work" directory. Now, copy ramusb.igz in your boot partition, ex: "/boot".

Latest version is 0.7.1 Changelog:

A bug solved in missing "/lib" creation

Check if busybox is a static binary (in 13.1 and 13.37 isn't)

0.6

if you set boot=your_initramfs.igz then load this file (must end with .igz), uncompress and chroot to this system

if your_initramfs.igz was load from removable media (ex. CD-ROM), then also eject media