- I’ve installed Debian without setting up the RAID for the ESP partition. During the partitioning, I’ve already created two identical partitions marked as ESP partitions. They were on
/dev/sda1
and/dev/sdb1
- I’ve copied the contents of
/boot/efi
somewhere else (/root/eficopy
). umount /boot/efi
mdadm --create --verbose /dev/md2 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda1 /dev/sdb1
. Of course change/dev/md2
to something else if/dev/md2
is already an active MD devicemkfs.vfat /dev/md2
(potser cal instal·lar el paquet dosfstools)- found the UUID of the partition in
/dev/disk/by-uuid
- changed the
/boot/efi
entry in/etc/fstab
with the new UUID mount /boot/efi
- copy the data from the backup into
/boot/efi
again
Instead of backing up the /boot/efi
partition, it seems that
grub-install --efi-directory=/boot/efi