View Full Version : [ubuntu] 64-bit 10.04+RAID1 Install and GRUB woes...

May 21st, 2010, 04:23 PM
I'm having a lot of trouble getting 64-bit 10.04 installed, and it seems to come down to 10.04 not liking my RAID setup. These problems are persistent and replicatable.

My desktop computer is comprised of a year-old Intel motherboard (I don't have the model number handy), a Core2Quad, 4GB RAM, and two identical 500GB Western Digital SATA hard drives. The two HDs are mirrored, and the RAID is controlled via the BIOS. How truly and properly RAID-y this setup is, I couldn't say, but this is the first trouble I've had with it after having first WinXP and then Ubuntu 9.10 on it. I'm not trying to dual-boot or anything unusual.

I've been using 64-bit 9.10 on this machine for a few months now...for the most part, it's worked quite well. Installation itself was quite straightforward and without drama. I had three partitions, a 60GB /, a 435GB /home, and a 8GB swap. I've never had an indication of any problems or incompatibilities with the RAID with 9.10.

A couple of days ago, I downloaded the 64-bit 10.04 ISO, backed up my data to an external drive, and attempted an upgrade. This failed spectacularly (I don't even remember how or why at this point), so I attempted a clean install. This is when the first issue cropped up with partitioning.

During the install, I was allowed to specify my partitions (I wiped out the old ones and created new ones), but when it actually tried to partition and format the RAID, I got an error stating that (paraphrasing here) "Attempt to partition [WDC Mirror] failed." I tried many permutations of partitioning choices, but nothing worked. I did some research, and this was apparently a semi-common problem (though often not with a RAID), and the solution was to do the partitioning with Ubuntu 9.10, and then install 10.04 onto those partitions. Partitioning with the 10.04 LiveCD's Gparted failed, incidently.

This worked, but I mention the partitioning problems because I think it has something in common with my GRUB problems. 10.04 installed, spat out the CD, and rebooted. After the reboot, I got a "GRUB _", and nothing else. This was persistent through all subsequent reinstalls. Research seemed to indicate a problem with the way GRUB was installed, and I tried various fixes that I Google'd up...nothing worked.

One thing to note is that several of the GRUB fixes I tried had me LiveCD in and use fdisk (or something else) to determine what drive/partition GRUB was configured for, or what it SHOULD be configured for. Here's where things get stupid; even though these two drives are set up in BIOS as a RAID1, all the utilities showed information for two distinct drives, instead of one. When I checked the grub.cfg, it uniformly referenced hd(5,1), instead of hd(0,1)...I have no idea where it was pointing to.

One thing that DID work was booting in using a SuperGRUB boot CD...it found the necessary information on the drive(s), and everything booted right up. However, I was unable to use the SuperGRUB CD to repair things or make any determinations about the problem. I tried reinstalling GRUB and forcing a reconfiguration of GRUB, but nothing worked. All I did was bugger GRUB up to a point where even SuperGRUB couldn't help me, and I had to reinstall.

I checked all the RAID settings in the BIOS, and everything seems normal...there's no weird settings in there that I don't understand, it's all quite straightforward. The way that LM9 behaves leads me to question just how proper of a RAID this setup actually is...it'll install and run as if it's a RAID1, but other portions of 10.04 behave as if it's still two separate drives. However, again, 9.10 worked just fine with this same setup.

As a test, I un-RAID'd the drives, and installed 10.04 from scratch onto one of the drives, removing the partition table from the second drive entirely. Everything works like a charm this way...no problems whatsoever, except that I don't have mirrored drives anymore.

Here's the Big Question, then...how can I get 10.04 to work with my RAID or, failing that, what other options do I have for mirroring the drives? A coworker suggested LVM or software RAID, but it all looks like a pain in the butt and seems mildly questionable...I'd like to be more certain of my drive mirroring.

May 22nd, 2010, 12:41 AM
Your problems with raid1 are very simular to problems I and other have had with raid0. Basically gparted is useless with raid systems under 10.04. Partitioning within ubuquity (the installer) works fine up to a point. With raid0 you get a fatal error in the last operation when it tries to setup grub to the default location. That occurs because it cannot write a mbr on sda (when sda is a raid drive).

That said, you can probably write the mbr to /dev/mapper/<yourRaidRootDrv> when you get to the last install step and select advanced options. I have 10.04 installed to a raid0 set and it works fine as long as I don't expect to be able to re-partition the raid drive from within 10.04 (I need to use gparted on an earlier version with to accomplish that).

This link discusses your problem - http://ubuntuforums.org/showthread.php?goto=newpost&t=1453823