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: 471

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: 471

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: 471

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: 471

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: 471

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 - content of /etc/fstab

and https://wiki.gentoo.org/wiki/Wgetpaste - e.g. wgetpaste --verbose --service 0x0 /boot/grub/grub.cfg <<< provide the link in your answer.

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: 471

PostPosted: Sat Jan 11, 2025 9:00 pm    Post subject: Reply with quote

Code:

Portage 3.0.66.1 (python 3.12.8-final-0, default/linux/amd64/23.0, gcc-14, glibc-2.40-r5, 6.6.67 x86_64)
=================================================================
System uname: Linux-6.6.67-x86_64-Intel-R-_Core-TM-_i9-9880H_CPU_@_2.30GHz-with-glibc2.40
KiB Mem:    65582828 total,  35352128 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 08 Jan 2025 12:05:00 +0000
Head commit of repository gentoo: a85c9b435cda4ae3f04fe9888bc921289add58be
sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p3) 2.43.1
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.30.6::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.5.2::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.12.8::gentoo, 3.13.1::gentoo
dev-lang/rust-bin:         1.82.0-r101::gentoo
llvm-core/clang:           18.1.8-r6::gentoo, 19.1.4::gentoo
llvm-core/lld:             19.1.4::gentoo
llvm-core/llvm:            18.1.8-r6::gentoo, 19.1.4::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/openrc:           0.55.1::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.43-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             14.2.1_p20241221::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r5::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-max-age: 3
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=skylake -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d"
CXXFLAGS="-march=skylake -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=skylake -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=skylake -O2 -pipe"
GENTOO_MIRRORS="rsync://mirrors.tera-byte.com/gentoo"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="aac acl acpi afs amd64 audit bluetooth brotli bzip2 caps cet colord crypt cuda cups curl dbus dist-kernel djvu dri encode exif extra fam fbcon ffmpeg fontconfig gdbm geoip geolocation git gnome-keyring gtk hardened hddtemp http2 iconv imagemagick imap imlib inotify ipv6 jack jpeg jpeg2k keyring lame libnotify libtirpc libzfs lz4 lzip lzma lzo mad magic man mp3 mtp multilib ncurses nls nsplugin nvenc opengl openmp pam pcre pdf pie png policykit posix pulseaudio raw readline sasl sctp seccomp skey sockets socks5 sound spell ssl startup-notification svg symlink syslog test-rust truetype ttf udev uefi unicode upower usb v4l vaapi vdpau vpx wayland webkit webp wifi x264 xattr xinerama zip zlib zsh-completion zstd" ABI_X86="64" ADA_TARGET="gcc_13" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS


Code:

# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
#
# To populate all changes in this file you need to regenerate your
# grub configuration file afterwards:
#     'grub-mkconfig -o /boot/grub/grub.cfg'
#
# See the grub info page for documentation on possible variables and
# their associated values.

GRUB_DISTRIBUTOR="Gentoo"

# Default menu entry
#GRUB_DEFAULT=0

# Boot the default entry this many seconds after the menu is displayed
#GRUB_TIMEOUT=5
#GRUB_TIMEOUT_STYLE=menu

# Append parameters to the linux kernel command line
#GRUB_CMDLINE_LINUX=""
#
# Examples:
#
# Boot with network interface renaming disabled
# GRUB_CMDLINE_LINUX="net.ifnames=0"
#
# Boot with systemd instead of sysvinit (openrc)
# GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd"

# Append parameters to the linux kernel command line for non-recovery entries
#GRUB_CMDLINE_LINUX_DEFAULT=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# Resolution used on graphical terminal.
# The list of valid modes may be obtained using the 'vbeinfo' (PC BIOS) or
# 'videoinfo' (EFI) command from a GRUB boot prompt.
#GRUB_GFXMODE=640x480

# Set to 'text' to force the Linux kernel to boot in normal text
# mode, 'keep' to preserve the graphics mode set using
# 'GRUB_GFXMODE', 'WIDTHxHEIGHT'['xDEPTH'] to set a particular
# graphics mode, or a sequence of these separated by commas or
# semicolons to try several modes in sequence.
#GRUB_GFXPAYLOAD_LINUX=

# Path to theme spec txt file.
# The starfield is by default provided with use truetype.
# NOTE: when enabling custom theme, ensure you have required font/etc.
#GRUB_THEME="/boot/grub/themes/starfield/theme.txt"

# Background image used on graphical terminal.
# Can be in various bitmap formats.
#GRUB_BACKGROUND="/boot/grub/mybackground.png"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
#GRUB_DISABLE_LINUX_UUID=true

# Comment if you don't want GRUB to pass "root=PARTUUID=xxx" parameter to kernel
GRUB_DISABLE_LINUX_PARTUUID=false

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY=true

# Uncomment to disable generation of the submenu and put all choices on
# the top-level menu.
# Besides the visual affect of no sub menu, this makes navigation of the
# menu easier for a user who can't see the screen.
#GRUB_DISABLE_SUBMENU=y

# Uncomment to play a tone when the main menu is displayed.
# This is useful, for example, to allow users who can't see the screen
# to know when they can make a choice on the menu.
#GRUB_INIT_TUNE="60 800 1"


I haven't modified /etc/fstab yet because I figured I would do that just before I intend to boot into the system. Does GRUB need that?
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