1

I had a dual boot system and removed the Windows partition using Gparted by booting from a USB. After this, I was not able to boot into the Ubuntu system (or even get to the grub menu). Gparted had warned this could happen, so I am following the instructions here (the Restoring GRUB 2 Boot Loader section). When I get to step 8 the grub-install command fails.

Here is everything I have typed into the terminal to get to that point

ubuntu@ubuntu:~$ sudo mkdir /tmp/mydir
ubuntu@ubuntu:~$ sudo mount /dev/nvme0n1p6 /tmp/mydir
ubuntu@ubuntu:~$ sudo mount --bind /dev /tmp/mydir/dev
ubuntu@ubuntu:~$ sudo mount --bind /proc /tmp/mydir/proc
ubuntu@ubuntu:~$ sudo mount --bind /sys /tmp/mydir/sys
ubuntu@ubuntu:~$ sudo chroot /tmp/mydir
root@ubuntu:/# sudo grub-install /dev/nvme0n1p
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

Here is a screenshot of Gparted post-resizing.

enter image description here

Any help resolving this issue so I can boot into my system would be much appreciated!

Fabby
  • 34,259
  • In addition to Fabby's answer: You used instructions to reinstall BIOS version of Grub. If you reinstall EFI version of Grub, you have to mount the ESP as well, see https://askubuntu.com/questions/831216/how-can-i-reinstall-grub-to-the-efi-partition – mook765 Jul 06 '19 at 08:14

1 Answers1

0

Your issue is that the EFI partition was converted from FAT to NTFS.

The possibilities are (in increasing order of complexity)

  • Restore your last full System Backup
  • Reinstall from scratch and restore your data backup
  • Boot an Ubuntu Live USB and:
    • Mount nvme0n1p1
    • copy all files off it in a secure location (hell: copy them twice!)
    • delete nvme0n1p1 using gparted
    • recreate it with the same size in FAT16 or FAT32 format (gparted again)
    • give it boot and esp flags. (gparted)
    • copy all files back from the secure location
    • reboot
Fabby
  • 34,259