Re: Redundant EFI Systemp Partitions (Was Re: How does one enable SCTERC on an NVMe drive (and other install questions))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good morning Andy,

On 6/25/21 6:08 PM, Andy Smith wrote:
Hello,

On Mon, Jun 21, 2021 at 12:00:13AM -0500, Edward Kuns wrote:
looks like maybe I cannot use the installer to set up RAID mirroring
for /boot or /boot/efi.  I may have to set that up after the fact.

In November 2020 I had this discussion on debian-user:

     https://www.mail-archive.com/debian-user@xxxxxxxxxxxxxxxx/msg762784.html

The summary was that the ESP is for the firmware and the firmware
doesn't know about MD RAID, so is only ever going to see the member
devices.

Indeed.

You could lie to the firmware and tell it that each MD member device
is an ESP, but it isn't. This will probably work as long as you use
the correct metadata format (so the MD metadata is at the end and
the firmware is fooled that the member device is just a normal
partition). BUT it is in theory possible for the firmware to write
to the ESP and that would cause a broken array when you boot, which
you'd then recover by randomly choosing one of the member devices as
the "correct" one.

Pretty low risk, I think, but yes. If you construct the raid with what the EFI system thinks as the "first" bootable ESP as member role 0, mdadm will sync correctly. Fragile, but generally works.

Some people (myself included, after discovering all that) decided
that putting ESP on an MD device was too complicated due to these
issues and that it would be better to have one ESP on each bootable
device and be able to boot from any of them. The primary one is
synced to all the others any time there is a system update.

I started doing this with my work server. I wrote a hook script for initramfs updates to ensure everything was in place.

Ubuntu have patched grub to detect multiple ESP and install grub on
all of them.

Didn't know this.  I will experiment to see if I can retire my hook.

In theory it would be possible to write an EFI firmware module that
understands MD devices and then you could put the ESP on an MD array
in the same way that grub can boot off of an MD array.

Yeah, not holding my breath for this.

Cheers,
Andy

Thanks!  Learned something new today.

Phil




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux