Comment 87 for bug 8497

I am not sure whether this bug is supposed to have been fixed or not, but it is still present in the main release of 8.04 and I can document pretty much exactly what happens.

I have an Asus P4C800-E motherboard with 2 identical 160 GB Samsung disks (D1 & D2) attached to the main SATA controller, and 2 identical 300 GB Samsung disks (D3 & D4) attached to the Promise SATA controller. The pair attached to the Promise SATA controller are configured as a RAID 1 (mirrored) array. The BIOS is set up to boot from D1 with a boot order D1, D2 & D3/D4. This worked fine with Ubuntu 7.10, except that the RAID array was ignored. I had Ubuntu installed on D2 and Windows XP on D1 with the grub boot loader in the boot record of D1.

When installing Ubuntu 8.04 either grub or Ubuntu identifies the disks in a different order - D3=(hd0)=/dev/sda, D4=(hd1)=/dev/sdb, D1=(hd2)=/dev/sdc, and D2=(hd3)=/dev/sdd. I have installed Ubuntu in the primary partition of D2. Whether through the automatic installation or manually, grub insists on identifying this partition as (hd3,0) and the menu.lst file reflects this. The automatic installation puts the grub boot loader in the mbr of (hd0), i.e. D3. Manually, I can put the grub boot loader in the mbr of (hd2), i.e. D1. Now, I have the grub boot loader on both D1 and D3, but it insists on looking for Stage 2 on partition (hd3,0). As a result it falls over reporting Error 21 - because the BIOS is telling it that (hd3,0) doesn't exist as D3 & D4 are mirrored as (presumably) (hd2). This is the outcome when I leave the boot order as D1, D2, D3/D4 or if I change it to D3/D4, D1, D2.

I have no doubt that if I sacrifice the RAID array, then things can be made to work properly, but only at the cost of losing my disk mirroring. The previous advice about editing the menu.lst file doesn't help, because the basic problem lies in the setup that is written to the mbr because of the misidentification of the disk array & order by grub.

I should emphasise that this appears to be a generic grub problem as I have encountered exactly the same problem in trying to install both Mandriva 2008.1 and OpenSUSE 11.0. All of them create an erroneous boot loader that falls over in one way or another - sometimes the error number is 21, sometimes it is 22 - as well as a version of menu.lst that would have to be edited.

As additional information, I am not using WUBI to install Ubuntu and I can replicate the behaviour. Finally, as a matter of considerable frustration, the problem was introduced when I tried to upgrade from my 7.10 setup to 8.04, with the result that a properly functioning setup has been completely destroyed. This is the worst aspect and, in my view, is simply inexcusable since upgrades should never render a system unusable. (Of course, I do have a backup of my user files.)