237pages on
this wiki
Add New Page
Add New Page Talk0

These Rescue Disks are all based on exiting Linux Rescue Disk or Mini Distributions. The goal here is to provide a list of out-of-the-box Distributions that can be used as small FileSystem Disk Files for coLinux. These FileSystem Disk Files can then be used to install or setup a full-scale Linux Distribution.

Mandrake Rescue DiskEdit

Copy the file \Mandrake\base\rescue_stage2.bz2 from Mandrake's 10.0 Community CD Disk 1 to coLinux FileSystem folder. Decompress it and use it as a regular co Linux FileSystem Disk File (approx. 25 MB). Example /dev/cobd1.

<Gniarf> nice find. you can find this 'rescue' distribution on most Mandrake mirrors like this one.

You get perl, rpm packages support and - important - loadkeys support (usable in coLinux snapshots past 040619). some partition tools are irrelevant, as usual. There seem to be some minimal network support, which makes sense, since this distribution can do net-install. ifconfig, route, telnet, ftp commands are there.

SuSE 9.1 Rescue DiskEdit

A bit bigger, about 16 Mb gziped, 48 Mb uncompressed. find it on a SuSE mirror like this one and gzip -d it BEFORE you complain you can't use it. yes, the .gz extension is missing.

some network support too, ssh is there, rsync too, not ftp, no perl. looks like those rescue disks are tailored for specific distribution uses.

Fedora Core 2Edit

77 Mb in .iso format., mirror here, extract the file stage2.img any way you want and mount it as cramfs (hint: modules)

create needed /dev/cob devices as described there: LinuxCOBD, so you can mount other filesystem images.

quick setup of the network (for as the coLinux ip) :

  • ifconfig lo
  • ifconfig eth0
  • route add default gateway

then ping outside to test it

