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.
Any help resolving this issue so I can boot into my system would be much appreciated!