Install Debian 6.0 Squeeze (2.6.27) on Cobalt Raq 550

This guide explains how to install Debian Squeeze on Raq 550. The instructions are the same for other Debian versions and other Kernel versions.
Boot the Cobalt Raq 550 over Network (hit spacebar at boot time and issue "bfn").
- Raq 550 with ROM/Firmware 2.9.38 is only able to boot Etch and older Debian versions over the network. I think this is a limitation from the ROM Kernel (2.4.16C14_ROM) on the Raq 550.
- Raq 550 with ROM/Firmware 2.10.3-ext3-flat-2M has only a slightly newer ROM First Stage Linux Kernel and shouldnt boot newer versions of Debian than Etch aswell.

Problem: Debian Squeeze requires a Kernel about 2.6.20 to be debootstrapped.
Solution: (a): Install the Cobalt Raq hdd into a running Debian Squeeze machine and install from there. (b): Boot Debian Etch over network with ROM Kernel and install Etch on Cobalt Raq hdd with Kernel 2.6.20 (with this guide). Then boot the Cobalt Raq with Etch (Kernel 2.6.20) and a second hdd, to install Squeeze there.

This guide will not explain how to set up a network boot source-server. Check this article for more help about this topic:

Debian GNU/Linux 4.0 ships with kernel version 2.6.18 for all architectures
Debian GNU/Linux 5.0 ships with kernel version 2.6.26 for all architectures
Debian GNU/Linux 6.0 ships with kernel version 2.6.32 as far as I can tell.

I can confirm the following Debian distributions with Linux Kernel version running with Raq 550 and ROM 2.10.3-ext3-flat-2M:
- Debian GNU/Linux 4.0 Etch, Linux 2.6.16 (can be installed using netboot and ROM Kernel)
- Debian GNU/Linux 4.0 Etch, Linux 2.6.20 (can be installed using netboot and ROM Kernel)
- Debian GNU/Linux 6.0 Squeeze, Linux 2.6.20
- Debian GNU/Linux 6.0 Squeeze, Linux 2.6.27
So far I did not get other Kernels working...


To Flash the Cobalt ROM / firmware to a newer version (e.g. 2.10.3-ext3-glat-2M), boot the Cobalt Raq 550 with Etch over network and issue the following commands. (DO THIS AT YOUR OWN RISK! WHEN GONE WRONG YOUR COBALT RAQ IS ONLY GOOD AS A PAPERWEIGHT!)
Make sure to read the instructions on sourceforge beforehand. Most of the Raq 550's have 2M-flat (check for a line like Flash Bank 0: AMD AM29F016B 2048KB (01:ad) at boot time.) But some might have 1M-flat! (Mine didn't...)

mkdir /opt/ROM
cd /opt/ROM
apt-get install bzip
tar -xf romutils-1.0.tar.bz2
mv cobalt-2.10.3-ext3-2M-flat.rom romutils
cd /opt/ROM/romutils/
# Backup ROM
./flashtool -v -r > cobalt-VERSION-original.rom
# Flash New ROM
./flashtool -v -w cobalt-2.10.3-ext3-2M-flat.rom

Replace VERSION with your current ROM version. If anything goes wrong when flashing the new ROM, go back to the old one.

After flashing the ROM, you might have to reset the correct root and boot devices. This can be done in the boot menu (hit spacebar at boot time). Go into "boot" menu and issue:
set_root_dev hda1
set_boot_dev hda1

Otherwise, errors like this one might appear at boot time:
VFS: Cannot open root device "<NULL>" or unknown-block(9,1)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(9,1)



Now, if your Cobalt Raq is booted over the network, the installation can begin. The steps below assume you have booted a previously installed Debian Etch on /dev/hda1 with Kernel 2.6.20 and a drive /dev/hdc with 2 partitions.

#Format /dev/hdc1 (ext) and /dev/hdc2 (swap)
mke2fs /dev/hdc1
mkswap /dev/hdc2

mount /dev/hdc1 /mnt

# Install newest debootstrap containing squeeze script
cd /opt
dpkg -i debootstrap_1.0.42_all.deb
# In /usr/sbin/debootstrap set DISABLE_KEYRING="1" !

#debootstrap --arch i386 etch /mnt
debootstrap --arch i386 squeeze /mnt

cp /root/.bashrc /mnt/root/
cp /etc/resolv.conf /mnt/etc/
cp /etc/inittab /mnt/etc/
cp /etc/securetty /mnt/etc/
cp /etc/apt/sources.list /mnt/etc/apt/
vi /mnt/etc/apt/sources.list

vi /mnt/etc/network/interfaces

vi /mnt/etc/fstab

vi /mnt/etc/hosts

