1

I have an install of Ubuntu Server 14.04.5 LTS that was installed and running on an mdadm RAID 5 array across 4 hard drives.

Originally all 4 drives were 2TB.

I have upgraded one of them to 3TB (intending to upgrade all) and found if I want to be able to use the full storage space on the drive, I need to use UEFI boot, instead of the legacy BIOS boot I'm using at the moment.

I want to change my existing system from booting in legacy BIOS mode into UEFI without reinstalling the whole operating system. (Mainly to avoid reconfiguring everything that is currently installed, though that option is looking more attractive the longer this continues to not work.)

Following this page I have booted a Live CD of Ubuntu 14.04.5 (desktop) in UEFI mode.

I confirmed this by running [ -d /sys/firmware/efi ] && echo "UEFI" || echo "BIOS". The message displayed while booted on the Live CD is UEFI.

I installed mdadm and boot-repair in the Live CD session. like so:

sudo apt-get install mdadm
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair

My 3TB drive is formatted to have a 200MiB EFI partition at the front and then the rest of the space is part of an LVM volume group that sits on top of the mdadm RAID array.

I have run boot-repair, which produced this boot-info log: http://paste.ubuntu.com/p/q4xnBmXX9G/

What I was hoping the result would be after boot-repair finished would be a system that boots in UEFI mode when booted from the 3TB hard drive. However, instead I'm stuck on Loading operating system ... after boot.

I'm running on a Gbyte GA-880GMA-USB3 AM3+ motherboard, which claims it supports EFI (specifically for 3TB+ hard drives), though I've yet to find any UEFI- or BIOS-specific options for hard drives in its BIOS configuration (only explicitly EFI option is for configuring CD-ROM boot, which I have set to EFI). I have selected the 3TB hard drive as the first boot drive.

If I select any of the others, which still have Grub2 configured for BIOS mode installed on their MBRs, I get an error about not being able to find grub.cfg. This I sort of expected - I've reconfigured the installation of Ubuntu Server to use EFI boot, so the old BIOS configurations don't work. I end up in a grub rescue console and see all the partitions I expect, but haven't run any commands that modify the state of anything yet from there.

What have I done wrong that means my system won't boot? When I reboot into the Live CD, the RAID array still reassembles correctly and I can still see all of my data on the drives so it hasn't been wiped. I do have backups of my essential files if anything goes completely sideways.

My main suspicion at the moment is the linux headers installed by boot-repair look like the desktop ones, but my install was previously only using the server ones. That's just me grasping at straws at this point though.

I'm intending to put EFI partitions at the front of all of the (new 3TB) drives as I install them, so that my machine can boot even if one of the drives has failed. (Including the first one, where the EFI partition is now.) That's a future problem though, for after I've solved booting from a single drive.

Sergeus
  • 121

1 Answers1

0

For any poor souls that stumble upon this question, have this problem, and are now screaming into the void because there doesn't appear to be a resolution, I've gotten myself out of this particular pickle, but not very elegantly.

My solution was similar to what ubfan1 said in the comments on the question itself. My issue with booting in BIOS mode was support for volumes over 2TB in size. So I bought some more small hard drives (two 400GB ones, since that seems to be as small as it goes these days) and set them up in a RAID1 array and boot off that 400GB volume.

The actual problem of booting from the EFI partition on the large RAID5 array remains unresolved in practice. I don't need to do it anymore so my machine still boots in BIOS mode.

However, in the process of installing the new drives, I believe I worked out why I couldn't boot in EFI mode (frustrating timing, but alas) and it's potentially quite simple.

Eons ago when I first set up the server, I configured GRUB to skip its prompt screen where you choose which Linux image to boot up. It auto-selected the first entry. I believe that was still happening. So the EFI boot option may have been present, but GRUB was auto-selecting the old BIOS option and failing to boot when it then tried to read from the array (which wasn't set up to boot that way anymore).

I can't say for certain that's the solution because I haven't changed (and won't change) my machine's set up back to EFI to try it. But if you are stuck with the above problem, keep that potential solution in mind.

Sergeus
  • 121