How to restore grub booting when windows install wipes out the efi data for Fedora

Just a quick recap of the total steps involved in recovery on the other users system. (mostly done within a chroot environment)

  1. The windows install changed the UUID for the ESP so /etc/fstab needed to be updated with the new UUID to mount /boot/efi
  2. Verify that the /boot/efi/EFI/fedora directory had been removed by windows.
  3. remove /boot/grub2/grub.cfg
  4. reinstall grub2* and shim* (to rebuild the /boot/efi/EFI/fedora directory)
  5. run efibootmgr -c to tell the UEFI bios that grub was installed and available for booting
  6. The users system was using LVM and the original VG was not accessible for activation. The user renamed the VG which made it accessible but also necessitated an update to the kernel command line in /etc/default/grub to update the new VG name. The new VG name also necessitated further editing of /etc/fstab.
  7. After updating grub.cfg with grub2-mkconfig -o /boot/grub2/grub.cfg and verifying that all the boot loader entries in /boot/loader/entries were properly updated with the new LVM data the user rebooted and the recovery from the windows install was complete.

Hope this helps someone else if they have the misfortune of installing windows after linux is already installed.

4 Likes