1 月 132024
 

Source: Can the EFI system partition be RAIDed?

mdadm metadata ver. 1.0 does the job.

I’ve managed to get working configuration that Gigabyte’s GA-C1037UN-EU EFI was able to boot. This configuration is limited to RAID1 for ESP partition, but allows to use any RAID configuration for the rest of the partitions. Let show RAID1 on two drives as example. Every disk is partitioned in the next way:

sda (gpt)
--sda1 (512MB)
  mdadm array member with 1.0 metadata format
  boot and esp flags set
--sda2 (rest of disk)
  mdadm array member with 1.2 metadata format

First RAID created over sdX1 partitions on each drive and used for ESP partition. Rest of the drives capacity can be used in any manner, for example, in RAID1 too. Let the first RAID be /dev/md/efi and the second /dev/md/data/dev/md/efi should not use any partitioning labels, such as MBR or GPT. /dev/md/data can be partitioned later or used as LVM pv. For example:

/dev/md/efi
--fat32 fs, mounting to /boot/efi/
/dev/md/data
--/dev/md/data1
  linux swap partition
--/dev/md/data2
  ext4 root partition
  ... (other needed partitions)

Metadata ver. 1.0 has one simple feature: it’s superblock is stored at the end of the RAID partition, so BIOS can detect plain FAT32 partition with ESP and BOOT flags. So nothing prevents BIOS from searching EFI/BOOT/BOOTX64.EFI on this partition and booting from it.

Main limitation of this method is that GRUB should be configured to install bootable EFI file in path for removable media, because efibootmgr is trying to make BIOS boot directly from md device, not sdX. This can be done using grub-install with --removable flag.

UPD. There are compatibility issues. Tried same configuration on ASUS P8Z68-V PRO/GEN3 motherboard. System won’t boot no matter what I do.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

CAPTCHA Image
Play CAPTCHA Audio
Reload Image