====== Holy Crap, What a Pain in the Ass ====== I'm doing this little helper writeup for anyone else who has ever felt the pain of trying to install Gentoo on a box with the **HP Compaq Smart Array RAID controller**. The machine that this was in was an **HP Proliant DL380 G3**. I've installed Gentoo many, many times on lots of different hardware and I've never had the level of problems that I had with this one. Below, I will detail my woes and workarounds to get this machine up and running with a Gentoo install. ====== Problem 1: Finding a LiveCD to Boot From ====== This was an adventure. Why? I don't know. What I do know is that my 2008.0 Gentoo minimal cd would not boot. I also couldn't boot off of an Ubuntu 8.10 Desktop CD. I was able to boot off of an 8.10 Server CD and install Ubuntu server, but the machine wouldn't boot after that. What I finally found to boot off of that did work was an Ubuntu 8.04 Desktop CD. That worked perfectly. I'm still wondering how I was able to boot off of 8.04 and //not// 8.10... Whatever the case may be, I really didn't think that this part was going to be this difficult, but moving on... ====== Where the Hell is my Hard Drive? ====== I'm not sure about everyone else, but usually expect my first hard drive (or LUN, in this case) to be ''/dev/sda''. Not so with this wonderful RAID card. Your first drive is ''/dev/cciss/c0d0''. I found some good documentation about the ''cciss'' kernel driver at [[http://www.mjmwired.net/kernel/Documentation/cciss.txt]]. When you boot up off of your liveCD, you should be able to now run ''fdisk'' on ''/dev/cciss/c0d0'' and set up your partitions. Note that the first partition on the disk will be ''/dev/cciss/c0d0p1'', not ''/dev/cciss/c0d0a'' or something of that nature. Then just mount those and do the normal install procedure for Gentoo as documented on [[http://gentoo.org]]. ====== Problem 2: Building the Kernel with CCISS support ====== I use ''--menuconfig'' when I build my kernels to make things easy. It could be that I missed it in there, but I didn't see a damn thing even close to an HP/Compaq Smart Array. So, in whatever you are using for your starting kernel config file, find the following: CONFIG_BLK_CPQ_CISS_DA=m This is the driver you need so change the "m", or whatever is after "=", to a "y" and save the config file. This will assure that your kernel has support built right in for the RAID controller. ====== The fstab ====== This should be obvious by now, but make sure you are using the correct partition names in your fstab. You should have something like the following for yours: /dev/cciss/c0d0p1 /boot ext2 noauto,noatime 1 2 /dev/cciss/c0d0p3 / ext3 noatime 0 1 /dev/cciss/c0d0p2 none swap sw 0 0 /dev/cdrom /mnt/cdrom auto noauto,ro 0 0 ====== Problem 3: Grub Doesn't Work ====== There are 2 parts to this one. First, getting grub to install on the drive and then getting grub to find the right root partition ===== Installing Grub to the Boot Drive ===== This messed with me a bit. After some googling, I finally found that you need to manually install grub, and beyond that, create the device reference first. Here is what you do: # grub grub> device (hd0) /dev/cciss/c0d0 grub> root (hd0,0) grub> setup (hd0) grub> quit Ok, grub is installed. Yay! ===== Finding the Correct Root Part. on Boot ===== If you setup your ''/boot/grub/grub.conf'' with the value you would assume for ''root='', you will probably be wrong. Whether you use genkernel or build your kernel manually, the ''root='' portion of your "kernel" line should be ''root=/dev/cciss!c0d0p3'' and **NOT** ''root=/dev/cciss/c0d0p3'' as you would expect. I have no clue why this is, but it seems to be some oddity of the driver. This will cause your bootup to fail if this is not set correctly in ''/boot/grub/grub.conf''. ====== Conclusion ====== Hopefully this is indexed by Google sooner, rather than later, and saves others the pain and unhappiness that I went through installing to my Proliant DL380 G3. Happy serving.