Software RAID
EFI and RAID
While installing Debian 12, it was impossible to setup RAID during the install. Grub would fail installing.
The alternative is to install without RAID, and add RAID afterwards. This shows how to proceed, based on this link: https://unix.stackexchange.com/questions/644108/raid-1-of-boot-efi-partition-on-debian
Backup the content of
/boot/efi
to another location:midir /efi-backup && cp -R /boot/efi /efi-backup
umount /boot/efi
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 --metadata=1.0 /dev/sda1 /dev/sdb1
mkfs.vfat /dev/md0
Find the UUID of the md partiton:
ls -alh /dev/disk/by-uuid
Change
/boot/efi
entry in fstab with the new UUIDmount /boot/efi
Copy the content back to
/boot/efi
Make sure both devices have the boot flag enabled
Test removing a disk and booting. Test the other way around