You are not logged in.

#1 2022-08-30 22:22:30

LemonPA
Member
Registered: 2022-08-30
Posts: 6

[SOLVED]grub esp

After locking at  GRUB's wiki page, I'm still confused where exactly is "esp"?

Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC WD5000LPVX-5
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 7B345BC8-CAE3-8B4B-96FF-A954356AE292

Device         Start       End   Sectors   Size Type
/dev/sda1       2048   1026047   1024000   500M BIOS boot
/dev/sda2    1026048 126855167 125829120    60G Linux filesystem
/dev/sda3  126855168 976773134 849917967 405.3G Linux filesystem

is it
"/dev/sda" or
"sda1" or
"sda" or
"/boot/" or
"/boot/EFI/"

i want to use it for this line:

grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB"

what should i put instead of "esp"

Last edited by LemonPA (2022-08-30 22:47:22)

Offline

#2 2022-08-30 22:35:27

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: [SOLVED]grub esp

It should be a FAT32 partition usually first on the boot disk, /dev/sda in your case.  So /dev/sda1 is esp.  You mount it to /boot/efi

Offline

#3 2022-08-30 22:44:18

LemonPA
Member
Registered: 2022-08-30
Posts: 6

Re: [SOLVED]grub esp

so what's the problem then. should i first mount this or something?

 ~]$ sudo grub-install --target=x86_64-efi --efi-directory=/dev/sda1 --bootloader-id=GRUB
[sudo] password for suren:
Installing for x86_64-efi platform.
grub-install: error: failed to get canonical path of `dev'.

Offline

#4 2022-08-30 22:44:36

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED]grub esp

There is no ESP on that drive as you haven't created one yet.
A 'BIOS boot' partition and a 'ESP partition' are completely different things.
A 'BIOS boot' partition is only required of you are using a GPT partitioned drive and booting in BIOS (not UEFI) mode, it shouldn't ever be mounted, and only has to be 2MB in size.

If you wan't to use sda1 as an EFI partition then you need to reformat it first...
https://wiki.archlinux.org/title/EFI_system_partition


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2022-08-30 22:47:04

LemonPA
Member
Registered: 2022-08-30
Posts: 6

Re: [SOLVED]grub esp

oh, i was confused. i get it. thanks

instead of  "esp"  it should be "/boot"

the only thing i didn't checked for

Last edited by LemonPA (2022-08-30 22:58:57)

Offline

#6 2022-08-31 10:25:03

MindTheGAAP
Member
Registered: 2022-03-16
Posts: 6

Re: [SOLVED]grub esp

LemonPA wrote:

so what's the problem then. should i first mount this or something?

 ~]$ sudo grub-install --target=x86_64-efi --efi-directory=/dev/sda1 --bootloader-id=GRUB
[sudo] password for suren:
Installing for x86_64-efi platform.
grub-install: error: failed to get canonical path of `dev'.

Hi, how did you solve it ?

I am also getting the same error.

I followed the instructions above and get error
grub-install: error: boot doesn’t look like an EFI partition


My sda1 is vfat

Offline

#7 2022-08-31 11:05:25

LemonPA
Member
Registered: 2022-08-30
Posts: 6

Re: [SOLVED]grub esp

MindTheGAAP wrote:
LemonPA wrote:

so what's the problem then...

Hi, how did you solve it...

put the output of this:

fdisk -l /dev/sda
lsblk
ls /sys/firmware/efi

Last edited by LemonPA (2022-08-31 11:12:28)

Offline

#8 2022-08-31 11:12:03

MindTheGAAP
Member
Registered: 2022-03-16
Posts: 6

Re: [SOLVED]grub esp

LemonPA wrote:
MindTheGAAP wrote:
LemonPA wrote:

so what's the problem then...

Hi, how did you solve it...

put the output of this two:

fdisk -l /dev/sda
lsblk

Let me take a look in evening. Out to work atm

But I chroored into my BTRFS + crypt volume

And can’t seem to run grub-install.

Keeps getting msg that /boot/efi is not found


Edit: Here is the image https://ibb.co/25XD8WQ

Last edited by MindTheGAAP (2022-08-31 11:19:38)

Offline

#9 2022-08-31 12:19:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED]grub esp

You need to run grub-install and point to the directory where you mounted your ESP normally.

From this output, granted you indeed intend to have the ESP mounted to /boot/efi, you need to

mount /dev/sda2  /mnt 
mount /dev/sda1 /mnt/boot/efi
arch-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

assuming you always had your ESP mounted to /boot/efi which is something you should know since you configured it. If you are unsure, after the chroot step, post the contents of your fstab and ls -l /boot

Since this thread is marked solved you might consider opening a new one.

Last edited by V1del (2022-08-31 12:19:39)

Offline

Board footer

Powered by FluxBB