Home > Linux > Fighting with biosboot and efi boot in CentOS 7

Fighting with biosboot and efi boot in CentOS 7

In two recent Linux installations I have struggled with biosboot and efi boot partitions. At first I didn’t know why they were needed, I have never seen them before, perhaps because I generally use old hardware for my Linux boxes.

The rule is apparently fairly simple. If the system booted in efi mode, the disks must use gpt and an efi boot partition is required. If on the other hand the system booted in legacy mode there are two options. If the disk is larger than 2T then gpt is required and a biosboot partition is needed. For smaller disks it is possible to use msdos without a biosboot or efi boot partition, using only the mbr for the boot loader.

You can tell if the system booted in efi by checking for /sys/firmware/efi. If it exists the system booted in efi, otherwise it booted in legacy mode. The boot method is controlled by bios settings, not by Linux.

I tried to install CentOS 7. For a simple one-disk installation it is a breeze, but what do you do if you want to use software raid? The installer can create boot and root in raid1, but there is no support for creating efi boot or biosboot partitions on multiple drives.

For biosboot I solved it by escaping to a command prompt, (Ctrl-Alt-F2), creating a gpt disk with gdisk with a single 1M partition created in advance for all disks. That worked, but of course the boot loader is only installed on one of the disks, so after a reboot I had to run grub2-install for all disks.

For efi boot I failed. The installer didn’t like my M2 disk and kept complaining. I tried without it, using two other identical disks. That worked better, but I still couldn’t create the partition from the installer and when I used gdisk the installer would either complain that /boot/efi had to exist on a valid gpt disk or that there was an invalid software raid setup on the newly formatted disks. After several attempts, each needing a reboot cycle, I gave up and booted the system in legacy mode, using msdos disks with classic mbr. Everything worked, including the M2 disk.

This should not be rocket science. The end result is well defined, the problem is when you have to work against the installer rather than with it. I realize that most of Red Hats corporate customers use hardware RAID, but there are many servers out there using software raid as well. Better support for mirrored disks in the installer would be great!

Advertisements
Categories: Linux
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: