You are not logged in.

#1 2022-09-10 11:58:28

jeromeBdt
Member
Registered: 2020-12-03
Posts: 21

[SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

Hello,

I am trying to re-install grub as advise in the Arch latest news

After a grub package update it is advised to run both, installation and regeneration of configuration

Unfortunatly when running the cmd

grub-install --target=x86_64-efi --bootloader-id=grub_uefi --efi-directory=/boot/EFI

  it returns

Installing for x86_64-efi platform.
grub-install: error: /boot/EFI doesn't look like an EFI partition.

/boot/EFI is present but empty

pwd
/boot
ls
amd-ucode.img  grub                          initramfs-linux.img               initramfs-linux-lts.img  vmlinuz-linux-lts
EFI            initramfs-linux-fallback.img  initramfs-linux-lts-fallback.img  vmlinuz-linux

Any hint how I can do that ? thank you

Last edited by jeromeBdt (2022-09-11 01:48:02)

Offline

#2 2022-09-10 12:04:30

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

Well, for starters you could do lsblk, then see which partition is the vfat EFI System Partition.
Then do the grub-install there instead.

I'm guessing you mounted it in /boot?


My reposSome snippets

Heisenberg might have been here.

Offline

#3 2022-09-10 12:15:50

jeromeBdt
Member
Registered: 2020-12-03
Posts: 21

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

Thanks for the help,

lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
nvme0n1     259:0    0 476.9G  0 disk 
├─nvme0n1p1 259:1    0   512M  0 part 
└─nvme0n1p2 259:2    0 476.4G  0 part /

When installing Arch I mounted it like so(only a partition for EFI and a second one for the reste)

mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
mkdir /boot/EFI
mount /dev/sda1 /boot/EFI
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck

How do I target the partition "nvme0n1p1"(I guess ?) as it's not a directory ? (I mean the cmd flag is --efi-directory=)

Last edited by jeromeBdt (2022-09-10 12:22:55)

Offline

#4 2022-09-10 12:21:54

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

Well, mount it first?
Its not mounted, as one can see by the lack of mount-point.

And no on the partition, that's legacy boot stuff.


My reposSome snippets

Heisenberg might have been here.

Offline

#5 2022-09-10 12:27:21

jeromeBdt
Member
Registered: 2020-12-03
Posts: 21

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

sorry it may sound stupid, but how I do that ?

Offline

#6 2022-09-10 12:33:18

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

jeromeBdt wrote:

...
mount /dev/sda1 /boot/EFI
...

You already know?
How did you install ArchLinux again?

Regardless, do a `sudo mount /dev/sda1 /boot/EFI`, since you most likely are a regular user atm, then do a grub-install.

Future note, as long as you don't do a grub-mkconfig, you don't need to do grub-install on each grub update, or you could automate it if grub-mkconfig for some reason also is.

I suggest doing something about your fstab, I have no idea how did you end with a non-mounted ESP in the first place, or well, don't want to make assumptions of how.

jreomeBdt wrote:

sorry it may sound stupid

Being pedantic, lack of knowledge doesn't make one stupid, so you are fine, however I advise against copy pasting code, or else ArchLinux becomes a terrible choice.

Last edited by GaKu999 (2022-09-10 12:36:29)


My reposSome snippets

Heisenberg might have been here.

Offline

#7 2022-09-10 12:48:57

jeromeBdt
Member
Registered: 2020-12-03
Posts: 21

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

Tks,

It does not work.

[root@thearch ~]# mount /dev/sda1 /boot/EFI
mount: /boot/EFI: special device /dev/sda1 does not exist.
       dmesg(1) may have more information after failed mount system call.

doing df I got that

[root@thearch ~]# df
Filesystem     1K-blocks      Used Available Use% Mounted on
dev              7848908         0   7848908   0% /dev
run              7866352      1312   7865040   1% /run
/dev/nvme0n1p2 490618108 342867316 122755296  74% /
tmpfs            7866352    102504   7763848   2% /dev/shm
tmpfs            7866352     14440   7851912   1% /tmp
tmpfs            1573268        40   1573228   1% /run/user/1000

But it is the nvme0n1p2 partition, and I should access the nvme0n1p1, don't I ?

Last edited by jeromeBdt (2022-09-10 12:50:00)

Offline

#8 2022-09-10 12:52:43

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

My apologies, you seem to be using an nvme and I mixed the command up with whatever the "I installed Arch with this" was supposed to be.

sudo mount /dev/nvme0n1p1 /boot/EFI

Last edited by GaKu999 (2022-09-10 12:52:57)


My reposSome snippets

Heisenberg might have been here.

Offline

#9 2022-09-10 14:56:30

jeromeBdt
Member
Registered: 2020-12-03
Posts: 21

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

It's gives me this

sudo mount /dev/nvme0n1p1 /boot/EFI
mount: /boot/EFI: unknown filesystem type 'vfat'.
       dmesg(1) may have more information after failed mount system call.

Is that bc the fs of the uefi partition has been setted as FAT32 and the reste as EXT4 any hint to fix that again ? (sorry to ask you again, I scare to break all)

Last edited by jeromeBdt (2022-09-10 15:06:52)

Offline

#10 2022-09-10 15:05:42

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

Probably can't load the module for FAT filesystems, which mean you probably did a kernel update recently without a reboot.
You might need to do a reboot.

Have an archiso by hand as well...

Last edited by GaKu999 (2022-09-10 15:06:05)


My reposSome snippets

Heisenberg might have been here.

Offline

#11 2022-09-10 15:09:01

jeromeBdt
Member
Registered: 2020-12-03
Posts: 21

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

yes, I just did an update(pacman -Syu), but I scare to reboot as maybe grub won't work properly... ? so it's fine to reboot ?

Last edited by jeromeBdt (2022-09-10 15:10:09)

Offline

#12 2022-09-10 15:14:10

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

jeromeBdt wrote:

yes, I just did an update(pacman -Syu), but I scare to reboot as maybe grub won't work properly... ? so it's fine to reboot ?

Could edit the grub config by hand and remove the fwsetup bit if the grub update breakage is a problem on your end.
And always have an archiso at reach.


My reposSome snippets

Heisenberg might have been here.

Offline

#13 2022-09-10 15:27:22

jeromeBdt
Member
Registered: 2020-12-03
Posts: 21

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

there is no fwsetup in the grub.conf, I will try a reboot so. Tks

Offline

#14 2022-09-11 01:42:06

jeromeBdt
Member
Registered: 2020-12-03
Posts: 21

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

It rebooted without any problem, I mounted the /boot/EFI to /dev/nvme0n1p1 as you told me, worked great and I could re-install and re-configure grub

mount /dev/nvme0n1p1 /boot/EFI
lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
nvme0n1     259:0    0 476.9G  0 disk 
├─nvme0n1p1 259:1    0   512M  0 part /boot/EFI
└─nvme0n1p2 259:2    0 476.4G  0 part /
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --efi-directory=/boot/EFI
grub-mkconfig -o /boot/grub/grub.cfg

@GaKu999 thank you for your help, patience and time, I really appreciate it.

Last edited by jeromeBdt (2022-09-11 01:43:08)

Offline

#15 2024-09-21 23:06:39

makkusu
Member
Registered: 2024-09-21
Posts: 3

Re: [SOLVED]grub-install:error:/boot/EFI doesnt look like an EFI partition

GaKu999 wrote:

Well, for starters you could do lsblk, then see which partition is the vfat EFI System Partition.
Then do the grub-install there instead.

I'm guessing you mounted it in /boot?

Thanks for the info.  Brand new user here (a few weeks) and this was very helpful.  Helped me set up secure boot with grub and sbctl.  I was missing the correct mount point.

Offline

Board footer

Powered by FluxBB