I have a CentOS 8 installation, where the partitioning and RAID 1 configuration where done using the automatic partitioning of the CentOS installer. Here is the output of
sda 8:0 0 558.9G 0 disk ├─sda1 8:1 0 50G 0 part │ └─md127 9:127 0 50G 0 raid1 / ├─sda2 8:2 0 20G 0 part │ └─md126 9:126 0 20G 0 raid1 [SWAP] ├─sda3 8:3 0 1G 0 part │ └─md125 9:125 0 1022M 0 raid1 /boot ├─sda4 8:4 0 600M 0 part │ └─md124 9:124 0 600M 0 raid1 /boot/efi └─sda5 8:5 0 487.3G 0 part └─md123 9:123 0 487.2G 0 raid1 /home sdb 8:16 0 558.9G 0 disk ├─sdb1 8:17 0 50G 0 part │ └─md127 9:127 0 50G 0 raid1 / ├─sdb2 8:18 0 20G 0 part │ └─md126 9:126 0 20G 0 raid1 [SWAP] ├─sdb3 8:19 0 1G 0 part │ └─md125 9:125 0 1022M 0 raid1 /boot ├─sdb4 8:20 0 600M 0 part │ └─md124 9:124 0 600M 0 raid1 /boot/efi └─sdb5 8:21 0 487.3G 0 part └─md123 9:123 0 487.2G 0 raid1 /home
As you can see, the /boot/efi partition is mirrored in RAID 1 as any other partition. Now, I'm trying to recreate the same setup when installing Debian, and I'm unable to proceed. If I setup the partitions and RAID 1 in this way, I get an failure from the installer during the grub installation (with no other error message, just "Some installation step has failed" generic message).
The error goes away if I do not mirror the ESP partition.
I realise that mirroring the ESP partition is something that sounds unfeasible, and looking around it seems everybody agrees. But the CentOS installer manages to do it somehow.
What do I have to do to recreate the same setup on Debian?
rsyncor some other method that recurses any sub-directories). unmount /boot/efi and then add /dev/sda4 to the raid-1 with sdb4. This will cause sda4 to be synced with the contents of sdb4. Unmount this raid-1 mirror and remount it as /boot/efi (and don't forget to update
/etc/fstabso that it mounts the mirror device instead of /dev/sda4 - use a LABEL or UUID instead of a /dev/ entry).
update-grubcan & will copy it's own boot-loader there, but can't do anything about any others that might have been installed by the bios or other programs or operating systems. Easiest to just copy everything from sda4 to the mirror, it's only a few hundred MB at most, anyway.