Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937785 - sys-kernel/linux-firmware emerge fails without mounted EFI partition
Summary: sys-kernel/linux-firmware emerge fails without mounted EFI partition
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Chí-Thanh Christopher Nguyễn
URL:
Whiteboard:
Keywords:
: 939760 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-08-11 20:16 UTC by Nikos Chantziaras
Modified: 2024-12-12 12:10 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos Chantziaras 2024-08-11 20:16:46 UTC
Trying to emerge sys-kernel/linux-firmware (currently 20240811, but this started happening a few versions ago already) aborts with:

>>> Running pre-merge checks for sys-kernel/linux-firmware-20240811
 * Assuming you do not have a separate /boot partition.
 * Assuming you do not have a separate /efi partition.
 * Your /boot/efi partition is not mounted
 * Please mount it and retry.
 * ERROR: sys-kernel/linux-firmware-20240811::gentoo failed (pretend phase):
 *   /boot/efi not mounted

It didn't use to fail in the past. All this package needs is my /boot directory (I don't have a separate boot partition.) It doesn't need access to my EFI partition. /boot/efi is the mount point for the EFI partition, and I only mount if I need to reinstall Grub.
Comment 1 Nikos Chantziaras 2024-08-11 20:18:33 UTC
$ emerge --info =linux-firmware-20240811
Portage 3.0.65 (python 3.12.5-final-0, default/linux/amd64/23.0/desktop/plasma/systemd, gcc-13, glibc-2.39-r6, 6.6.44-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.6.44-gentoo-x86_64-AMD_Ryzen_7_3700X_8-Core_Processor-with-glibc2.39
KiB Mem:    32801032 total,  21001392 free
KiB Swap:    5665600 total,   5665600 free
Timestamp of repository gentoo: Sun, 11 Aug 2024 19:30:00 +0000
Head commit of repository gentoo: aa1a667c12222aba2b9c06b30c789c4b39841c84
Timestamp of repository steam-overlay: Sat, 10 Aug 2024 14:21:51 +0000
Head commit of repository steam-overlay: f58515ef7cbf5a30fa9ebab679166065dc0f36e5

sh bash 5.2_p32
ld GNU ld (Gentoo 2.43 p1) 2.43.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p32::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.17-r1::gentoo
dev-build/cmake:           3.30.2::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.5.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.12.5::gentoo
dev-lang/rust-bin:         1.79.0::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-apps/systemd:          256.4::gentoo
sys-devel/binutils:        2.43::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           18.1.8::gentoo
sys-devel/gcc:             13.3.1_p20240614::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            18.1.8-r4::gentoo
sys-kernel/linux-headers:  6.9::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::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-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 3

local
    location: /usr/local/portage
    masters: gentoo
    volatile: True

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -mtune=native -march=native -ftree-vectorize -fvect-cost-model=dynamic"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /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/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/vmware-installer"
CXXFLAGS="-O2 -pipe -mtune=native -march=native -ftree-vectorize -fvect-cost-model=dynamic"
DISTDIR="/mnt/Data/cache/gentoo/distfiles"
EMERGE_DEFAULT_OPTS="--backtrack=200 --with-bdeps=y"
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="-O2 -pipe -mtune=native -march=native -ftree-vectorize -fvect-cost-model=dynamic"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg 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="-O2 -pipe -mtune=native -march=native -ftree-vectorize -fvect-cost-model=dynamic"
GENTOO_MIRRORS="    ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/     http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/     http://gentoo.mirrors.ovh.net/gentoo-distfiles/     http://ftp.ntua.gr/pub/linux/gentoo/ "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en_US en"
MAKEOPTS="-j16"
PKGDIR="/mnt/Data/cache/gentoo/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="X a52 aac acl acpi activities amd64 avif branding bzip2 cairo cdr cet crypt dbus declarative dri dts dvdr emoji encode exif flac gdbm gif gpm grub gtk gui iconv icu ipv6 jpeg jpegxl kde kf6compat kwallet lcms libnotify libtirpc lto mad mng mp3 mp4 mpeg multilib ncurses networkmanager nvidia offensive ogg opengl openmp pam pango pcre pdf pgo pipewire plasma png policykit ppds pulseaudio qml qt5 readline screencast sdl seccomp sound spell ssl startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wayland webp widgets wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64 32" ADA_TARGET="gcc_12" 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="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US en" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_SLOT="18" LLVM_TARGETS="WebAssembly" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="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, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, 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
Comment 2 Ionen Wolkens gentoo-dev 2024-08-11 22:29:23 UTC
That check is done only with USE=initramfs to update the initramfs w/ new firmwares and such, which may or may not need efi as well depending on setup.

If want to keep that enabled and you know your setup is right then you can DONT_MOUNT_BOOT="1" in package.env or make.conf or so which also ignores EFI.

Maybe checks could be improved, or at least DONT_MOUNT_BOOT could be documented in mount-boot-utils' eclassdocs as a user variable and advertised in the error messages. Personally had to set this in my binpkg-building chroot which is not meant to boot, and had to dig in the eclass to figure out what I can do about it.

CC'ing andrew given been handling this area.
Comment 3 Nowa Ammerlaan gentoo-dev 2024-08-12 07:02:10 UTC
(In reply to Nikos Chantziaras from comment #0)
> It doesn't need access
> to my EFI partition. /boot/efi is the mount point for the EFI partition, and
> I only mount if I need to reinstall Grub.

It indeed does not if you use GRUB, but it does if you use systemd-boot, uki's or efistub booting. There is no reliable way for the ebuild to obtain that information beforehand, and hence it enforces that both partitions are mounted.

I'll look into improving the documentation.
Comment 4 Nowa Ammerlaan gentoo-dev 2024-09-17 18:57:14 UTC
*** Bug 939760 has been marked as a duplicate of this bug. ***
Comment 5 gen2dev 2024-09-17 21:33:46 UTC
*** Bug 939760 has been marked as a duplicate of this bug. ***
Comment 6 Zentoo 2024-12-12 12:10:02 UTC
The use of DONT_MOUNT_BOOT="1" need to be write as emerge notice (especially for openrc+grub users).

I found this bug after have coded an env hook for sys-kernel/linux-firmware to automount/umount /boot/efi while I could have simply used this env variable.