cd /mnt/dev
mknod hda b 3 0
mknod hda1 b 3 1
mknod hda2 b 3 2
mknod hda3 b 3 3
mknod hda4 b 3 4
mknod hda5 b 3 5
mknod hda6 b 3 6
mknod hda7 b 3 7
mknod hda8 b 3 8
mknod hdb b 3 64
mknod hdb1 b 3 65
mknod hdb2 b 3 66
mknod hdb3 b 3 67
mknod hdb4 b 3 68
mknod hdb5 b 3 69
mknod hdb6 b 3 70
mknod hdb7 b 3 71
mknod hdb8 b 3 72
mknod hdc b 22 0
mknod hdc1 b 22 1
mknod hdc2 b 22 2
mknod hdc3 b 22 3
mknod hdc4 b 22 4
mknod hdc5 b 22 5
mknod hdc6 b 22 6
mknod hdc7 b 22 7
mknod hdc8 b 22 8
mknod -m 660 ttyS0 c 4 64
mknod -m 660 ttyS1 c 4 65

cd /mnt/usr/src/


tar -xzf linux-2.6.27.tar.gz
ln -s linux-2.6.27 linux
ln -s linux-2.6.27 linux-cobalt-2.6.27
ln -s linux-2.6.27 linux-cobalt-2.6.27_clean
#ln -s linux- linux-
apt-get install patch
patch -p0 < linux-cobalt-2.6.27-20081101.jeffw-20120805.lukasp.patch
cp gen_v-minimal.config linux-2.6.27/.config

chroot /mnt
cd /usr/src/linux
apt-get install libncurses5-dev
apt-get install kernel-package
apt-get install libc6-dev

# Go into menuconfig, change values as desired and exit
make menuconfig

make-kpkg clean

make-kpkg --initrd --revision='2012.08.04-1' kernel_image kernel_headers modules_image

# If error with nvram.c
# EDIT: drivers/char/nvram.c: Remove line: # define MACH ATARI

# If error: scripts/mod/sumversion.c:384: error: 'PATH_MAX' undeclared (first use in this function)
# EDIT: scripts/mod/sumversion.c: Add line at top of file: #include <linux/limits.h>

# If error:
# drivers/cobalt/wdt.c:50: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wdt_lock'
# drivers/cobalt/wdt.c: In function 'cobalt_wdt_refresh':
# drivers/cobalt/wdt.c:275: error: 'wdt_lock' undeclared (first use in this function)
# No solution found yet

# If any of the above errors were corrected, go back to "make-kpkg clean"

#mv /usr/src/rpm /mnt/usr/src/

make vmlinux modules modules_install
strip vmlinux
bzip2 -c vmlinux > /boot/vmlinuz-2.6.27.bz2

cd /usr/src/
#mv /lib/modules/2.6.32 /lib/modules/2.6.32.old
dpkg -i linux-image-2.6.27_2012.08.04-1_i386.deb
dpkg -i linux-headers-2.6.27_2012.08.04-1_i386.deb

apt-get update
apt-get -f install
apt-get install kernel-package ssh vim

cd /boot
ln -s vmlinuz-2.6.27.bz2 vmlinux.bz2
#ln -s initrd.img-2.6.27 initrd.img
ln -s

#apt-get install belocs-locales-data belocs-locales-bin
apt-get install locales
dpkg-reconfigure locales
passwd root


#For Debian Squeeze:
rm -rf /mnt/dev/.udev/

If you use a harddrive in multiple Cobalts to distribute linux installations, your LAN's MAC addresses will be saved. Thus, every Cobalt needs a separate configuration in /etc/network/interfaces. For example your machine 1 is eth0/eth1, machine 2 is eth2/eth3. To see which MAC address is associated to which interface, issue:
cat /etc/udev/rules.d/z25_persistent-net.rules

The output for each network interface is in the format:
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:00:00:00:00", NAME="ethX"

If your configuration goes wrong, Lnux will boot without network support, displaying: SIOCSIFADDR: No such device

Kernel Patches Info

I found Kernel Patches in the following places:
- (under "extras -> cobalt-kernel-patches")

With the ones at I got errors (with Etch and Kernel version > 2.6.16) with the owner attribute of sys_raminfo and other structs (e.g. in fans.c). I fixed these errors - the fixed patches are available below. If you use the Parvi patches just commend out some lines:
#Edit fans.c and comment out the following lines:
proc_faninfo->owner = THIS_MODULE;
proc_cfaninfo->owner = THIS_MODULE;
#Edit raminfo.c and comment out the following line:
sys_raminfo->proc->owner = THIS_MODULE;
#Edit powermode.c and comment out the following line:
cobalt_powermode_proc->owner = THIS_MODULE;
admin / Dec 08, 2011
linux-cobalt-2.6.27-20081101.jeffw-20120805.lukasp.patch: Cobalt Kernel Patch for Kernel 2.6.27, with some bug fixes
linux-cobalt-2.6.20-2007021901.illogical-20120805.lukasp.patch: Cobalt Kernel Patch for Kernel 2.6.20, with some bug fixes
linux-cobalt- Cobalt Kernel Patch for Kernel 2.6.16
2004 - 2019 /