Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub-install --efi-directory=/efi - unknown filesystem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
o5gmmob8
Guru
Guru


Joined: 17 Oct 2003
Posts: 470

PostPosted: Sat Jan 11, 2025 6:24 pm    Post subject: grub-install --efi-directory=/efi - unknown filesystem Reply with quote

I've been away from Gentoo for the past few years and am setting it up once again.

Before I migrate to secure boot, I need to get UEFI booting working.

I'm following the handbook:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader#UEFI_systems

I partitioned the disk with ZFS (using the admin cd) and have nvme0n1p1 - vfat, and nvme0n1p2 - encrypted ZFS (ZFS on top of LUKS). I have the EFI partition mounted at /efi and upon running

Code:
grub-install --efi-directory=/efi


I get unknown filesystem.

The EFI partition is indeed mounted at /efi and I am performing these operations inside the chrooted environment with all of the mount points setup, /dev, /sys, /run, and /proc. I also mounted efivarfs @ /sys/firmware/efi/efivars.

I ran grub-install with --verbose and I think it is looking at the second partition for whatever reason. I think I created the proper partition table, but I must be missing something.
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1495
Location: Earth

PostPosted: Sat Jan 11, 2025 6:51 pm    Post subject: Reply with quote

maybe you forgot to:

https://wiki.gentoo.org/wiki/ZFS#Bootloader
Quote:
Bootloader

GRUB should be compiled with libzfs USE-flag in order to boot system from ZFS dataset:
echo "sys-boot/grub libzfs" > /etc/portage/package.use/grub
emerge -av grub

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
o5gmmob8
Guru
Guru


Joined: 17 Oct 2003
Posts: 470

PostPosted: Sat Jan 11, 2025 7:04 pm    Post subject: Reply with quote

Yes, you might be right. I'm rebuilding grub now :).
Back to top
View user's profile Send private message
o5gmmob8
Guru
Guru


Joined: 17 Oct 2003
Posts: 470

PostPosted: Sat Jan 11, 2025 7:17 pm    Post subject: Reply with quote

No changes, I'm getting the same thing.

These are the use flags I see for grub:
https://wiki.gentoo.org/wiki/GRUB#USE_flags

I have my use set to:

Code:
device-mapper fonts libzfs nls themes truetype


and my GRUB_PLATFORM set to
Code:
efi-64
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1495
Location: Earth

PostPosted: Sat Jan 11, 2025 7:35 pm    Post subject: Reply with quote

Quote:
I have the EFI partition mounted at /efi and upon running

don't get me wrong, but shouldn't it be /boot/efi ?

after i mounted the root partition i do ' mkdir --parents /mnt/gentoo/boot/efi '

and then, e.g. mount /dev/sdX1 /mnt/gentoo/boot/efi

and, my system only works via grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable

i don't use or tried ZFS at all - just want to help :)

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "


Last edited by CooSee on Sat Jan 11, 2025 7:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
o5gmmob8
Guru
Guru


Joined: 17 Oct 2003
Posts: 470

PostPosted: Sat Jan 11, 2025 7:38 pm    Post subject: Reply with quote

Not sure.

Here is what I did just now:

Code:

umount /efi
mkdir -p /boot/efi

mount /dev/nvme0n1p1 /boot/efi/
grub-install --efi-directory=/boot/efi



Code:

Installing for x86_64-efi platform.
grub-install: error: unknown filesystem.


It shouldn't matter, but I created my ZFS as: z_512.0/gentoo/ROOT and on the livecd, that is mounted at /mnt/gentoo/z_512.0/gentoo/ROOT. I have ssh running in the chroot and I'm installing remotely, so I get dropped into the root properly.
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1495
Location: Earth

PostPosted: Sat Jan 11, 2025 7:45 pm    Post subject: Reply with quote

what about the libzfs USE flags for grub - is it enabled on your system ?

https://packages.gentoo.org/packages/sys-boot/grub
Code:
device-mapper fonts mount nls themes truetype -doc -efiemu -libzfs -sdl -secureboot -test -verify-sig

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
o5gmmob8
Guru
Guru


Joined: 17 Oct 2003
Posts: 470

PostPosted: Sat Jan 11, 2025 7:45 pm    Post subject: Reply with quote

I enabled it just for grub, but yeah, good point, let me check if it needs to be a global use flag.

I think it is a local USE flag only.
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1495
Location: Earth

PostPosted: Sat Jan 11, 2025 8:47 pm    Post subject: Reply with quote

Quote:
I think it is a local USE flag only.

yes, it's only for grub.

you're using luks on top - more info about your settings is needed to help you in better way.

please show your emerge --info

the content of your /etc/default/grub - output of blkid - /etc/fstab

and https://wiki.gentoo.org/wiki/Wgetpaste - e.g. wgetpaste --verbose --service 0x0 /boot/grub/grub.cfg

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum