You are not logged in.

#1 2014-03-12 18:55:51

Removed01
Member
Registered: 2013-11-05
Posts: 17

grub-install: "cannot find EFI directory" (CSM mode)

Hi,
I'm trying to install grub on the mbr with 'grub-install /dev/sdb', but I get "cannot find EFI directory'. I have an Asus laptop with secure boot disabled and CSM enabled (I *need* CSM because otherwise - I don't know the reason - I can't boot from USB/disk). I have Windows 7 installed (/dev/sdb2) and I know there's a small partition (/dev/sdb1) which was created during Windows 7 installation which contains a 'Boot' directory, a 'bootmgr' file and other stuff. Now, my purpose is to dual boot Windows 7 and Arch while the BIOS is in CSM mode. The problem is that a simple grub-install /dev/sdX does not work as expected (under Gentoo, it simply worked out-of-the-box). By now, I can chroot into my fresh Arch installation (/dev/sdb3). Another thing: possible targets for grub-install are 'i686-pc' and 'x86_64-efi'; when running grub-install the program automatically selects 'x86_64.efi' as target. I don't know if it's correct (I do have an AMD64 laptop, just to clarify). Thanks in advance.

Offline

#2 2014-03-13 02:39:39

aryklein
Member
From: Cordoba, Argentina
Registered: 2014-02-18
Posts: 5

Re: grub-install: "cannot find EFI directory" (CSM mode)

By default grub-install uses target x86_64-efi. You don't have a UEFI system so I thing you should use:

 # grub-install --target=i386-pc --recheck /dev/sdb 

Please read the arch wiki: https://wiki.archlinux.org/index.php/GRUB

--target=i386-pc instructs grub-install to install for BIOS systems only. It is recommended to always use this option to remove ambiguity in grub-install.

Regards

Last edited by aryklein (2014-03-13 02:40:11)

Offline

#3 2014-10-24 02:02:34

axelabs
Member
Registered: 2011-09-09
Posts: 2

Re: grub-install: "cannot find EFI directory" (CSM mode)

I was receiving the same error during my grub-install when following this install guide.  What I was missing was a vfat filesystem on the 'EFI System' partition.  Once I had it I mounted it on /boot/efi and ran the install again as such:

grub-install --efi-directory=/boot/efi --target=x86_64-efi /dev/sdX

I also had to re-name a file on my HP Pavilion x2 to boot as noted here.

Offline

#4 2014-10-24 13:12:44

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: grub-install: "cannot find EFI directory" (CSM mode)

axelabs wrote:

I was receiving the same error during my grub-install when following this install guide.  What I was missing was a vfat filesystem on the 'EFI System' partition.  Once I had it I mounted it on /boot/efi and ran the install again as such:

grub-install --efi-directory=/boot/efi --target=x86_64-efi /dev/sdX

I also had to re-name a file on my HP Pavilion x2 to boot as noted here.

There are a lot of things wrong with your post:
First, don't ever follow external guides for installing arch linux, instead refer to the beginner's guide in the wiki if you want to receive help on this forum.
Secondly, you don't seem to understand that your problem is a completely different one than described in the original post. The OP does not use UEFI, but CSM. Please read the first post.
Also OP does not mention that he has this specific HP model like you that requires additional steps, so your note about renaming a file is irrelevant for now.

Offline

#5 2014-10-24 18:06:08

Blasphemist
Member
From: Colorado
Registered: 2013-01-17
Posts: 160

Re: grub-install: "cannot find EFI directory" (CSM mode)

Hi,
I'm trying to install grub on the mbr with 'grub-install /dev/sdb', but I get "cannot find EFI directory'. I have an Asus laptop with secure boot disabled and CSM enabled (I *need* CSM because otherwise - I don't know the reason - I can't boot from USB/disk). I have Windows 7 installed (/dev/sdb2) and I know there's a small partition (/dev/sdb1) which was created during Windows 7 installation which contains a 'Boot' directory, a 'bootmgr' file and other stuff. Now, my purpose is to dual boot Windows 7 and Arch while the BIOS is in CSM mode. The problem is that a simple grub-install /dev/sdX does not work as expected (under Gentoo, it simply worked out-of-the-box). By now, I can chroot into my fresh Arch installation (/dev/sdb3). Another thing: possible targets for grub-install are 'i686-pc' and 'x86_64-efi'; when running grub-install the program automatically selects 'x86_64.efi' as target. I don't know if it's correct (I do have an AMD64 laptop, just to clarify). Thanks in advance.

You are telling the system to act like it is a BIOS system as far as the boot process goes but I don't think you are using a disk with a MBR, master boot record partition table. Is your disk actually GPT? This is a common gotcha when trying to use CSM mode on a UEFI based system since UEFI systems come with GPT disks. I believe this describes Grub installation in your configuration.
https://wiki.archlinux.org/index.php/GR … structions

To be clear though, I don't think this is a good direction to go. This isn't keeping things simple though that may have been why you chose to do it. I don't have enough information to know but it sounds like your disk expected to be in a UEFI system and was created with a GPT partition scheme. I would use it that way for Arch and for Windows if you choose to have that installed. I think it creates unneeded complexity to create a hybrid UEFI/BIOS configuration. I would always have all disks using the same partition scheme (the reason you can't boot "USB/disk" may be that you need GPT) and all OS's booting UEFI on a UEFI system.


Simple and Open

Offline

#6 2018-11-09 08:04:41

bluefigtoast
Guest

Re: grub-install: "cannot find EFI directory" (CSM mode)

This worked well for fixing the Ubuntu 18.04 issue with the couldn't find EFI-directory issue.  Note the you need to mount the major points /proc/, /sys/, /dev/ and then chroot to it, before running the commands you list here.  You can find those instructions at:  http://www.pkill-9.com/recovering-ubunt … allhiccup/

Thanks -- this got me out of a major jam!

Wayno

#7 2018-11-09 08:10:38

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: grub-install: "cannot find EFI directory" (CSM mode)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB