Hairy installation
2 minutes read

I think I have done one of the most hairy installations of Debian ever today. The situation: a host with a MegaRAID card, remotely, behind a firewall, to get Debian installed. No serial console.

First, you ssh through the firewall. Then you ssh to a machine on the internal network and run rdesktop to another internal server. From that rdesktop session, you run Internet Explorer and connect to the internal management card on the machine to be installed and get a text console through a Java applet.

Ok, so now you have a connection to the machine to be installed. It has its Debian CD in the CD-ROM player. Reboot the system, boot it, using video=vga16:off, since the text console doesn’t handle the frame buffer at all. Once it’s up, we chose Norwegian keyboard. Of course the installer doesn’t find the megaraid card. Out to a shell, and because of the choosing of a Norwegian keyboard, / is nowhere to be seen. After searching a bit around and mounting /dev/hda at /dev/a we did recover the slash. So, after discovering that being able to unpack the 5.7MB big drivers.tgz somewhere, we decide to reboot with a different ramdisk_size. 64MB is good.

So, reboot, repeat the procedure, though this time with American keyboard instead, since it actually works (and is a norwegian keyboard; something is clearly wrong somewhere, but sometimes two wrongs make a right). mkfs.ext2 /dev/ram1, mount it at /tmp2, unpack /cdrom/dists/stable/main/disks/current/bf2.4/drivers.tgz to /tmp2, unpack modules.tgz in there again, insmod the megaraid module (which is in /tmp2/lib/modules/2.4.18-bf2.4/drivers/kernel/scsi/megaraid.o), do the install.

So far, so good, I thought. Of course I was wrong. The kernel installed didn’t have initrd with the megaraid driver on, nor were it compiled in, so back to square one: boot with huge ramdisk, unpack drivers.tgz from the cd, unpack modules.tgz, insmod megaraid, mount /dev/sda5 /target. Then, chroot into /target, fix up sources.list, install a kernel, make sure the lilo config is correct, then umount everything and reboot again. Woo, it works.

Back to posts