(the longer way, if you know what you are doing, not tested :

  • ifconfig eth0 inet down
  • ifconfig eth0 inet up netmask broadcast
  • route add netmask gw dev eth0
  • ifconfig eth0 inet up


Busybox-based Rescue DiskEdit

A much smaller distribution that still allows for editing files and mounting other file systems: full description here

At 17 sept 2009 this rescue disk has no network support, no modprobe (does have insmod), has issues with mknod and cp when copying/making device nodes. It does however have various filesystem creation programs including ext2, ext3 and reiserfs. Also it allows you to edit files using e3vi and pico.

Debian InitrdEdit

Debian has a xen netboot initrd, which includes a few utilities which use an up to date glibc, so most applications can be imported with a little hands-on work.

You can find the netboot image in this path on the mirrors /debian/dists/stable/main/installer-i386/current/images/netboot/xen/initrd.gz Download here

You use it as an initrd image by editing your initrd directive in your config file.


Note: when booting, the initrd will not try to mount the real root filesystem (defined by the root=xxx directive), so your root=xxx directive does not have to contain valid data.

Now boot your colinux, after a short delay you will be prompted to select your language for the debian installation process. By using the menu you can start a Debian installation via the network, but you can also switch to the second or third virtual terminal (Alt+F2 or Alt+F3, use Alt+F1 to switch back to the installer) and after hitting enter you will be dropped in an emergency shell (busybox ash).

You now have a net ready basic ramdisk. It features:

  • a dhcp client (dhclient) and the busybox ip applet for manual interface configuration, but this can also be done more intuitively by using the installer menu.
  • udpkg and wget so you can import packages from the net and build out your rescue disk, which can also be used in a limited but more user friendly way using the installer menu.

The ramdisk, however, makes all changes to the disk volatile. So after a reboot you will have a clean ramdisk to start again. This has it's up- and downsides.

Using the Debian installer to your advantageEdit

The debian installer has a lot of handy udebs which can be selected and installed via the installer menu.

Most flexibility can be gained by switching to expert install mode, this can be done in two ways:

  • You can specify priority=low as a kernel parameter.
  • You can start the installation normally, actually this is medium priority, and press escape until you reach the "Debian installer main menu". Next select the option "Change debconf priority" and select "low".

In expert mode you will have a few more options to choose from.

  • You should set up networking by running the "Detect network hardware" and "Configure the network" menu items.
  • Then you can continue with choosing a mirror for package download by using the "Choose a mirror of the Debian archive" menu item.

Now the most interesting step comes, by using the "Download installer components" in expert mode you can choose some optional installer udebs, among which:

  • network-console: This will install the openssh server udeb which allows you to easily connect to the colinux guest via SSH.
  • openssh-client-udeb: The openssh client utilities, which can be used to scp or sftp something into the ramdisk.

This Debian installer is kept reasonably up to date. And it features a full glibc, which gives you a good chance to successfully deploy regular .deb packages on this ramdisk. For example: To get squashfs-tools to unsquash some image you could use the following command sequence:

# dhclient # or configure using the debian installer "Configure the network" menu item.
# # install dependencies, for squasfs tools running "Download installer components" successfully is sufficient.
# cd /root
# wget
# udpkg --unpack squashfs-tools_4.0-8_i386.deb
# unsquashfs --help

Make editing persistentEdit

It is also possible to copy this initrd to an empty filesystem image. You can then make colinux use it's own initrd (which injects the current modules into the root filesystem) and use debian initrd's programs as the root filesystem.

First create a new root filesystem file in windows:

fsutil file createnew debianfs 104857600

This will create an empty file of 100MB. This is enough for the initrd image, but if you're planning on expanding it a lot it might be wise to choose a larger file.

Now set this as one of your block devices. In this example we will use these configuration directives.


Power up the colinux machine. You should now get the debian install program. To automatically install a few utility programs and their dependencies run the "Download installer components" successfully. At this time switch to a shell terminal (hit Alt+F2).

Now you should have a working mke2fs. Continue with these commands:

mke2fs /dev/hda

You can now reboot linux to cleanup the ramdisk. This will allow you to copy the clean initrd ramdisk. You can also skip this step and get a few extra utilities thrown in the persistent installer image.


If you chose to reboot then switch to a shell terminal (hit Alt+F2), when the menu is displayed again. Whichever choice you made above you should continue with the following command.

mount /dev/hda /mnt

Run this little script to copy all important directories to the new ext2 fs.

for thisFile in /*; do
case "$thisFile" in
"/dev"|"/mnt"|"/proc"|"/sys") mkdir "/mnt$thisFile" ;;
*) cp -a $thisFile /mnt/ ;;

Note: Mounting initrd under /initrd and then issue cp -a /initrd/* /mnt/ would be elegant. But I can't figure out how to mount initrd over there. If I could get this to work it would bypass the changes to the ramdisk made by the "Download installer components" step.

For safety create some basic device nodes in /mnt/dev. Udev will add devices as necessary on bootup.

cd /mnt/dev
mknod -m 622 console c 5 1
mknod -m 666 null c 1 3
mknod -m 444 zero c 1 5
mknod -m 644 random c 1 8
mknod -m 644 urandom c 1 9
mknod -m 666 tty c 5 0
mkdir pts
ln -s /proc/self/fd
ln -s fd/0 stdin
ln -s fd/1 stdout
ln -s fd/2 stderr

Now you're almost done, only thing left is to disable the pivot_root to the ramdisk during the early boot process. For this you need to edit init (# nano /mnt/sbin/init). Look for a section that looks like:

echo "Setting up filesystem, please wait ..."

mount /proc
umount initrd 2>/dev/null || true
if mount -t tmpfs -o size=100M tmpfs /mnt ; then
elif mount -t shm shm mnt; then
        mount -t ramfs ramfs /mnt
umount /proc
cp -a $(ls -1 / | grep -v '\(lost+found\|mnt\|proc\)') /mnt
cd /mnt
pivot_root . initrd
mkdir -p /proc
mount /proc
mkdir -p /sys
mount /sys

Change it to:

echo "Setting up filesystem, please wait ..."

#mount /proc
#umount initrd 2>/dev/null || true
#if mount -t tmpfs -o size=100M tmpfs /mnt ; then
#       :
#elif mount -t shm shm mnt; then
#       :
#       mount -t ramfs ramfs /mnt
#umount /proc
#cp -a $(ls -1 / | grep -v '\(lost+found\|mnt\|proc\)') /mnt
#cd /mnt
#pivot_root . initrd
mkdir -p /proc
mount /proc
mkdir -p /sys
mount /sys

mount -o remount,rw /

Now power off the colinux machine, and change the initrd directive to the standard colinux initrd. And point the root directive to the root filesystem.


Power it on and your changes to the filesystem should be persistent.

MassTranslated on 25 Dec 2004.

MassTranslated on Sun Apr 23 17:36:25 UTC 2006

Also on Fandom

Random Wiki