SOLVED -- How do I reinstall Grub? EFI directory missing

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
senjoz
Level 5
Level 5
Posts: 900
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

Re: can I check if my boot sector is intact??

Post by senjoz »

I have obligations now, I will leave for a few hours. Sorry for that!

Regards, Jože
User avatar
senjoz
Level 5
Level 5
Posts: 900
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

Re: How do I reinstall Grub? EFI directory missing

Post by senjoz »

jwstarr wrote: Sat Jun 12, 2021 4:14 am grub-install: error: cannot find EFI directory.
I think that the efi partition is not mounted. Check with mount. If in output there is no entry similar to
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
then it is not mounted.

I am not sure how to proceed. First I would try to add that missing umask=0077 in fstab to get line
UUID=6A64-A742 /boot/efi vfat umask=0077 0 1
save, run sudo mount -a, check with mount if efi partition is mounted and then try to reinstall grub.

If unsuccessful, I would try to mount the efi partition with sudo mount /dev/nvme0n1p1 /boot/efi and try to reinstall Grub.

Do you have a system timeshift enabled? With booting in a live session from a USB key probably you can restore the system to the state before you mess things up with Disks application. I am not very familiar with timeshift, I cannot help much with that. I use partition images for system backups.

Regards, Jože

EDIT: If you changed the efi partition with Disks application, it can be that there are problems with permissions for efi partition.
jwstarr
Level 2
Level 2
Posts: 86
Joined: Tue May 09, 2017 6:01 am

Re: SOLVED -- How do I reinstall Grub? EFI directory missing

Post by jwstarr »

Finally the system crashed.. I restarted -- there was no boot.. booted to USB .. messed with it, tried to reinstall grub.. no drive ,.. no Fstab .. no /boot/efi no drive mount.. I remembered an article on boot repair for Gparted -- mistakes .. SO I ran boot repair from USB -- system is up and running.. booted itself. Thanks for the help, I solved the problem ultimately, but it was all the help from this group that led me there . This was really tricky. Appreciated.
Locked

Return to “Installation & Boot”