This is with sys-kernel/gentoo-sources-6.6.13. With the previous stable version, 4.3.6, everything is fine. Once I upgrade to 4.3.10, I get the following: # genkernel initramfs * Gentoo Linux Genkernel; Version 4.3.10 * Using genkernel configuration from '/etc/genkernel.conf' ... * Running with options: initramfs * Working with Linux kernel 6.6.13-gentoo for x86_64 * Using kernel config file '/usr/share/genkernel/arch/x86_64/generated-config' ... * Current kernel's LOCALVERSION is set to ''; Will ignore set --kernel-localversion value '-x86_64' because kernel was not built ... * initramfs: >> Initializing ... * >> Appending devices cpio data ... * >> Appending base_layout cpio data ... * >> Appending util-linux cpio data ... * >> Appending eudev cpio data ... * >> Appending auxiliary cpio data ... * >> Appending busybox cpio data ... * >> Appending btrfs cpio data ... * >> Appending modprobed cpio data ... * >> Appending firmware cpio data ... cat: /var/tmp/genkernel/gk_iAp5Fxna/mod_prefix/lib/modules/6.6.13-gentoo/modules.alias: No such file or directory cat: /var/tmp/genkernel/gk_iAp5Fxna/mod_prefix/lib/modules/6.6.13-gentoo/modules.builtin: No such file or directory cat: /var/tmp/genkernel/gk_iAp5Fxna/mod_prefix/lib/modules/6.6.13-gentoo/modules.dep: No such file or directory * ERROR: modinfo error! * Please consult '/var/log/genkernel.log' for more information and any * errors that were reported above. * * Report any genkernel bugs to bugs.gentoo.org and * assign your bug to genkernel@gentoo.org. Please include * as much information as you can in your bug report; attaching * '/var/log/genkernel.log' so that your issue can be dealt with effectively. * * Please do *not* report kernel compilation failures as genkernel bugs! * The three named files *do* exist in /lib/modules/6.6.13-gentoo; I can’t check in /var/tmp/genkernel/gk_iAp5Fxna because that directory has already been deleted. Reproducible: Always # emerge --info sys-kernel/genkernel Portage 3.0.61 (python 3.11.7-final-0, default/linux/amd64/17.1/systemd/merged-usr, gcc-13, glibc-2.38-r9, 6.6.13-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-6.6.13-gentoo-x86_64-Intel-R-_Core-TM-_i7-4790_CPU_@_3.60GHz-with-glibc2.38 KiB Mem: 8102292 total, 6103396 free KiB Swap: 10486256 total, 10486256 free Timestamp of repository gentoo: Mon, 22 Jan 2024 15:50:17 +0000 Head commit of repository gentoo: 7cb34ebe1dbc8dedbf76e8b23eb6f5b2a353f454 Head commit of repository hawk777: 974e6e53c345a765640f71659014baf6a82bc56f Head commit of repository zaber: 968e45898d6a92b86d1cf4a93f20d2043beb37f7 sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.41 p4) 2.41.0 ccache version 4.8.3 [disabled] app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-build/autoconf: 2.13-r7::gentoo, 2.71-r6::gentoo dev-build/automake: 1.16.5-r1::gentoo dev-build/cmake: 3.27.9::gentoo dev-build/libtool: 2.4.7-r1::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.3.0-r2::gentoo dev-java/java-config: 2.3.3-r1::gentoo dev-lang/perl: 5.38.2-r1::gentoo dev-lang/python: 3.10.13::gentoo, 3.11.7::gentoo, 3.12.1_p1::gentoo dev-lang/rust: 1.74.1::gentoo dev-util/ccache: 4.8.3::gentoo sys-apps/baselayout: 2.14-r1::gentoo sys-apps/sandbox: 2.38::gentoo sys-apps/systemd: 254.7-r1::gentoo sys-devel/binutils: 2.41-r3::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 14.0.6-r4::gentoo, 17.0.6::gentoo sys-devel/gcc: 13.2.1_p20230826::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/lld: 17.0.6::gentoo sys-devel/llvm: 14.0.6-r4::gentoo, 16.0.6::gentoo, 17.0.6::gentoo sys-kernel/linux-headers: 6.6::gentoo (virtual/os-headers) sys-libs/glibc: 2.38-r9::gentoo Repositories: gentoo location: /var/cache/repos/gentoo sync-type: git sync-uri: <irrelevant, a local mirror of the standard Gentoo tree for reducing bandwidth usage> priority: 2 volatile: True <two entries which are not relevant to this issue and do not contain anything kernel-related> local location: /usr/local/portage masters: gentoo priority: 5 volatile: True Installed sets: @admin, @desktop, @dev, @ee, @ethercat, @fonts, @math, @media, @mplab, @office, @portage, @pwsafe, @vim, @web, @xfce ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE freedist" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -fomit-frame-pointer" 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/revdep-rebuild /etc/sandbox.d" CXXFLAGS="-O2 -pipe -march=native -fomit-frame-pointer" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y --complete-graph y -1" 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 -march=native -fomit-frame-pointer" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync 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 -march=native -fomit-frame-pointer" GENTOO_MIRRORS="http://gentoo.gossamerhost.com/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles http://gentoo.osuosl.org/" INSTALL_MASK="/sbin/installkernel" LANG="en_CA.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" 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/cache" SHELL="/bin/bash" USE="X acl amd64 brotli bzip2 cairo caps cli cups dbus dri fontconfig fortran gnome-keyring gtk iconv icu idn ipv6 jpeg keyring libnotify libsamplerate libtirpc lto multilib ncurses nls nvenc opengl openmp pam pcre pgo pipewire png policykit pulseaudio readline seccomp ssl startup-notification systemd test-rust theora tiff truetype udev unicode vaapi vdpau vorbis vulkan webp xattr xinerama xscreensaver zlib" ABI_X86="64" ADA_TARGET="gnat_2021" 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 mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-CA" 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-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" 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, 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 ================================================================= Package Settings ================================================================= sys-kernel/genkernel-4.3.10::gentoo was built with the following: USE="firmware (-ibm)" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_11 -python3_10"
Created attachment 882905 [details] genkernel.log from the failing run
Created attachment 882906 [details] genkernel.conf that caused the failure
(In reply to Christopher Head from comment #0) > The three named files *do* exist in /lib/modules/6.6.13-gentoo; I can’t > check in /var/tmp/genkernel/gk_iAp5Fxna because that directory has already > been deleted. Can you please re check: genkernel --no-cleanup --no-postclear ramdisk Any ideas why it's trying to find it in /var/tmp/genkernel/gk_iAp5Fxna ?
(In reply to Christopher Head from comment #2) > Created attachment 882906 [details] > genkernel.conf that caused the failure Looks like INSTALL="no" changes the default KERNEL_MODULES_PREFIX. I don't have solution yet how genkernel shuld handle it properly. Try to comment this line. BTW, why do you disable this? - RAMDISKMODULES="no"
Related commit: https://github.com/gentoo/genkernel/commit/febeae936c626eb4c0a44654cda2a6351671098b
To answer your questions: > Can you please re check: > genkernel --no-cleanup --no-postclear ramdisk # genkernel --no-cleanup --no-postclear ramdisk * Gentoo Linux Genkernel; Version 4.3.10 * Using genkernel configuration from '/etc/genkernel.conf' ... * Running with options: --no-cleanup --no-postclear ramdisk * Working with Linux kernel 6.6.13-gentoo for x86_64 * Using kernel config file '/usr/share/genkernel/arch/x86_64/generated-config' ... * Current kernel's LOCALVERSION is set to ''; Will ignore set --kernel-localversion value '-x86_64' because kernel was not built ... * initramfs: >> Initializing ... * >> Appending devices cpio data ... * >> Appending base_layout cpio data ... * >> Appending util-linux cpio data ... * >> Appending eudev cpio data ... * >> Appending auxiliary cpio data ... * >> Appending busybox cpio data ... * >> Appending btrfs cpio data ... * >> Appending modprobed cpio data ... * >> Appending firmware cpio data ... cat: /var/tmp/genkernel/gk_N37og1LE/mod_prefix/lib/modules/6.6.13-gentoo/modules.alias: No such file or directory cat: /var/tmp/genkernel/gk_N37og1LE/mod_prefix/lib/modules/6.6.13-gentoo/modules.builtin: No such file or directory cat: /var/tmp/genkernel/gk_N37og1LE/mod_prefix/lib/modules/6.6.13-gentoo/modules.dep: No such file or directory * ERROR: modinfo error! * Please consult '/var/log/genkernel.log' for more information and any * errors that were reported above. * * Report any genkernel bugs to bugs.gentoo.org and * assign your bug to genkernel@gentoo.org. Please include * as much information as you can in your bug report; attaching * '/var/log/genkernel.log' so that your issue can be dealt with effectively. * * Please do *not* report kernel compilation failures as genkernel bugs! * I’ll attach a file listing of the contents of /var/tmp/genkernel/gk_N37og1LE. > Any ideas why it's trying to find it in /var/tmp/genkernel/gk_iAp5Fxna ? Nope! > Looks like INSTALL="no" changes the default KERNEL_MODULES_PREFIX. I don't have solution yet how genkernel shuld handle it properly. Try to comment this line. Is that safe? I don’t want genkernel to break booting if it does something in /boot that is different to how I have my files laid out. I’m using EFI stub, so it’s probably not laid out in a way that genkernel understands. > BTW, why do you disable this? - RAMDISKMODULES="no" Because I don’t need modules in my initramfs. I’d use a non-modular kernel if I had the choice, but since I use x11-drivers/nvidia-drivers, I don’t—but I still build everything else statically, because why not? And x11-drivers/nvidia-drivers specifically works fine not being in the initramfs (as presumably would pretty much any module not needed to mount root fs).
Created attachment 883015 [details] Contents of the genkernel temp dir
(In reply to Christopher Head from comment #6) > cat: > /var/tmp/genkernel/gk_N37og1LE/mod_prefix/lib/modules/6.6.13-gentoo/modules. > dep: No such file or directory > * ERROR: modinfo error! I guess before upgrade to 4.3.10 the KERNEL_MODULES_PREFIX changes in the same way due INSTALL="no". But you didn't use RAMDISKMODULES. If you want to use FIRMWARE="yes" on 4.3.10 (which had a new behavior since 4.3.7), you should have a valid KERNEL_MODULES_PREFIX. Currently you can use ALLFIRMWARE instead of FIRMWARE. As an experiment you could try to enable RAMDISKMODULES on 4.3.6 and you will see the same error (cat: .../modules.dep: No such file or directory). (In reply to Christopher Head from comment #6) > > Looks like INSTALL="no" changes the default KERNEL_MODULES_PREFIX. I don't have solution yet how genkernel shuld handle it properly. Try to comment this line. > > Is that safe? I don’t want genkernel to break booting if it does something > in /boot that is different to how I have my files laid out. I’m using EFI > stub, so it’s probably not laid out in a way that genkernel understands. Need some additional INSTALL=n handling. PR is welcome.
(In reply to Dmitry Baranov from comment #8) > (In reply to Christopher Head from comment #6) > > cat: > > /var/tmp/genkernel/gk_N37og1LE/mod_prefix/lib/modules/6.6.13-gentoo/modules. > > dep: No such file or directory > > * ERROR: modinfo error! > > I guess before upgrade to 4.3.10 the KERNEL_MODULES_PREFIX changes in the > same way due INSTALL="no". But you didn't use RAMDISKMODULES. If you want to > use FIRMWARE="yes" on 4.3.10 (which had a new behavior since 4.3.7), you > should have a valid KERNEL_MODULES_PREFIX. Currently you can use ALLFIRMWARE > instead of FIRMWARE. As an experiment you could try to enable RAMDISKMODULES > on 4.3.6 and you will see the same error (cat: .../modules.dep: No such file > or directory). Does FIRMWARE_FILES also have some kind of impact? I have two machines with almost identical genkernel.conf files, and it works on one but not the other. One notable difference is that the working one has FIRMWARE_FILES set to one specific file, while the non-working one has it unset. I don’t actually need any firmware in the initramfs on this box either, so I tried unsetting FIRMWARE (I had it turned on for previous hardware which I’m no longer using), and that makes it work. I never considered firmware because I never imagined it would cause errors related to modules.
(In reply to Dmitry Baranov from comment #8) > Currently you can use ALLFIRMWARE instead of FIRMWARE. Small remark: ALLFIRMWARE and FIRMWARE also. (In reply to Christopher Head from comment #9) > Does FIRMWARE_FILES also have some kind of impact? Relevant snippets: https://github.com/gentoo/genkernel/blob/d6a77d90fd511b04b12bd7ae40d710d3d144c077/gen_initramfs.sh#L1767-L1793 https://github.com/gentoo/genkernel/blob/d6a77d90fd511b04b12bd7ae40d710d3d144c077/gen_initramfs.sh#L2181-L2184 The behavior is: FIRMWARE=y && ALLFIRMWARE=y -- all firmwares will be copied, FIRMWARE=y && FIRMWARE_FILES=y -- only the custom fw-list will be copied, FIRMWARE=y -- copy only the necessary firmwares depending on the included modules.
> The behavior is: > FIRMWARE=y && ALLFIRMWARE=y -- all firmwares will be copied, > FIRMWARE=y && FIRMWARE_FILES=y -- only the custom fw-list will be copied, > FIRMWARE=y -- copy only the necessary firmwares depending on the included > modules. Ah, I see, that makes sense, I missed that FIRMWARE=y on its own meant to automatically discover firmware based on modules (I think that was a recent change?), which obviously doesn’t work if you can’t find modules (because the prefix is wrong with INSTALL=n). not something I personally need, given my lack of modules altogether. Thanks.