Installing 12.04 server as a software RAID 1 mirror fails to boot
I'm installing a few new Ubuntu Server 12.04 LTS servers, and they have two 512 GB SSDs. I want them to use software RAID 1 mirroring, so I was following this document religiously step by step:
https://help.ubuntu.com/12.04/serverguide/advanced-installation.html
To summarize the above official documentation:
to set up a software RAID 1 mirror in Ubuntu Server, you choose manual partitioning during the setup, and do this on each drive:
- "swap" partition of roughly RAM size
- "physical volume for RAID" partition for remaining drive size
After that, you set up the RAID 1 mirror using the RAID partitions on drive A and B, make it ext4 and containing the root filesystem partition.
Setup continues from there just fine.
One caveat: I was completely unable to select the "physical volume for RAID" as bootable. When I tried to do that in setup, it had no effect: I could press enter on the "make bootable" option all day long and nothing would ever change.
However, after install successfully completes, I have a big problem: the system won't boot! I get
Reboot and Select proper boot device
or Insert Boot Media in selected Boot device and press a key
What did I do wrong? Why can't I mark that "physical volume for RAID" partition bootable during Ubuntu Server setup? Is there some way for me to make the physical volumes for RAID bootable after the fact, perhaps from a live CD or something?
Well, I was able to proceed by deviating from the official install docs slightly.
Rather than manually configuring the free space on the two drives, I selected "automatically partition the free space" on each drive.
Note that this caused automatic creation of a 32 GB (equal to RAM size) swap partition, and one large ext4 partition. I changed the ext4 partition to RAID, then I was able to mark it bootable at last!
Note the little "B" next to the RAID partition on the first sda
drive.
While Jeff provided a solution that fixes the symptom, the underlying reason is a missing partition of type "biosgrub". The process described by Jeff creates one such partition (only 1MB in size).
It is advisable to create such a partition on both drives, if you would like to boot even if one drive failed.
After eating a little humble pie,
I have discovered the cause of my problem and, yes, as you can imagine, there is no such thing as a "new installer".
My problem was being caused by teh fact that I was using 3TB hard drives.
Anything larger than 2TB needs to be forced to GPT Partition table and the current partitioner in the installer is not able to do this or setup the partition for grub properly. All I needed to was setup my partitions in GParted, before I attempted the Instal. I have a GParted Live CD but you can use the Ubuntu Desktop Live DVD to boot from and use the copy or GParted in there.
Create the Partition table making sure it is GPT create a partition of at leats 1.0MB with no file system on it, and set its flag to 'biosgrub' (This is the important part)
create swap Partition and set its flag to 'raid' create the main Partition and set its flag to 'raid' Repeat for second disk.
Now when you run the 12.04.3 Installer, it will see the Partitions, and you just need to run the "Configure RAID" part, adding both the teh swap and main. go into the swap part of the array and go "use as" - swap area. go into the main part of the array and go "use as" - ext4, mount poit - / (root) no need to worry about bootable flags, exit and write to disk, Installation then works fine and grub is intalled fine at the end. This solution was found here: http://ubuntuforums.org/showthread.php?t=2109438
Again Apologies if I came on a little heavy, but it was doing my head in. I hope this helps.