Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I'm attempting to install Ubuntu 11.04 on a two-disk RAID 1 setup. I've started with two independent, blank disks. I basically followed the instructions in the InstallationSoftwareRAID Ubuntu documentation ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2011
    Posts
    12

    RAID 1 Bootloader Problem


    Hi,

    I'm attempting to install Ubuntu 11.04 on a two-disk RAID 1 setup. I've started with two independent, blank disks.

    I basically followed the instructions in the InstallationSoftwareRAID Ubuntu documentation article, which have worked pretty well, but I'm having an issue when it comes to installing GRUB. The installer asks me if I want to install it on the first disk. If I say yes, it returns a "Fatal Error" saying that it couldn't be installed.

    I've tried entering things like /dev/md0 and /dev/md1, but it gives the same error.

    I've looked at another thread which suggested doing

    Code:
    ls /dev/mapper
    to see which partition I should install the bootloader to, but nothing comes up except "control". I also tried booting from the Live CD to try and install GRUB that way, but I can't mount any of the partitions. There's an error about them being RAID partitions.

    So basically, I have two drives sdb and sdc each with three partitions, sdb2 and sdc2 are RAIDed as the root filesystem, sdb3 and sdc3 are RAIDed as swap. This means there are three RAID devices, md0, md1 and md2 where md0 corresponds to sdb1 and sdc1 and so on.

    And I just need to know how to install GRUB 2 onto this setup. I should also note that Windows 7 is installed on sda, so I'd like to have access to that at boot time as well.

    Thanks for any help.

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,755
    You need to install Grub to whatever HDD the BIOS is set to boot from. I would guess that is /dev/sda, but only you know for certain.

  3. #3
    Just Joined!
    Join Date
    May 2011
    Posts
    12
    Well I can change the BIOS to boot from whatever. Ideally I'd like to have it boot from sdb or sdc and give me the option to boot from sda since I have Windows on there. But the problem is that telling the installer to install GRUB onto sdb gives the error that the installation failed.

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,755
    A) Pick a drive and stick with it. Installing Grub to /dev/sda is fine, altho it will overwrite the Windows boot code.

    B) You may have an unusual HW config or some other issue (or an Ubuntu 11.04 issue since it's pretty new.) If you want to move forward, you'll need to do more digging than the "fatal error" message.

    You can Google for info on booting from the LiveCD, manually starting the RAID set, mounting the md devices, chroot'ing to the installed 11.04, and then running "grub-install /dev/sdX." If that fails, you can work from there to get a better error message/idea of the problem with your system.

    Example of starting the RAID, mounting it, and using chroot.

  5. #5
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,755
    Because I had not played with 11.04 yet, I grabbed the ISO and created a VM with 3 drives. I left sda alone and manually created md0 and md1 on sdb1/sdc1 and sdb2/sdc2. Then I created an ext4 filesystem on md0 and swap on md1 (the Ubuntu partitioner wanted to create a partition table on the md devices.)

    THEN I ran the Ubuntu installer, which also failed when installing Grub to /dev/sda. Further troubleshooting showed that the issue doesn't appear to be sda, but the fact that update-grub fails due to an inability to read the filesystem on md0.

    This is noted in a bug track HERE.

    This appears to be some sort of Grub/mdadm bug, but I cannot look into it further right now.

  6. #6
    Just Joined!
    Join Date
    May 2011
    Posts
    12
    Okay, glad to know there is indeed a bug going on.

    I've more or less solved the problem by creating a 100 MB partition on each drive (sdb and sdc) for the /boot mount point, and NOT RAIDing them together. This seems to work, although now I have a pretty slow boot time to deal with.

    Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •