Linux Software RAID on Macs

From SifWiki

Jump to: navigation, search

It's actually painfully simple, but it took me some digging to find so I hope it saves someone else the trouble.

The basic problem is that setting a partition type of fd (Linux Autodetect), does not work on Macs (specifically OldWorld in my experience but I'd imagine other variations too?). The first way round this I thought of was to create an initrd (Initial Ram Disk), but in the past this has seemed messy and I didn't want to get into that.

It turns out it's quite simple, make sure you've compiled all the necessary drivers into the kernel, not as modules.

Use a kernel command line something like the following:

root=/dev/md0 udev nodevfs md=0,/dev/hda6,/dev/hdb2,/dev/hdg2 boot=/dev/md0

Substitute your device names where appropriate and you should be able to get the kernel to assemble the raid device on boot and then mount it to continue with init. Using this method I managed to get a Apple G3/300 (Beige OldWorld) Macintosh booting off a RAID5 array of 3 drives, 2 of which were hosted on a Highpoint HPT371 PCI card.