I've compiled my own kernels for as long as I can remember. I do so for almost any box I use, rather than running distro supplied kernels. I think this dates back to to the days when that was just what you did, but it also ties in with the fact I often want to run the latest and greatest (eg for laptop device hardware support).

One of the things I've always avoided is the initrd. I've never really seen the point; I compile my root device driver into the kernel and thus it all works. I've seen some suggestions that the in kernel RAID array detection code isn't really being maintained and that in the future it'll require userland tools to configure a RAID array, so I've been a bit worried that I'll eventually have to learn about initrds.

In fact, that day came this weekend. My large IDE disk is dying and I decided I needed something to replace it so I could have a proper poke. So I bought a pair of SATA disks and found a cheap Highpoint RocketRaid 1520 (don't buy one of these; I mistakenly thought they were better than the good old SI 3112, but they're not. And if anyone knows of a cheap (sub £30) SATA-II PCI card then let me know. I don't think they exist.)

The RocketRaid is basically just a HPT372A (hpt366 driver in Linux) with software RAID on top. Previously I've ignored such things and just used the normal Linux RAID support, but I thought I'd give this a try with the aid of dmraid. This can read several different ATARAID formats and uses device-mapper to map the drives appropriately to keep Linux happy.

So, I install dmraid and it happily finds the RAID array and configures it all up (though I end up with the wonderfully named /dev/mapper/hpt37x_dabhghbgeg which is a bit unwiedly). All good. Except, of course, that I have to run some userland to get the RAID array up, which means I need an initrd to sort it all out if I want / on it. And I do.

These days I want initramfs rather than initrd (and I needed to remember to set CONFIG_BLK_DEV_INITRD=y in my kernel config as it's needed for initramfs or an initrd). I found the initramfs-tools package and installed it, then had a poke around for info on getting dmraid working with it. Debian bug #367661 discusses such things and I've attached the patch I used from Ubuntu to the bug report.

Then I did, as root, update-initramfs -k -c -v and it magically created a /boot/initrd.img- Passed that as the initrd in grub and it all magically works; dmraid fires up from the initramfs, the kernel gets to mount the RAID partition as / (and the other partitions as swap and lvm) and it's all good.

Except the fact one of the disks seems to have been damaged in transit and eBuyer are being slow about issuing an RMA number. Oh, and the fact the RocketRaid sucks and only seems to get 15MB/s or so. Meh. The initramfs stuff is all happy though, and a lot easier than I expected.