Grub install fails with "grub-install: error: cannot find EFI directory."

Guys I`ve tried to install manjaro on a dell inspiron 15 . The partitioning is as follows

on the last steps of the install it reported an error and failed to install grub. So I cannot boot in manjaro. I`ve followed the

my fstab is as follows:

 /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this m
ay
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=f6ab09db-1674-4fd3-bd9c-a3a6d2b898ee /              ext4    defaults,noa
time,discard 0 1
UUID=36971b1f-c855-4fba-894a-9e4944ac11b6 swap           swap    defaults,noa
time,discard 0 2
UUID=347bf51a-4924-4ecc-b465-999a799fcc48 /boot/efi      ext4    defaults,noa
time,discard 0 2
UUID=8f7f4809-178c-4d9d-a233-c1c08e7bc5d5 /home          ext4    defaults,noa
time,discard 0 2
tmpfs                                     /tmp           tmpfs   defaults,noa
time,mode=1777 0 0

I`ve also used the help of the following article what am I missing to have grub to work?

Regards

ermm, isn’t that supposed to be formatted mounted as FAT32 ?
(it’s already formatted as fat32 as per screenshot, what i meant to say. @stephane thank you for pointing fingers :point_left: )

/boot/efi       vfat    umask=0077          0   2

/dev/sda1 is Fat32

you have to mount /boot/efi with /dev/sda1 , *** not format *** , and add option boot , esp on mount points

1 Like

Okay I did not understand everything but I fixed fstab as requested:

cat /etc/fstab                                                                                                                                                                                                             
# /etc/fstab: static file system information.                                                                                                                                                                                                
#                                                                                                                                                                                                                                            
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=f6ab09db-1674-4fd3-bd9c-a3a6d2b898ee /              ext4    defaults,noatime,discard 0 1
UUID=36971b1f-c855-4fba-894a-9e4944ac11b6 swap           swap    defaults,noatime,discard 0 2
UUID=347bf51a-4924-4ecc-b465-999a799fcc48 /boot/efi      vfat    umask=777                0 2
UUID=8f7f4809-178c-4d9d-a233-c1c08e7bc5d5 /home          ext4    defaults,noatime,discard 0 2
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

And read https://wiki.manjaro.org/index.php?title=UEFI_-_Install_Guide#Setting_filesystem_mount_points

So what now?

3.) Mount the EFI partition as /boot/efi

sudo mount /dev/sdXY /boot/efi

X = Alphabet of the drive = a,b,c ... Y = Partition number of the **EFI partition =** 1,2,3,4...

Example - /dev/sda4


4.) Install Grub according to UEFI

sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck

5.) Update Grub configuration file.

sudo update-grub

How do I get the device name/number for that uuid of /boot/efi?

When you put it in fstab, it gets mounted by system. You don’t need to manually “mount” anything. Fixing fstab is all you needed to do.

command

blkid

Step 4 and 5 are a bit dodgy, depending on how much you understood. They are only valid from a bootable system or chroot. If you can’t boot your system from hdd to begin with, directly running those commands don’t make sense from live session.

This article tells you how to manually mount partitions in a live session and chroot (this is the real trick), and run the commands in step 4 and 5 to restore grub.

live session = when you boot from a usb or dvd

Edit: If you need step-by-step, tell us which one is your root partition. We can see your efi is /dev/sda1. Just need those two

1 Like

Okay some background about me and linux, I used gentoo and arch for ages, and use ubuntu on daily basis at work the problem is this is my first uefi machine. I`ve manjaro installed in /dev/sda9 and did sucessfully chrooted into it.
I assume my error is thaty I created a new partition to contain /boot which is not /dev/sda1 as it is the loader from windows which I was afraid to screw. So theoretically just giving sda1 as argument to grub will fix my issue right? Also are you @badbodh on #manjaro ? Maybe I can reach you there, still guys thanks a lot for the welcoming and support.

Oki some improvement I did chroot and entered the system. Grub is installed and manjaro is recognized by the bios , still grub itself wont pop up on boot. The system hangs a little on a black screen and then drops to the windows boot.

Some relevant images here

Not sure how dell’s firmware works, “windows boot manager” is greek to me. Lemme google duck this. Usually grub alone should be enough, firmware doesn’t need to know there is windows at all.

First tell me which “/dev/sdXY” is your root, boot and efi partitions. Disable “Secure boot” from your firmware. Then we work our way up.

i’m often available on #manjaro if sober :grin: If IRC channel is more convenient for you, let’s discuss there and make sure you summarize your work in this thread later.

/dev/sda9 is boot. I pinged you again on irc

Apparently fastboot from windows 10 was blocking the installer from peeking into EFI partition. Disable it from advanced power options. Disable secure boot. Run the installer again.

[03:16] <Frederick> badbodh: it works like a charm, thanks a lot im speechles regarding the help i received here

I’ll take that as a confirmation.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by Bytemark