Sep 12, 2006

Gentoo 2006.1

I installed gentoo on my workstation over the weekend. I had failed to do so before because of the BIOS raid system I use. I have been trying to get any linux distro to install to the raid array for quite some time now, and have now had success. It's surprisingly stable, and I've had no file system corruptions yet even though everyone in the community says I'm walking on a tightrope (They are correct too, you'll see why lol.). At the worst I suspect that I could loose my root filesystem, which isn't a big deal because I keep my important files on a non-raid drive. Since it's a raid-0, I have a greater chance of loosing all of my data because if just one drive fails in the array, I loose it all. I'm using WD Raptors for the drives. As you can probably guess I'm a speed junky ;-P. Here's how I did it:

I use x86 instead of AMD64 just in case things weren't there quite yet with AMD64... I will do attempt an AMD64 install this weekend.

After booting the livecd, it failed to detect any of my arrays. I tried using the options doscsi and dodmraid to try and help, but still no luck. If you are like me, and this happens to you, all is not lost! Download a staticly linked version of dmraid that can detect your array. The one I used is located here. Download that to some directory and execute it with "./dmraid -ay". You need to rename the file to "dmraid" if you want to use that EXACT command, otherwise just use the full filename (DHER! If I REALLY had to tell you this, then you should NOT be doing any of this!!!). Now, your devices should show up under /dev/mapper. Use those and do a normal install, but stop when you get to compiling your kernel. Make sure your kernel has support for device mapper, and support for your drive chipsets. I used genkernel simply because I'm lazy, and it wasn't all that difficult(like i'd really change anything anyway... oh man i really REALLY need to put that latest uberfast new memory mapping algorithm that i've never ever tested and even thought up while i was drunk into i!). I did a "genkernel --dmraid --menuconfig all". I always use menuconfig so that I can tweak some options. Once genkernel finishes, we are not done yet. We need to edit the initramfs that genkernel created. The dmraid version that genkernel uses won't detect our array, so we have to use a version that does. Rename your initramfs first so the extraction utility doesn't have problems with it. Extract the initramfs to a directory with the utility found here. The command you should use is "./convinitrd -g -d initramfswhatever.cpio.gz". Go into the directory that was created from the extraction. Everything in there should look like it's the root of a filesystem. Go into /sbin, and replace the dmraid in there with the version you either downloaded or obtained by other means earlier that detects your array. Finally, repackage the initramfs. You should be done. Just complete installation like normal and you are all set. It's really not that difficult, just not documented very well.

So, to summarize:
If you are having problems getting your BIOS raid to detect when trying to install to it in Gentoo (probably other distros as well):

1. Before installation, download or compile a staticly linked version of dmraid that successfully detects your array.
2. Run before installation to detect your array, and then use the detected devices for your installation.
3. After your kernel is compiled, edit the initramfs that is created by injecting your version of dmraid.

0 Comments:

Post a Comment

<< Home