Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

cannot find EFI directory

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
jankom
Guru
Guru
Posts: 545
Joined: Mon Aug 30, 2021 4:18 pm
Location: USA
Contact:
Contact jankom
Website

cannot find EFI directory

  • Quote

Post by jankom » Sun Jan 25, 2026 11:09 pm

Hello,

Sorry to come to the well again with maybe a trivial issue. I had previous posts in the subject of grub and booting and received great help from this community. I studied them, but still ran into a problem after a most recent eix-sync.. I tried to follow various messges after emerging the updated packages.
Here is what happened:

Code: Select all

andraslinux /home/janos # grub-install
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
andraslinux /home/janos # 
OK, I almost panicked, but was able to reboot my desktop machine. I did notice a news screen that offered me hardware setting (pre-boot settings)..
The previous post was https://forums.gentoo.org/viewtopic-t-1 ... -grub.html
I have not chenged anything in make.conf, I still have GRUB_PLATFORMS="efi-64", and

Code: Select all

andraslinux /home/janos # parted /dev/sda print
Model: ATA BIWIN SSD (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  269MB   268MB   fat32              boot, esp
 2      269MB   51.4GB  51.1GB  ext4
 3      51.4GB  85.0GB  33.6GB  ext4

andraslinux /home/janos # 
Pertitions 2 is where my gentoo linux is, and 3 is just for saving files.

As I said, everything has worked before, and is still working, but this grub-install error bothers me.

I would like to have a clean and correct gentoo system. As far as my other, virtual (linode) machine is concerned that was the subject of the referenced post oabove - I don't know yet. I did the eix-syn parallel to my home machine, but did not touch it. First I'd like to understand and clear this grub-install issue on my home machine.

jankom
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Jan 25, 2026 11:36 pm

jankom,

an "eix-sync" has nothing to do with a problem installing the grub.

To which mountpoint did you mount your ESP? If you are using - according to our Handbook - /efi as mountpoint, you must do a:

Code: Select all

grub-install --efi-directory=/efi
(See also number 8 and number 9 of https://wiki.gentoo.org/wiki/User:Pieti ... _UEFI_boot )
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
dmpogo
Advocate
Advocate
Posts: 3713
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Mon Jan 26, 2026 12:30 am

To add to the previous message - could it simply be that you EFI partition is not mounted ?
Top
jankom
Guru
Guru
Posts: 545
Joined: Mon Aug 30, 2021 4:18 pm
Location: USA
Contact:
Contact jankom
Website

  • Quote

Post by jankom » Mon Jan 26, 2026 3:58 am

I have
/boot/EFI/gentoo/grubx64.efi file, and
/boot/ directory has a grub subdirectory plus a bunch of grub boot files like vmlinuz, system.map and config files.

Partition 1 is mounted as /boot
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Mon Jan 26, 2026 12:36 pm

jankom wrote:

Code: Select all

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  269MB   268MB   fat32              boot, esp
jankom wrote:Partition 1 is mounted as /boot
Partition 1 is the ESP in your setup, therefore, the "EFI directory" is /boot, and the grub-install command should be:

Code: Select all

# grub-install --efi-directory=/boot
Last edited by GDH-gentoo on Mon Jan 26, 2026 9:32 pm, edited 1 time in total.
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Top
jankom
Guru
Guru
Posts: 545
Joined: Mon Aug 30, 2021 4:18 pm
Location: USA
Contact:
Contact jankom
Website

Bingo - SOLVED!

  • Quote

Post by jankom » Mon Jan 26, 2026 2:58 pm

Yes,

Code: Select all

andraslinux /home/janos # grub-install --efi-directory=/boot
Installing for x86_64-efi platform.
Installation finished. No error reported.
andraslinux /home/janos # 

That worked.
Two comments:
1) My initial gentoo installation was in 2021 when I switched to a modern (still manufactured) fitlet2 computer replacing my old, bulky desktop machine. I started there with Fedora3, then CentOS. That machine could still be fired up, and I use it to read old-old 5-1/4 floppies. The fitlet2 box came with Linux Mint, but I wanted my own OS (such as I configured with FC3) and gave Gentoo a try. Now I'm hooked on it and love it! In conclusion, the /boot partition layout was from the 2021 inistial Gentoo install when I was less familiar with these new ESP, EFI systems.
2) The connection to eix-sync is that this time I followed the message instruction to manually install the upgraded grub software. Apparently eix-sync and subsequent emerge command installs automatically the upgraded packages - at least after reboot the new versions will get used.

Thanks again, and I'll close this subject in a few days as SOLVED.

jankom
Top
mark4
Apprentice
Apprentice
Posts: 219
Joined: Sat Feb 26, 2011 2:34 pm

  • Quote

Post by mark4 » Mon Jan 26, 2026 10:14 pm

pietinger wrote:jankom,

an "eix-sync" has nothing to do with a problem installing the grub.

To which mountpoint did you mount your ESP? If you are using - according to our Handbook - /efi as mountpoint, you must do a:

Code: Select all

grub-install --efi-directory=/efi
(See also number 8 and number 9 of https://wiki.gentoo.org/wiki/User:Pieti ... _UEFI_boot )
not trying to hijack the thread but I have always just used /boot. should i rename /boot to /efi and edit all the necessary files to accommodate ?
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Jan 26, 2026 11:39 pm

mark4 wrote:[...] I have always just used /boot. should i rename /boot to /efi and edit all the necessary files to accommodate ?
I don't think that's necessary... now that you know the difference... and can therefore adjust some descriptions.

(I use /esp as the mount point... yes, I'm a rebel. :lol: )
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
dmpogo
Advocate
Advocate
Posts: 3713
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Tue Jan 27, 2026 2:51 am

jankom wrote:I have
/boot/EFI/gentoo/grubx64.efi file, and
/boot/ directory has a grub subdirectory plus a bunch of grub boot files like vmlinuz, system.map and config files.

Partition 1 is mounted as /boot
Same as mine :)
Top
Post Reply

9 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic