2

TL;DR: created RAID 1 at installation of Ubuntu desktop but it won't boot after seemingly successful installation, although boot utility seems to indicate that GRUB is installed

I am trying to set up an instance of Ubuntu desktop (12.04.5) which boots from a RAID 1 device. I'm using an alternate installation CD in order to configure a software RAID from which to boot.

I am using four 2 TB drives (sdf-sdi) to create three RAID 1 devices:

  • two 4 GB partitions across sdf and sdg as swap space
  • two 2 TB partitions across sdf and sdg as ext4, with the bootable flag set, mounted at /
  • two 2 TB partitions across sdh and sdi as ext4, mounted at /home/

I set up the partitions with the help of a tutorial I found on YouTube for installing Ubuntu 12.04 server; this is the procedure I used for each partition pair:

  • create partition on empty drive (4 GB for the swap, remaining space for the ext4s)
  • set as "physical volume for RAID" (set bootable flag on partition mounted at /)
  • create identical partition on the physical device that this partition will be paired with
  • select "configure software RAID" > "create MD devices", and configure a RAID 1 device with two drives and zero spares
  • select the two matching partitions and finish MD configuration
  • select new RAID 1 device and set the "use as" option (swap/ext4) as well as the mount point for the ext4 partitions (/ and /home/)

From here I select "finish partitioning and write changes to disk", select the default of no when confronted with the option to boot from a degraded RAID, and confirm the changes. Afterward the installation continues as normal and eventually I hit a screen indicating "this new installation is the only operating system on this computer" and prompts me to install the GRUB boot loader to the MBR. I select yes and at the bottom of the screen see the command: grub-install /dev/sdf /dev/sdg

The installation finishes without any errors and ejects the CD, but upon restart I am greeted with:

Reboot and Select proper Boot device
or Insert Boot Media in selected Boot device and press a key

I went back to do a sanity check and ended up just going through the process again only to get the same results. Then I put the Ubuntu boot-repair ISO on a USB stick and booted into that, and get a couple of messages upon startup:

  1. "RAID detected. You may want to retry after installing the [mdadm] packages."
  2. "Warning: No active RAID"

From here it does not give me the option of repairing, just the option to create a "Bootinfo summary", which I did (http://paste.ubuntu.com/8200097/).

I'm not sure I understand the errors from the boot-repair utility, specifically 1) how I'm supposed to install mdadm if I can't boot in the first place and 2) where the option to set an active RAID device was.

Any suggestions on what the issue might be and how to proceed?

  • From what I've seen soft raid is pretty hard to setup/buggy. MAYBE 14.04 is better. You might want to look into a cheap pci controller. – wlraider70 Sep 1 '14 at 1:17
  • Funny you mention it, I actually did get a PCI controller but I never had any luck getting any Linux distros to recognize it. I figured software RAID would be easier than trying to wrestle with drivers. – Tarnt Karntington Sep 1 '14 at 5:42
1

You cannot install the Grub onto the software RAID Partition. When you create the partition for the first two HDD, it has to be:

Partition 1: 250Mb example, for Grub. But don't do raid for this. Formatted as FAT32, set as boot flag.

Partition 2: 4GB for swap.

Partition 3: remaining space for /

The grub will be installed to the non-RAID partition 1, you don't get RAID-1 protection for the Grub.

In fact, the better way of implementing software raid in my opinion is to install the entire Ubuntu OS in another HDD which is not member of the RAID. Otherwise if the member disks has error, you might lost your entire OS and reinstallation is required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.