Instal·lar Debian amb RAID 1 software i EFI

  1. 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
  2. I’ve copied the contents of /boot/efi somewhere else (/root/eficopy).
  3. umount /boot/efi
  4. 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 device
  5. mkfs.vfat /dev/md2 (potser cal instal·lar el paquet dosfstools)
  6. found the UUID of the partition in /dev/disk/by-uuid
  7. changed the /boot/efi entry in /etc/fstab with the new UUID
  8. mount /boot/efi
  9. 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