* * * * *

                 Postmortem on a Cobalt RaQ4 install/upgrade

Obligatory Cobalt RaQ Links

* Debian sarge on Cobalt [1]
* Cobalt—LinuxMIPS [2]
* The Cobalt Hacking FAQ (Frequently Asked Questions) [3]
* [2.4 kernel and firmware upgrade files] [4]
* Installing Red Hat Linux on the Cobalt Qube 3 Appliance [5]
* Install Debian on an x86-based Cobalt Server Appliance [6]
* [Installing IPChains on a RaQ server] [7]
* NetBSD/cobalt [8]
* HOWTO install Debian on a Qube2 or RaQ2 [9]


Oddly enough, installing Linux on a Cobalt RaQ 1 or 2 is easier than
installing Linux on a Cobalt RaQ 3 or 4, dispite the 1/2 not being an Intel
based machine.

But yesterday, as I was lying face down on my bloodied keyboard [10], I
suddenly realized that Smirk was telling me something. “Sean,” he said. “you
don't have to get Apache running on the firewall.”

I had gotten close yesterday—with Wlofie's help the night before, we were
able to recover one of the RaQ4s with it's initial distribution, and I had
gotten a Linux 2.4 kernel and iptables installed and running. It was only
getting Apache running that I did a horrible mistake: I mounted the working
drive in my workstation! That right there was a monumental mistake.

You see, the Cobalt RaQ firmware (which is responsible for loading Linux off
the disk) only supports an ext2 revision 0 file system and the fact of my
just mounting said drive (for write access no less) “fixed” it so that it was
no longer a revision 0 file system. In fact, I'm not sure what exactly
happened, but the upshot of mounting a filesystem formatted under Linux 2.2
onto a Linux 2.6 system munged every symbolic link on the file system. Move
the drive back to the Cobalt RaQ, and attempt to load Apache, I kept getting
stuff like: Apache: libfoo.so not found. I then check to see what's up:

> -rw-r--r-- 1 root root 120184 Mar 28 2000  libfoo.a
> lrwxrwxrwx 1 root root     11 Jul 14 14:44 libfoo.so
> -rw-r--r-- 1 root root 120528 Mar 28 2000  libfoo.so.1
>

Well, libfoo.so is there, but it should look like:

> -rw-r--r-- 1 root root 120184 Mar 28 2000  libfoo.a
> lrwxrwxrwx 1 root root     11 Jul 14 14:44 libfoo.so -> libfoo.so.1
> -rw-r--r-- 1 root root 120528 Mar 28 2000  libfoo.so.1
>

And it wasn't just one or two symbolic links, but (at least in /usr/lib)
every symbolic link was borked in this manner.

What I did next only made things worse (resulted in the “kernel panic:
counldn't find init” error) so I won't bother going into detail about that.

No, what eventually worked was the following:

* One Cobalt RaQ 3 or 4 that can still boot of its drive
* One Cobalt RaQ 3 or 4 Rescue CD (Compact Disc)
* One PC (A) with
* * One (1) CD-ROM (Read Only Medium) drive
* * One (1) Harddrive
* * One (1) 3Com-509B network card (there are three or four others that work,
   but I don't have that list handy right now)

* One PC (B) with
* * Serial port capable of 115,200bps (bits per second) and 8n1
* * Software capable of running said serial port at said settings

* NULL serial cable
* Network switch
* At least two network cables

 1. Hook NULL serial cable between Cobalt RaQ and PC B
 2. Start serial software on PC B and configure serial port to 115,200bps
    8n1
 3. Hook Cobalt RaQ up to switch using network cable.
 4. Turn on Cobalt RaQ, and make sure it will use the serial console (you
    may have to shove a paper clip into the small hole next to the LCD
    (Liquid Crystal Display) screen as you power up to enable the serial
    console).
 5. Log into the Cobalt RaQ as root.
 6. Configure the network to something usable (ifconfig, route, etc).
 7. Download the latest version of the firmware (2.10 works fine in both
    RaQ3s and RaQ4s).
 8. Install new firmware.
 9. Shutdown Cobalt RaQ.
10. Hook up PC A to network.
11. Install rescue CD into CD-ROM.
12. Reboot PC A from rescue CD.
13. Accept license agreement.
14. Turn on Cobalt RaQ holding down the “S” button, select “boot net”
    option.
15. Play Solitare, Tetris, or eat lunch for the next half hour or so.
16. Power cycle Cobalt RaQ.
17. Power cycle Cobalt RaQ when it asks.
18. Log into Cobalt RaQ as root.
19. Run passwd and install a root password.
20. Download special Linux 2.4 kernel for Cobalt RaQ.
21. Install Linux 2.4 kernel and kernel modules.
22. Reboot.
23. Reconfigure as required.

That last step, “reconfigure as required” may take a while. It may include
stuff like downloading the source for such packages as ssh [11], Apache [12],
MySQL [13], extracting the files, and doing the magical incantation:

> ./configure
> make
> make install
>

a few times over the next few days (since I had already done this step before
a few months ago, I could just copy the existing binaries).

[1] http://www.cyrius.com/debian/cobalt/sarge.html
[2] http://www.linux-mips.org/wiki/index.php/Cobalt
[3] http://www.hockin.org/~thockin/cobalt-hack-faq.html
[4] ftp://ftp-eng.cobalt.com/pub/users/thockin/2.4
[5] http://www.gurulabs.com/rhl-cobalt-howto/
[6] http://cobalt.iceblink.org/debian/debian-cobalt-howto.txt
[7] http://www.webhostingtalk.com/archive/thread/35324-1.html
[8] http://www.netbsd.org/Ports/cobalt/
[9] http://www.zinkwazi.com/tools/qube2/1.html
[10] gopher://gopher.conman.org/0Phlog:2005/07/14.1
[11] http://www.openssh.org/
[12] http://httpd.apache.org/
[13] http://www.mysql.org/

Email author at [email protected]