Follow these instructions at your own risk. This worked perfectly on my Cobalt RaQ4, but may not work on all machines. I cannot be held responsible for your machine.
Click here for updates since my install.
I don't always check this page for comments, so please, leave your comments & then contact me using my contact page so I know to come by & respond.
The process below is how I installed Debian 3.1 Sarge on my Cobalt RaQ4. I used various sources of information to do this, but the most help came from the Debian Cobalt HOWTO that I found on the Internet. At the time this article was written, the site was down, so I've reposted the original on my site. I'll simply copy most parts of the original document because it is written SO well. So if you compare the two, you'll see a lot of similarities, but I've added/removed/changed the things that didn't work for me. I'll also include lessons learned throughout this process. Mostly things I wanted the cobalt to do, but it just won't do it. Many thanks to Tim Hockin, a former Cobalt engineer who has continued hacking the Cobalt kernel long after Sun backed out. Without his initial work on the Cobalt ROM Kernels, there's no way we could have been using these machines with a modern OS. So...let's get started. Shall we?
Installing Debian on the x86-based Cobalt Server Appliances is not too difficult. It essentially requires doing a set of steps twice. The first part is to set up an nfsroot enviromnent for netbooting the cobalt off of. The second part is to install Debian locally on the Appliance in question. Performing all of this is made easy by using Debian's "debootstrap" utility. It is assumed that the following procedure is being done on a Debian system.
The machine in which we perform the setup on and make an nfsroot area on will be referred to as the "server". The machine in which we do the final installation will be known as the "cobalt".
This procedure has been made to work on the following systems: RaQ3, RaQ4, RaQ XTR, RaQ 550, and the Qube3.
The one assumption is that you have a crossover serial cable with a female db9 connector on it to talk to the cobalt's serial console.
In this part, we'll set up an nfsroot enviromnent for netbooting the cobalt off of. Once this is done, it can be used to install as many cobalt appliances as desired.
1) Make sure "debootstrap" & "nfs-user-server" are installed on the server.
apt-get install debootstrap nfs-user-server
2) Install the beginnings of an nfsroot area on the server
debootstrap --arch i386 sarge /nfsroot-x86 http://ftp.us.debian.org/debian/
The "sarge" part is the release of debian that's desired. The installation must go into /nfsroot-x86... and then pick your favorite Debian mirror.
3) Edit /nfsroot-x86/etc/inittab
There are six lines for tty1 through tty6 starting with
1:2345:respawn:/sbin/getty 38400 tty1
Comment these out, and uncomment the line for ttyS0 and change to 115200 bps (from 9600) to look like:
T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100
4) Edit /nfsroot-x86/etc/securetty
Add "ttyS0" to the list so that root can log in on it. I didn't have to do this, but you may.
5) Copy /etc/apt/sources.list to /nfsroot-x86/etc/apt/sources.list
It should have something like:
deb http://ftp.us.debian.org/debian/ sarge main contrib non-free
deb-src http://ftp.us.debian.org/debian/ sarge main contrib non-free
deb http://non-us.debian.org/debian-non-US sarge/non-US main contrib non-free
deb-src http://non-us.debian.org/debian-non-US sarge/non-US main contrib non-free
deb http://security.debian.org/ sarge/updates main
6) Chroot into /nfsroot-x86
Simple "chroot /nfsroot-x86"... this will be to set up additional packages in the installation setup.
chroot /nfsroot-x86
7) Install whatever you need in the nfsroot
apt-get update
apt-get install debootstrap alien vim
Install whatever tools will be helpful for the next portion of the installation. This can be done during the next portion as well, so no big deal.
8) Exit the chroot
9) Create a /nfsroot-x86/etc/fstab
It'll look something like:
192.168.0.2:/nfsroot-x86 / nfs defaults 0 0
proc /proc proc defaults 0 0
Where you substitute out the "192.168.0.2" for the server's address.
10) NFS export /nfsroot-x86
echo '/nfsroot-x86 192.168.0.2/255.255.255.0(rw,no_root_squash)' >> /etc/exports
/etc/init.d/nfs-user-server restart
11) Install a DHCP server on the network
apt-get install dhcp3-server
12) Configure your DHCP server (/etc/dhcp3/dhcpd.conf)
Declare a subnet in /etc/dhcp3/dhcpd.conf. Should look similar to the following:
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option domain-name-servers 192.168.0.1;
option domain-name "my.domain.com";
option routers 192.168.0.1;
default-lease-time 600;
max-lease-time 7200;
}
Make an entry that looks like the following to your /etc/dhcp3/dhcpd.conf.
host cobalt {
hardware ethernet 00:00:00:00:00:00;
fixed-address 192.168.0.3;
option routers 192.168.0.1;
next-server 192.168.0.2;
option root-path "/nfsroot-x86";
option host-name "cobalt";
}
Where 00:47:e6:05:74:60 is the MAC/Hardware address of eth0 on the cobalt,192.168.0.1 is the address of your router or other gateway device, 192.168.0.2 is the IP address of the server, & 192.168.0.3 is the IP address of the cobalt. If you don't already have a working OS on the cobalt, you'll have to tail syslog on the server when the cobalt tries to boot from the network to find the MAC address of your cobalt. If not you can use ifconfig to get it.
13) Restart your DHCP server
/etc/init.d/dhcp3-server restart
In this part, we'll install Debian locally on the Appliance(s) in question.
1) Upgrade the cobalt to the latest rom
Instructions for this are at
ftp://ftp-eng.cobalt.com/pub/users/thockin/2.4
2) Boot from the network
During bootup, hit the spacebar to go to the rom menu (not the boot monitor -- 'q' out of it if you get there). At the prompt, typ "bfn". This should hopefully get the system completely booted up with a login prompt. Don't forget that if you haven't gotten the cobalt's hardware address & set it up in dhcpd.conf, then you'll have to tail the syslog to get it. Log in as root.
3) Parition and format the local disks as desired.
This will mostly occur with the "fdisk" and "mke2fs" commands. Use "mkswap" to initialize the swap partition. Consult their manpages for more information. I used "cfdisk", but that's all personal preference. Both will work. One very important thing to note here. You can pretty much partition the disk however you want, but /boot & / must both be on /dev/hda1. The reason is that (1) the cobalt boot rom will load the rom kernel, then switch to the kernel on disk. It will only look on /dev/hda1 for it. So...if you plan on upgrading to a newer kernel (either a premade rpm or a cobalt patch to a debian kernel), then the kernel must be found here. (2) The rom by default has /dev/hda1 as the location of /. You can set that at boot by typing (set_params "root=/dev/hda2") in the boot menu of the rom. The only problem is that it doesn't save it. The next time the machine goes through the rom boot sequence, it'll forget that you told it where / was. There may be a way to set this permanently, however I haven't found it. If you know...please let me know. I'd love to be able to use ext3 on my / partition.
4) Mount the disks under /mnt as you've parititioned them.
For example, if you made a separate parition for /home, mount it under /mnt/home after you've mounted root in /mnt, and so forth.
mount -t ext2 /dev/hda1 /mnt
5) Put the initial Debian installation on the local disks
debootstrap --arch i386 sarge /mnt http://ftp.us.debian.org/debian/
The "sarge" part is the release of debian that's desired. The installation must go into /mnt... and then pick your favorite Debian mirror.
6) Copy files into /mnt/etc
Files to copy over are /etc/inittab, /etc/securetty and /etc/apt/sources.list
7) Edit /etc/network/interfaces
Should look something like this:
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
address 192.168.0.3
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
8) Edit /mnt/etc/fstab
Make an fstab describing how you want the disks to be mounted when you eventually boot from the disks. An example would look like:
/dev/hda1 / ext2 defaults,errors=remount-ro 0 1
/dev/hda2 none swap sw 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
9) Edit /etc/hosts
Should look something like this:
127.0.0.1 localhost.localdomain
192.168.0.3 cobalt.yourdomain.com cobalt
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
10) Copy applicable kernel files onto the disks
You can either take a cobalt kernel rpm and run "alien" on it, or grab one of the kernels from http://cobalt.iceblink.org/debian/. At the time this article was written, the site was down. I will try to repost them on my site soon. In the meantime, try http://imbezol.criticaldamage.com/linux/cobalt/. If you plan on upgrading your hard drive, you should really take a look at http://www.cobaltfaqs.com/index.php/Using_ATA133_Hard_Disks_w/RAQ4_hardware_and_RAQ550_OS
I like to copy the files into /mnt/root
11) Install the kernel
First, chroot into /mnt. Then dpkg -i the kernel .deb that you want. Make sure that you have a /boot/vmlinux.bz2 file or link, as that's what the rom will look for at boot time. If you plan on doing this step & upgrading to a newer kernel, you may have to load the ethernet drivers as a module. If you system comes up & eth0 is not configured, then add "eepro100" to /etc/modules to get it to load the ethernet module at bootup.
12) Finish up
You can apt-get install anything you want now & run base-config to setup the system. Be sure to exit the chroot... and MAKE SURE TO UNMOUNT THE LOCAL DISKS BEFORE YOU REBOOT.
That should just about do it. Enjoy your new Debian machine.
Sources:
http://cobalt.iceblink.org/debian/
http://www.cobaltfaqs.com/
http://imbezol.criticaldamage.com/linux/cobalt/
ftp://ftp-eng.cobalt.com/pub/users/thockin/2.4
http://hugues.lepesant.com/stuff/cobalt/
http://hugues.lepesant.com/ (translated to English)
My cobalt has been running flawlessly since I finished my install. It performs perfectly for what I wanted to use it for. Being a K6-III 450, I didn't expect it to do a ton. I just wanted a dev environment to work in for this site as well as a couple others that I run. I also wanted a dev/testing area for some of the coding I play around with. I got the Cobalt front panel working using the lcd-panelutils package & directions that I found at http://hugues.lepesant.com/index.php?paged=2. I tweaked that utility to make the panel show exactly what I wanted it to. Using awk I was able to scrape the CPU temperature from /proc/cpuinfo, so I included the temperature on the front panel. I've got a CRON job that updates the panel every 5 minutes with the new temperature. Click here if you'd like to see a picture of my Cobalt front panel temperature monitor. If you'd like to know how I've done this...let me know and I'll post it.
Currently I've got MySQL v.4.1.20, PHP v.4.3.4, Apache v.2.2.3, dhcp3-server debian package, ntp-server debian package, djbdns (tinydns/dnscache) installed & running on it. I use it mostly for a development & testing area for my websites (including this one). I also use the MySQL instance for various data analysis tasks. My favorite thing about having a dedicated Debian machine is having an area to work on my coding skills, testing & experimenting with my own code. Currently the one utility that I use the most is one that will e-mail me when my home public IP address changes so that I can update my DNS records...even if I'm away from home. That way I always have access to it externally. It's nothing special...but very helpful to me...which is who I ultimately wrote it for anyway. :) The machine runs surprisingly cool. The hottest I've seen it run is around 47 or 48 degrees Celsius...and that was on a hot day without air conditioning while bzipping some files...pretty much pegging the CPU. It also runs my DHCP & DNS (internal & external) for my local network.
Issues? Surprisingly...not really anything big. I did, however, chase my tail for a while trying to figure out why Apache was delivering zero length files for static files, but dynamically generated contect was fine. Turns out, I was getting an error testing it with wget that said "Connection closed at byte 0. Retrying." After recompiling httpd 2.2.3, compiling & installing httpd 2.2.0, again recompiling httpd 2.2.3 with different options & then finally doing some research on the error...I finally found out that I had to turn off the EnableSendfile directive in httpd.conf. Aparently...Sendfile is a feature of some kernels that allow the file to be transferred using the kernel rather than httpd, lowing the dependence on the CPU for that process. The 2.4 Cobalt kernel that I'm using obviously doesn't support that. So I uncommented "EnableSendfile off" in httpd.conf & presto...it works.
I hope everyone has as much luck with their install as I have. I'm really enjoying having this machane. It's the perfect server for my setup & fits perfectly under my monitor shelf on my desk.
Well, it's about time for another update. I've upgraded quite a few things on this machine. First off, I'm now running Apache 2.2.3, PHP 5.2.0, & MySQL 5.0.27 (all except for MySQL compiled from source). I've also started trying to keep the kernel up to date after seeing Jim Tuttle's instructions on compiling the kernel on these Cobalts. You can find that along with a few other things on his Ubuntu Dapper on Qube3 HOWTO. Thanks for the help Jim. My RaQ4 is now running linux-2.6.22.6. I've also written my own HOWTO that's based on his with a few changes & more suited for me. You can find that in my Compiling Linux Kernel v.2.6.22.6 for Debian Cobalt x86 Machines HOWTO. I also upgraded to Debian Etch (v.4.0) when it was released. This I did simply with an apt-get dist-upgrade. Nothing fancy this time. It went smoothly. And that's when I decided to upgrade the rest of my LAMP components since I had a new Debian version & new kernel. I've also found an additional use for it. With a little help from an IPTABLES front end called Firestarter (a Debian package in the apt repository) I've turned it into a router/firewall. The hardest part was that Firestarter is a GUI application, but I tried it & and it works fine without one. I DID, however, have to install it on my Debian laptop & play with settings so I'd know how the config files were setup. Currently my internal interface is a USB NIC & I want to change that. I've got an eepro100 sitting here on my desk, I just have to get "un-lazy" & put it in. That's all the updates I have now, I'll be sure to update again in the future.