I just now encountered this issue. I booted a rescue USB stick. Let me describe the fix that worked for me.
Prowling around with
gdisk -l /dev/sda I can see that my original root partition is
/dev/sda2. To access it, I type
sudo mount /dev/sda2 /mnt
So far, so good. Let me first describe what didn't work, and then a solution. Some pages advise
chroot /mnt and then
grub-install, but this won't work; giving the
grub-install: error: cannot find EFI directory. error.
Following other suggestions, I see that my EFI partition is
/dev/sda1 so I try
sudo mount /dev/sda1 /mnt/boot/efi and chroot again. Now, grub complains about missing
/dev so I
mount --bind /dev/ /mnt/dev. ... But then grub complains about something else. It's snowballing out of control.
chroot is not the answer.
What did work was this:
grub-install -d /mnt/usr/lib/grub/x86_64-efi --boot-directory=/mnt/boot /dev/sda
Note that the
-d flag is mandatory, as otherwise, grub tries to use
/usr/lib/grub/i386-pc from the rescue image, which does not contain the correct stuff.
Yayy! My system is now bootable again!