Installing CRUX Linux from iso[]


CRUX under coLinux can't directly boot from ISO. The bootstrapping script needs to have Squashfs compiled in kernel and a native CDROM support.

This describe a way to change the default boot script and boots than from the ISO. The patch File:Crux2.4-ramdisk.patch.xcf changed the boot script to load module Squashfs and fix the problem with detecting cdrom drive.

Downloads and Installing coLinux[]

  • Download the Official ISO Image (247 MB) from CRUX Download
  • Install coLinux 0.7.x or other version where Squashfs was enabled as module or build in kernel. I used the 0.7.2 here.
  • Copy the file vmlinux-modules.tar.gz from coLinux installation (C:\coLinux\) some there have an access under Linux

Hacking boot script under Linux[]

  • Boot a native Linux, or a Live Linux (Knoppix), or run a small Debian coLinux image
  • Download the patch File:Crux2.4-ramdisk.patch.xcf
  • Copy the file /boot/initramfs from inside the CRUX ISO some there in /tmp, or mount the CRUX ISO as loop device, for example
    mount -o loop PathToFile/crux-2.4.iso /mnt
  • Patch the initramfs by doing these steps:
# Script patches the default CRUX CDROM startup to enable booting coLinux directly from ISO
# Change the "PathTo" and run the steps on your prompt line by line

# Create new empty directory
mkdir /tmp/crux-ramdisk
cd /tmp/crux-ramdisk

# Unpack the ramdisk file
cpio --extract --make-directories --no-absolute-filenames < PathToMountedCDROM/boot/initramfs

# Patch the init script for coLinux
patch -p0 < PathToFile/crux2.4-ramdisk.patch

# Remove default (native) modules
rm -rf /tmp/crux-ramdisk/lib/modules/*

# Install coLinux modules
tar xzf PathToCoLinuxFiles/vmlinux-modules.tar.gz

# Create the new ramdisk file
find * | cpio -o -c > /tmp/initramfs.crux2.4-colinux

# Cleanup temp space
rm -rf /tmp/crux-ramdisk
  • Copy the file "/tmp/initramfs.crux2.4-colinux" (5MB) to your Windows or to an USB stick, or what ever you have an Windwos access later

Configure CRUX for coLinux on Windows[]

  • Boot your Windows
  • Create empty files for root filesystem (1GB) and swap (64MB)
fsutil file createnew c:\coLinux\root.fs 1073741824
fsutil file createnew c:\coLinux\swap.fs 67108864
  • Create such file "crux-bootstrap.conf", and change the path if not installed under C:\coLinux:
# Configuration to run CRUX under coLinux

# Standard coLinux kernel (with squashfs=m)

# Root file system (Empty file, 700MB...1GB)

# Swap file (Empty file, 64MB...256MB)

# Downloaded ISO file (unchanged)

# Tell boot script where to find CDROM

# Patched boot script file, added options CDROM_DEVICES DEVICE_SLEEP
# This option *MUST* remove after Linux was installed to boot from hda1 !

# Lets booting 9 seconds faster

# Optional settings
# mem=256
# eth0=slirp,02:00:00:00:00:01
  • Create a Batchfile C:\coLinux\crux.bat with contains:
cd C:\coLinux
colinux-daemon @crux-bootstrap.conf

First boot CRUX from ISO - bootstrapping hda1 under coLinux[]

  • Run the batch C:\coLinux\crux.bat
  • Next steps, you should read the Doc "howto installing CRUX" on the cdrom "/crux/handbook.txt"
  • Skip fdisk and start with
mkfs.ext3 /dev/hda1
mkswap /dev/hda2
  • Skip the step "configure and compile a new kernel". Modules should be copy from inside the initramfs (/lib/modules/*-co-) to your mounted hda1.
    If you are in chroot, must exit the chroot to have access to the modules from initramfs again.
  • ... to be continue ...

Running CRUX[]

  • Remember to remove or comment out the line '"initrd=..." before reboot, to boot CRUX from your created hda1, instead bootstrapping the initrd again and again

Screen first boot from CRUX 2.4 ISO[]


External links[] CRUX main page
CRUX 2.4 CD ISO & coLinux Markus S. first booted it

Mostly of basic ideas comes from Markus S., a German coLinux User. I optimized and written down some hints here -- HenryNe 21:32, 9 January 2008 (UTC)