EFI partition and software RAID

Hello, I’m confused about installing almalinux 9.1 with UEFI boot. In the installer i’ts possible to make the /boot/efi partition RAID1, but everywhere they prefer to not put the efi partition on a sofware RAID. I’s seems working to install like this but on the other hand UEFI should not know how to read from software RAID. The EFI RAID 1 partition is setup with metadata 1.0.
Which is the preferred way to setup a redundant UEFI boot OS on 2 disks with software RAID 1 ?
/boot, / partitions can be without any problem on soft RAID1 I guess but what with /boot/efi partition ?

A RAID array has metadata about the array on each partition/volume that make up the array. The RAID implementation knows to look for the metadata and assemble the array based on that.

On RAID1, the mirror, each member of the array has a full copy of the filesystem within the array. If the metadata is at the end of the partition, then the start of the partition looks like
regular filesystem that is not part of any RAID array.

Systems that are not aware of RAID can thus use “one leg” of such RAID1 volume.
The access should remain read-only, because without assembly of the array there is no mirroring of the writes to each member.

The question is thus, does the boot process – either UEFI or the bootloader (GRUB) – write something to the ESP (EFI System Partition, the FAT32 filesystem that is later mounted to /boot/efi)?
If there are writes during boot, then the RAID1 array is corrupted (on every boot).

If the metadata is in wrong place, then UEFI does not find the ESP and bootloader within.
Furthermore, the UEFI has the boot menu entry like:

Boot0000* AlmaLinux	HD(1,GPT,c705..b139,0x800,0x64000)/File(\EFI\almalinux\shimx64.efi)

Stored in motherboard. Is that unambiguously one of the drives?
If yes, and that drive is gone, then that entry will not use the remaining drive.
If both drives match, then either might be used on regular boot.

Perhaps it is better to have separate ESP on each drive and one entry for each copy of bootloader.
Only one ESP will be mounted on /boot/efi, so one has to mount the other ESP elsewhere and sync the contents manually, when necessary.
(That requires that you do know what writes to ESP. At least some RPM packages do have files there, so their update does write.)

1 Like