Archive

Debian On Ra Q4

The Cobalt RaQ Cobalt_RaQ is a 1U rackmount server product line developed by Cobalt Networks, Inc. which was later purchased by Sun Microsystems featuring a modified Red Hat Linux operating system with a proprietary GUI for server management. Original RaQ systems were equipped with MIPS CPUs but later models used AMD K6-2 chips and then eventually Intel Pentium III CPUs for the final models.

The following guide has only been tested on a Cobalt RaQ4 and may not work on all machines. However it should also work on RaQ 3/XTR/550 and the Qube 3.

Most of this guide is adapated from [http://www.timntina.com/debian-sarge-cobalt-install] and [http://hugues.lepesant.com/?p=9] (Translation: [http://translate.google.com/translate?u=http%3A%2F%2Fhugues.lepesant.com%2F&langpair=fr%7Cen&hl=en&newwindow=1&safe=off&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools]) some sections are directly copied, and others are modified slightly representing on my own expriences of installing Debian on the RaQ4.

Prerequisites

  • A build box for installing the cobalts off, which shall be refered to as the ‘server’.
  • A Cobalt RaQ 3/4/XTR/550 or a Qube 3, which shall be refered to as the ‘cobalt’.

  • A crossover serial cable with a femaile db9 connector.
  • A basic understanding of debian.

Setting up the Server

The server needs to be setup so the cobalt can netboot off of it. It is assumed this server is running a debian based distribution

Setup the basics

1) Install the packages required for the server

 aptitude install dhcp3-server nfs-user-server debootstrap minicom

2) Install an nfsroot on the server

 debootstrap --arch i386 sarge /nfsroot-x86 http://ftp.uk.debian.org/debian/

The ‘sarge’ part is the release of debian that you would like, but /nfsroot-x86 is required.

3) Edit /nfsroot-x86/etc/inittab

There are 6 lines for tty1 to tty6 that look like

 1:2345:respawn:/sbin/getty 38400 tty1 Comment these lines out and uncomment the line for ttyS0 and change the bitrate from 9600 to 115200 to look like:  T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100

4) Edit /nfsroot-x86/etc/securetty

Add ttyS0 to the list, so root can log in on it, if it is not in the list allready.

5) Copy /etc/apt/sources.list to /nfsroot-x86/etc/apt/sources.list

The file should contain something similar to:

deb http://mirror.ox.ac.uk/debian/ sarge main non-free contrib deb-src http://mirror.ox.ac.uk/debian/ sarge main non-free contrib deb http://mirror.ox.ac.uk/debian-non-US sarge/non-US main contrib non-free deb-src http://mirror.ox.ac.uk/debian-non-US sarge/non-US main contrib non-free  deb http://security.debian.org/ stable/updates main contrib non-free

6) Chroot into /nfsroot-x86

 chroot /nfsroot-x86

This is done to setup additional packages

Setup the nfsroot partition

7) Install extra packages

aptitude update aptitude dist-upgrade aptitude debootstrap sudo

If you would like to install the kernel by rpm rather than from source (this method did not work for me) alien is also required, alien also needs /proc to be mounted.

mount /proc aptitude install alien

8) Exit the chroot

9) Create a /nfsroot-x86/etc/fstab

It should look something like:

192.168.1.1:/nfsroot-x86    /      nfs   defaults  0  0 proc                        /proc  proc  defaults  0  0

Substituting 192.168.1.1 for the server’s address.

10) Edit /nfsroot-x86/etc/network/interfaces

I used the second ethernet port (eth1) to connect the cobalt to the main network, as the server and cobalt were connected directly to each other using a crossover cable. If however the cobalt is connected to the main network then eth1 is not required to be setup.

the file should look something like:

 1. This file describes the network interfaces available on your system  1. and how to activate them. For more information, see interfaces(5).   1. The loopback network interface auto lo iface lo inet loopback  auto eth1 iface eth1 inet dhcp

Setup the server’s dhcp and nfs servers

11) Export /nfsroot-x86

echo '/nfsroot-x86    192.168.1.0/255.255.255.0(rw,no_root_squash)' >> /etc/exports /etc/init.d/nfs-user-server restart

12) Configure the DHCP server

Make an entry that looks like the following to the same config file.

subnet 192.168.1.0 netmask 255.255.255.0 { {{{         host cobalt {                 hardware ethernet 00:47:e6:05:74:60;                 fixed-address 192.168.1.2;                 next-server 192.168.1.1;                 option root-path "/nfsroot-x86";                 option host-name "cobalt";         } }

}}}

The value of the fixed-address will be the IP address of your cobalt machine, next-server should refer to the IP of the NFS server. You will also need the MAC address of your cobalt for the hardware ethernet value. 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/dhcp3-server restart

Talk to the cobalt

14) Use minicom to talk to cobalt

 minicom

Press Ctrl-A Z then P, I and then Enter. This should set up the serial connection to the correct speed.

Setting up the Cobalt

Configure the Cobalt

1) Upgrade the cobalt to the latest ROM

I personally didnt update the cobalt but if you need to instructions 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 thr rom menu. At the prompt type bfn. This should hopefully get the system completely booted up with a login prompt. Don’t forget that if you have not obtained 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.

If you can not login as root (for some reason the cobalt i had could only mount the NFS partition as read-only, and would not login as root) you can use a seperate login with sudo.

From the server, chroot into /nfsroot-x86 and type:

aptitude install sudo adduser <user>

Add the newly created user to /etc/sudoers:

<user> ALL=(ALL) ALL

Login using the new user, and type sudo su and enter in your own password to become root.

Prepare the system

3) Partition and format the local disks as desired

I used cfdisk to setup the partitions on /dev/hda with hda1 being / and hda5 a small 256mb swap partition, then mke2fs and mkswap to format the drive as ext2 (required) and the swap partition respectivly. fdisk and can also be used. 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.

cfdisk /dev/hda mke2fs /dev/hda1 mkswap /dev/hda5

4) Mount the disks under /mnt as you have partitioned them

For example, if you have made seperate partitions for /home etc, mount it under /mnt/home after you have mounted root in /mnt.

 mount -t ext2 /dev/hda2 /mnt

5) Put the intial Debian installation on the local disks

Using the same debootstrap command as above, this will setup the final state of the cobalt

 debootstrap --arch i386 sarge /mnt http://ftp.uk.debian.org/debian/

The installation must go in /mnt and sarge is your favoured release.

6) Copy files into /mnt/etc

Copy the files: /etc/inittab, /etc/securetty and /etc/apt/sources.list

7) Edit /mnt/etc/network/interfaces

the file should look something like:

 1. This file describes the network interfaces available on your system  1. and how to activate them. For more information, see interfaces(5).   1. The loopback network interface auto lo iface lo inet loopback   1. The primary network interface auto eth0 iface eth0 inet static {{{         address 192.168.1.2         netmask 255.255.255.0         network 192.168.1.0         broadcast 192.168.1.255         gateway 192.168.1.1

}}}

8) Edit /mnt/etc/fstab

Make an fstab describing how you want the disks to be mounted when you boot off the disks, mine looks like:

/dev/hda1      /         ext2    defaults,errors=remount-ro  0  1 /dev/hda5      none      swap    sw                          0  0 proc           /proc     proc    defaults                    0  0 tmpfs          /dev/shm  tmpfs   defaults                    0  0

9) Chroot into /mnt

Setup /mnt

10) Setup mount with some basic commands

base-config aptitude update aptitude dist-upgrade aptitude install sudo

Install the kernel

There are 2 methods from that i have found for setting up the kernel, one uses alien and rpm files to create the kernel, and the other is Compiling from source.

1. Compiling the kernel from source

More detailed information can be found LinuxHints/KernelBuilding and LinuxHints/KernelCompiling. A basic set of instructions will be run through to install the kernel.

1) Install packages

 aptitude install libncurses5-dev kernel-package gcc make links

2) Download the kernel

To install the kernel a patch is required to be run. This patch was made for 2.4.32, the only place i could find this kernel in a short space of time is in [ftp.free.fr].

cd /usr/src  wget ftp://ftp.free.fr/pub/linux/kernel/v2.4/linux-2.4.32.tar.gz tar zxvf linux-2.4.32.tar.gz

3) Patch the kernel

Download the following patches

wget http://hugues.lepesant.com/stuff/cobalt/cobalt-2.4.32.patch  wget http://hugues.lepesant.com/stuff/cobalt/conf_cobalt-[[RaqXXX_2432]]

If you are running a RaQ 3/3i/4 or Qube 3 then use 34 in place of XXX Otherwise if you are running a RaQ XTR/550 then use 550

4) Configuration and compilation of the kernel

ln -s linux-2.4.32 linux patch -p 0 < cobalt-2.4.32.patch cp conf_cobalt-[[RaqXXX_2432]] linux/.config cd linux make menuconfig make-kpkg clean make-kpkg --revision=cobalt.1 kernel_image make-kpkg modules_image

5) Installation of the kernel

cd /usr/src dpkg -i kernel-image-2.4.32_cobalt.1_i386.deb cd /boot ln -sf System.map-2.4.32 System.map

6) Reboot

Exit out of chroot and reboot the system, it should now boot into the linux kernel on the HDD’s.

2. Installing from rpm source

1) Download the kernel

Look through [http://imbezol.criticaldamage.com/linux/cobalt/thockin/] and find the kernel required (gen_III for RaQ 3/4 and Qube 3) and (gen_V for RaQ XTR/550) make sure to read the README.gen_III or README.gen_V files. I downloaded the files to /root when chrooted.

2) Create the .deb file

To create a .deb file from an rpm use the following command, this may take some time.

 alien <kernel.rpm>

3) Install the kernel

 dpkg -i <kernel.deb>

Make sure there is a /boot/vmlinux.bz2 file or link.

(Note this method did not work for me so i would suggest using the first method)

Leave a Reply