- UEFI specification lacks any knowledge about software RAID. It is known deficiency.
I'd speculate probably it's because it was largely influenced by Microsoft guys who weren't able to create a reliable software RAID array in Windows, and they don't know it is possible to make array out of partitions with simple superblock without special internal structure (Windows only can build arrays out of discs converted to "dynamic" logical disk manager or storage spaces format).
- You can make several ESPs on different devices and sync them manually.
For example, if you install Proxmox VE on ZFS "software RAID", it'll create several ESPs, and install special "hook" which runs after kernel, bootloader and other boot-related stuff updates, and that hook makes sure all ESPs are kept in sync.
You can also add a Grub hook to install it on both ESPs, as outlined in this answer:
Create the file /etc/grub.d/90_copy_to_boot_efi2 with the following contents and make it executable:
#!/bin/sh
set -e
if mountpoint -q /boot/efi && mountpoint -q /boot/efi2 ; then
rsync -t --recursive --delete /boot/efi/ /boot/efi2/
fi
exit 0
Then, whenever you or system runs update-grub it will run this script. Also notice this script is somewhat dangerous when disaster occurs; if primary device containing /boot/efi failed and being replaced this script will erase valid contents from /boot/efi2. So in that case you need to disable it (remove executable bit), or check the source condition in the hook before running rsync.
- For the backup ESP to take over if the primary device fails, you should set up UEFI boot entries for all your ESPs. In Linux it's done like this:
efibootmgr -c -d /dev/sdb -l \\EFI\\DEBIAN\\GRUBX64.EFI -L debian-sdb
efibootmgr -c -d /dev/sdc -l \\EFI\\DEBIAN\\GRUBX64.EFI -L debian-sdc
efibootmgr -c -d /dev/sdd -l \\EFI\\DEBIAN\\GRUBX64.EFI -L debian-sdd
efibootmgr -c -d /dev/sda -l \\EFI\\DEBIAN\\GRUBX64.EFI -L debian-sda
This is the real example from one of my managed systems. It assumes ESPs are first partitions of each disk. This should be done after you synced contents of your ESPs. efibootmgr -v will confirm that all boot entries that you create like this use different devices.
See also: https://askubuntu.com/questions/66637/can-the-efi-system-partition-be-raided