My installation fiasco involved having to install Gentoo twice. The first time, I hacked away trying to get it to work and rendered my system unusable. The second time, using what I learned from the first attempt, went pretty well.
Anyway, the point of this post is to share my trials and errors with my fellow Gentoo fanatics. So lets begin...
Pre Installation Step
You will have to use Compaq's Smart Start software to setup the array to your liking. Since I already had my array the way that I wanted it, I skipped this step.
Installation Steps
1) Pop in the Gentoo install CD and boot away. Run through the login, probe your PCI bus, install your NIC module and any other modules you need (cciss - see next step). I was booting off the array so I only needed the array module and no other SCSI modules.
2) Because the SmartArray is a hardware based controller, the array(s) will be recognized as a physical hard drive(s) and therefore you will not have to mess with any software RAID settings at all. You will, however, need to load the correct drive module to gain access to the array. For a Compaq SmartArray 5300, this module is cciss. So you will need to load this module: modprobe cciss.
3) Right here is where I started having problems. All documentation on the SA 5300 mentions the /dev tree entries as /dev/cciss/cXdXpX, where the X's stand for controller number, logical disk number, and partition number in that order. The problem is, when I loaded the cciss module, this structure was a bit different. I found the following:
/dev/cciss/disc0/ with sub directories listed below:
disc - Entire disc
This doesn't cause any major problems yet. So run fdisk to create your partitions, keeping in mind that you must reference the above disk: fdisk /dev/cciss/disc0/disc.
4) After you create your partitions, your /dev/cciss/ should look something like this:
/dev/cciss/disc0/ with sub directories listed below:
disc - Entire disc
part1 - My boot partition
part2 - My swap
part3 - My root partition
During the first installation attempt, the /dev/cciss tree actually did not update after I wrote changes and exited fdisk. I couldn't figure out why so I just rebooted. Everything was fine after that.
5) Once your partitions are created, make your folders and mount your volumes just like the Gentoo Install Doc says with one important addition: You MUST make the /dev tree available to your chrooted Gentoo environment otherwise Grub will not recognize any drives on the system (unless of course you have other IDE or SCSI drives). There seems to be more than one way to do this. The way I found to be the easiest was to bind the /dev tree using mount:
mount -o bind /dev /mnt/gentoo/dev
Before I did this, I was pulling my hair out trying to get Grub to find my drive. I was editing my grub.conf, sifting through Grub docs, and trying Grub commands. After all that, I then discovered that I couldn't access /dev/cciss/ because it just wasn't there.
6) After chrooting and modifying any make files, install Gentoo just like normal. When compiling the kernel don't forget to add in support for the array (Block Devices, Compaq 5xxx Array Support) and any file systems you are using.
7) The next trouble point, as I mentioned in step 5 was Grub. But, if you bound /dev to /mnt/gentoo/dev, half of the problems go away. Grub actually recognizes a drive installed on the system. So I ran:
grub> root (hd0,0) - Worked like a champ.
grub> setup (hd0) - Crapped out on me
Grub told me that it was able to find stage1, stage1_5, and stage2. It was also able to embed stage1. When it tried to install the rest, it errorred with something like:
....install /boot/grub/stage1 d (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst
Failed!
Error 22 : No such partition.
This one took some time to get around as well. I almost opted to install Lilo but decided against it since I have begun to like Grub more. The way I got around this problem was to actually manually run the steps that Grub's setup command runs, with one addition:
embed /boot/grub/efs2_stage1_5 (hd0) - success!
install --stage2=/boot/grub/stage2 /boot/grub/stage1 d (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst - success!
For whatever reason (I still haven't quite figured it out) you have to add the stage2 option. After this worked, I exited. I was time to reboot my server and cross my fingers for a login prompt.
9) Kernel Panic! DAMMIT! DAMMIT! My above changes, while needed, had not made a difference in my desired outcome. This one took some time as well. Finally, after carefully reading the kernel panic message, I discovered that it was having some sort of problem accessing my root which I had set to /dev/cciss/disc0/part3 in my Grub menu.lst file. I dug through kernel docs to find a cciss.txt file that talks about adding the appropriate nodes under /dev. There is even a script located in the Documentation/ sub folder of the kernel source tree: mkdev.cciss. I made this baby executeable (chmod 744 mkdev.cciss) and ran it. After checking to see what it created, I noticed that the node structure now matched what I had seen mentioned before: /dev/cciss/cXdXpX. I went back to my menu.lst file and updated the root= parameter according to the new /dev structure and my partition setup:
root=/dev/cciss/c0d0p3.
Rebooted.
10) Hell yea. What I saw before me was a login prompt.
So that is about it. I then went abou emerging any other packages that I wanted.
Yes it was a long post, but if just one person benefits, my job here is done.







