martes, 11 de agosto de 2009

Installing openSuSE: grub complaining on a hardware RAID


I'm a Kubuntu/Debian user (and intend to stay that way), however a few days ago I set myself to install openSuSE 11.1 (LiveCD based on KDE4). The thing is that this particular box has a hardware RAID set up.

0f:08.0 RAID bus controller: Hewlett-Packard Company Smart Array E200i (SAS Controller)

I had no problem installing other OSs on top of it so I thought it was going to be painless.... It wasn't.

As a matter of fact I didn't have too much of a problem (and the installation was pretty fast, congratulations for openSuSE for that).... except for the fact that when the installer was about to finish, on the part where grub was going to be installed on the MBR, it would fail miserably with an error 21. It would complain about not being able to find a certain device. I was given the option to retry installing grub without going though the whole installation procedure all over again. I tried a couple more times with a few option changes but I always got the same error.

I then went into grub (by calling grub as root on the terminal) to see what I could do. I tried to change the root device, but when I wrote root and then hit the tab key to see the available devices, no one showed up. Could it be because I'm working on a live CD and some of those partitions were just created?

I went openSuSE's IRC channel on and the guys there were very interested on my problem. After a while someone (sorry not to remember your nick, man.... or woman... but thanks for showing me the light) told me that it could be a problem with grub's file.

I went there (/boot/grub/ of the running LiveCD instance) and only saw a line for (fd0). It looks like it's missing all the partitions I have set up on the disk after the installation (Important Notice: see the update to the article at the end). I write a mapping of all the devices that I needed (including the HD I was using and all the other partitions with other operating systems) with what I would guess partitions would be to grub. Something like:

/dev/cciss/c0d0 (hd0)
/dev/cciss/c0d0p1 (hd0,0)
/dev/cciss/c0d0p2 (hd0,1)

And so on. Saved the file then I went into grub again. root tab..... and there are all the partitions I needed. So I do the grub installation procedure which ends up being like this:

root (hd0,4)
setup (hd0)

(hd0,4) would be the / partition I was installing on (with /boot not in a separate partition). Remember I was trying to install it on the MBR, that's why I say (hd0) on the setup command. I get the output that the installation went right and I'm done.... almost. I mount my root partition (that would be / of the just installed openSuSE) and see the content of its /boot/grub/ and it's the same old broken one. I replace it with the one I edited on the running LiveCD. Unmount, just in case so the installer (which is still waiting for me) doesn't go crazy.

Then I let the installer finish telling it that I don't want to install any bootloader. It finishes installing. Reboot, I get openSuSE running.

Hope you don't need to apply this but... it could be a little too late. Otherwise, why would you be reading this, right? Good luck anyway!

I'm looking at the file on my box at home with Kubuntu kinky... I mean, karmic (that openSuSE box was at work) and I see that the only line there is a mapping to the hard drive and not all the partitions of my box:

(hd0) /dev/hda

So perhaps I just needed to add a line to map /dev/cciss/c0d0 to (hd0) and that would be it... but it could also be because karmic is using grub2, so keep that in mind when you try. In any case, I'm not going to retry doing the installation just to figure it out.

5 comentarios:

  1. I am openSUSE user, and quite frankly, 11.1 is full of problems. 11.0, even if much older, is far better.
    I am now on Linux Mint, waiting for 11.2 to come out. As I see, there are HUGE improvements.

  2. Este comentario ha sido eliminado por un administrador del blog.

  3. Este comentario ha sido eliminado por un administrador del blog.

  4. I want to install OpenSUSE, thanks already to guide how to install.

  5. Mucho gusto Carmona,

    Your post helped me a lot. I was facing a similar problem, installing opensuse 12.1 on one HP Proliant DL380G5. The box carries two disks in a raid 0+1 schema, so the file system see them as /dev/cciss/c0d0 device. During the installation, I figured out (after trying many times, and them read post) that the /boot/grub/ content was wrong. Installation process was trying to assign the hard drive to a wrong device, and sometimes to the second partition of the right device. This always yeld me error 21 or error 5 in grub intallation. Once I put just the following line in the file, everything was good!

    (hd0) /dev/cciss/c0d0