You are not logged in.

#1 2020-01-10 16:42:32

light9876
Member
Registered: 2020-01-05
Posts: 79

[SOLVED] grub-install: error "cannot find EFI directory"

I never had the following problem when I used to install Arch on an HDD.

But not on my new SSD, this is what I'm doing (note that when I do fdisk -l I can see the SSD has a GPT partitioning table):

1. I have been reading the following guides all day (and I'm following them):
https://wiki.archlinux.org/index.php/Installation_guide
https://wiki.archlinux.org/index.php/Partitioning
https://wiki.archlinux.org/index.php/Arch_boot_process

2. cgdisk /dev/sda and I create 3 partitions:
sda1; 2GB, code:ef00, name=efi
sda2; 200GB, code:8300, name=root
sda3; ~750GB, code:8302, name=home

3. I format all 3 partitions:
mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda2
mkfs.ext4 /dev/sda3

4. Mount root:
mount /dev/sda2 /mnt

5. Install base:
pacstrap /mnt base base-devel linux grub efibootmgr
mkinitcpio -p linux

6. : All of the following commands give the same error: grub-install: error "cannot find EFI directory"
grub-install /dev/sda
grub-install --target=x86_64-efi /dev/sda
grub-install --efi-directory=/boot/efi --target=x86_64-efi /dev/sda

Can someone tell me what I am doing wrong please?

Last edited by light9876 (2020-01-10 18:37:40)

Offline

#2 2020-01-10 17:09:51

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,534
Website

Re: [SOLVED] grub-install: error "cannot find EFI directory"

You forgot to mount the EFI system partition, it should be FAT-formatted (not ext4) and you should (arch-)chroot in before running the GRUB commands.

Step 4 should be

# mount /dev/sda2 /mnt
# mkdir -p /mnt/boot/efi
# mount /dev/sda1 /mnt/boot/efi

And step 6 should start with

# arch-chroot /mnt

Note that the UEFI grub-install command doesn't need a block device.

EDIT: and the mkinitcpio command should be run from the chroot (although you probably don't need to run it at all).

Last edited by Head_on_a_Stick (2020-01-10 17:11:24)

Offline

#3 2020-01-10 17:15:38

light9876
Member
Registered: 2020-01-05
Posts: 79

Re: [SOLVED] grub-install: error "cannot find EFI directory"

Thank you, I will try this immediately!

I am already doing arch-chroot /mnt but I forgot to mention it.

I will try now to format correctly and to mount /mnt/boot/efi

Last edited by light9876 (2020-01-10 17:15:58)

Offline

#4 2020-01-10 18:46:02

light9876
Member
Registered: 2020-01-05
Posts: 79

Re: [SOLVED] grub-install: error "cannot find EFI directory"

Thank you so much everything works okay now!

Only for future reference: the information you provided is written here:
https://wiki.archlinux.org/index.php/GR … allation_2

One final question:
I installed lxde and lxdm; then I logged in my user account. Now the partition /dev/sda3 that I created for /home, is not mounted at /home.

Instead, /home directory and all of its contents are resident on /dev/sda2

How can I fix this please?

Last edited by light9876 (2020-01-10 18:46:36)

Offline

#5 2020-01-10 18:58:31

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,534
Website

Re: [SOLVED] grub-install: error "cannot find EFI directory"

light9876 wrote:

How can I fix this please?

Create an fstab line to mount /home correctly then move the contents over to the new partition.

If you need more help with that then please open a new thread, it is off-topic here.

Offline

#6 2020-01-10 20:09:57

light9876
Member
Registered: 2020-01-05
Posts: 79

Re: [SOLVED] grub-install: error "cannot find EFI directory"

Thank you so much! I am very happy with the generous support you and everyone else have given me! : ) God bless you!

Last edited by light9876 (2020-01-10 20:10:39)

Offline

Board footer

Powered by FluxBB