Defcon:Blog Keklkakl blog blag

4Mar/090

Installing Debian Lenny on the Cobalt RaQ4/RaQ550

My preferred method for installing Debian (or any compatible OS really) onto the RaQ, is the "out-of-body" installation. This requires an i386 - i586 (fairly old) PC with IDE/ATA available as a boot controller. There is quite a bit of "post install cleanup" to do compared to a standard Debian install, so read on...

Prerequisites

  • You need a farily working RaQ, i.e. no defective parts (except the odd fan)
  • Tested and verified Serial console. The RaQ uses the following communiations settings on the first serial port (ttyS0, marked with a single dot): RS/232, 115200, 8, N, 1
  • Working IDA/ATA harddrive.
  • Working internet connection.
  • Patience

Upgrade the ROM

Follow the guide I published earlier...

Evaluate a netboot setup.

There are guides out there that tell you to do a bare-metal install of Debian onto a RaQ using netboot. I have not had any success using this method whatsoever, as there are always some kind of snag. However I do use Debian Etch Netboot to recover a RaQ if I install a kernel that does not boot. So personally, I would recommend setting up a netboot option as a functional “rescue”-solution. For a great guide to netbooting a RaQ, see http://www.timntina.com/debian-sarge-cobalt-install

But really, it can wait until you have completed your first install…

Install Debian Lenny on a different computer

As previously mentioned, I have had problems doing netboot installs, so I prefer the “out-of-body”-install method. This simply implies:

  • Remove the harddrive from the RaQ
  • Mount the harddrive in an x86 PC
  • Install Debian Lenny as you normally would.

It is important to note that wile doing the install, make sure you install on the device /dev/hda, and that all files needed to bring the system up (not counting /usr, /var and /home) needs to live on /dev/hda1.

Outside of that, install as you see fit. I prefer to install the base system only, perhaps including standard.

Get a Cobalt kernel

The kernel that ships with Debian Lenny is not suitable for booting the RaQ. So before you remove the harddrive from the “donor-PC”, you need to install a new kernel. This can be done by installing prebuilt kernel packages, or by compiling a kernel yourself.

The best approach((never trust a file from a public Wiki…)) is to compile the kernel yourself. My howto for Debian-compiling a kernel for the RaQ is located here: TODO: LINK TO COMPILE DOC

If you follow the kernel compile howto, the last steps of that is installing the kernel.

Alternatively, download my kernel-packages:

The tar-balls contain: kernel-image deb, kernel-headers deb, stripped & bzipped vmlinux file.

If you download the prebuilt files, install the deb packages, copy the vmlinux.bz2 from the tarball to /boot. Then link up the System.map and initrd.img that the .deb install created:

dpkg -i linux-image-2.6.26.8-cobalt3_1_i386.deb
dpkg -i linux-headers-2.6.26.8-cobalt3_1_i386.deb
ln -s /boot/System.map-2.6.26.8-cobalt3 /boot/System.map
ln -s /boot/initrd.img-2.6.26.8-cobalt3 /boot/initrd.img

Prepare for RaQ mounting...

Update inittab to start a getty on ttyS0, and _not_ start VT's. The last part is simply because the RaQ does not have a KVM-console. We leave the first console enabled, however, in case you need to remove the drive and mount it in a “donor-PC” again later.

sed -e '/^#T0:23/s/9600/115200/' \
    -e '/^#T0:23/s/#T0/T0/' -i /etc/inittab
sed -e '/getty 38400 tty/s/^/#/' -i /etc/inittab
sed -e '/^#1:2345:respawn/s/#//' -i /etc/inittab

Also, make sure /etc/securetty includes the line “ttyS0” to allow root logging in over serial console.

Debian uses udev and hotplug since, well, a long time now. It is set up to assign each ethernet adaper a separate device name, based on the MAC-address and/or the kernel-driver used. So, to allow our RaQ to use the ethernet device names eth0 and eth1 on first boot, we have to remove the udev-definitions of “persistent devicenames”. The definition for persistent net device names are located in /etc/udev/rules.d/70-persistent-net.rules. Edit this file by hand, or use the following sed line:

 sed -e '/^SUBSYSTEM=="net".*eth/D' -e '/^$/D' \
     -e '/^# PCI device/D' \
     -e '/^$/D' \
     -i /etc/udev/rules.d/70-persistent-net.rules

Last, not related to serial console, but related to getting access to your RaQ, make sure you install SSHd:

apt-get install openssh-server

Boot installation on RaQ

After installing Debian Lenny on a different computer, and performing the preparations, it is time to move the disk to the RaQ itself.

After mounting the drive, make sure you hook up a serial console, so that you can view the boot process, and log in interactively to the RaQ itself.

Make the LCD do something

This secion will show up as soon as I have something to show ;-)

Links

RaQ hardware

Install guides

"Known good" Kernels

In case of problems with kernel-compile and trouble-shooting, the following are kernels that can be “popped in place” to test..

The basis for the kernel-patching done in this walkthrough is at:

Filed under: Systems administration Tagged as: Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


Trackbacks are disabled.