Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 810805 - sys-kernel/dracut fails when non-existent modules are configured in the config file(s)
Summary: sys-kernel/dracut fails when non-existent modules are configured in the confi...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-28 15:41 UTC by Martin Mokrejš
Modified: 2021-08-29 15:06 UTC (History)
2 users (show)

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


Attachments
debug.log (debug.log,837.82 KB, text/plain)
2021-08-28 21:41 UTC, Martin Mokrejš
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2021-08-28 15:41:21 UTC
Hi,
  for some reason I canot get initrd image created by dracut anymore. None of the below lines are prefixed with "Warning:" or "Error:" but it seems most of the lines I saw in the past.

# dracut --kver 5.4.143; ls -la /boot/initramfs-5.4.143.img
dracut: Executing: /usr/bin/dracut --kver 5.4.143
dracut: dracut module 'dash' will not be installed, because command '/bin/dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command '/bin/mksh' could not be found!
dracut: dracut module 'systemd-ask-password' will not be installed, because command 'systemd-ask-password' could not be found!
dracut: dracut module 'systemd-coredump' will not be installed, because command 'coredumpctl' could not be found!
dracut: dracut module 'systemd-initrd' depends on 'systemd', which can't be installed
dracut: dracut module 'systemd-modules-load' will not be installed, because command '/lib/systemd/systemd-modules-load' could not be found!
dracut: dracut module 'systemd-repart' will not be installed, because command 'systemd-repart' could not be found!
dracut: dracut module 'systemd-sysctl' will not be installed, because command '/lib/systemd/systemd-sysctl' could not be found!
dracut: dracut module 'systemd-sysusers' will not be installed, because command 'systemd-sysusers' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' depends on 'systemd', which can't be installed
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'kpartx' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'systemd-initrd' depends on 'systemd', which can't be installed
dracut: dracut module 'dracut-systemd' depends on 'systemd-initrd', which can't be installed
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack
dracut: dracut module 'ostree' cannot be found or installed.
ls: cannot access '/boot/initramfs-5.4.143.img': No such file or directory



But, one line is not with the same syntax, I guess that is the one to blame:

dracut: memstrack is not available


So, where is a package in package for https://github.com/ryncsn/memstrack ?

Seems my last working version was sys-kernel/dracut-053-r1 so I downgraded from sys-kernel/dracut-055-r2 . Sadly that did not help.

# emerge --info
Portage 3.0.22 (python 3.9.6-final-0, default/linux/amd64/17.1/no-multilib, gcc-11.2.0, glibc-2.33-r1, 5.4.123 x86_64)
=================================================================
System uname: Linux-5.4.123-x86_64-Intel-R-_Core-TM-_i7-7820HQ_CPU_@_2.90GHz-with-glibc2.33
KiB Mem:    32813860 total,  29047548 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 20 Aug 2021 21:30:01 +0000
Head commit of repository gentoo: 04452e974c015c0f7e56853f550ebd91f627e6fc
sh bash 5.1_p8
ld GNU ld (Gentoo 2.37_p1 p0) 2.37
app-shells/bash:          5.1_p8::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.34.0-r2::gentoo
dev-lang/python:          2.7.18_p11::gentoo, 3.6.14::gentoo, 3.7.11::gentoo, 3.8.11::gentoo, 3.9.6_p1::gentoo
dev-lang/rust:            1.54.0::gentoo
dev-util/cmake:           3.21.1::gentoo
sys-apps/baselayout:      2.7-r3::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo, 2.71-r1::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.14.1-r2::gentoo, 1.15.1-r2::gentoo, 1.16.4::gentoo
sys-devel/binutils:       2.32-r1::gentoo, 2.33.1-r1::gentoo, 2.34-r2::gentoo, 2.35.2::gentoo, 2.36.1-r2::gentoo, 2.37_p1::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo, 10.3.0::gentoo, 11.2.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r1::gentoo
Repositories:

gentoo
    location: /mnt/external/scratch/usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24

science
    location: /data/mmokrejs/proj/sci
    masters: gentoo
    priority: 0

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 1

layman
    location: /var/lib/layman
    masters: gentoo
    priority: 2

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE IBM-J1.6 NPSL Nero-EULA-US AdobeFlash-10.3 AdobeFlash-11.x OPERA-2014 RAR Intel-SDP intel-ucode Skype-TOS vmware linux-firmware fasta vienna-rna unafold GRL MSttfEULA hplip-plugin meme mRNAmarkup ApE ICS ipw3945 finchtv modeller gmap master-pdf-editor abyss swiss-prot Aladdin AVASYS truecrypt-3.0 pyvcf Non-profit-OSL-3.0 estscan bcca_2010 oncotator Adobe blat staden CeCILL-1.1 phrap STRIDE cctbx-2.0 bh-luxi ARIADNE unRAR all-rights-reserved trf annovar_personal_only stampy-academic BSD-BroadInstitute UPennState freedist free-noncomm blasr sun-jlfgr FLI-Jena PSTT netperf sun-jsr67 xv vim.org OSGi-Specification-2.0 colt mod_fastcgi googleearth google-chrome ACE AFL churchill genscan no-source-code linux-fw-redistributable ISSL JSON MPEG-4 Apache-2.0 BSD MIT BSD-2 FSFAP unicode Subversion OPERA-2018 ms-teams-pre TeamViewer PSF-2.4"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /usr/share/maven-bin-3.6/conf /usr/share/maven-bin-3.8/conf /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.0/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/vmware-installer"
CXXFLAGS="-O2 -pipe -march=native -ftree-vectorize"
DISTDIR="/mnt/external/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-O2 -pipe -march=native -ftree-vectorize"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native -ftree-vectorize"
GENTOO_MIRRORS="http://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.mirror.web4u.cz/ rsync://gentoo.mirror.dkm.cz/gentoo/ ftp://gentoo.mirror.web4u.cz/"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en_GB en cs"
MAKEOPTS="-j5"
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="/mnt/external/var/tmp/portage"
USE="X aac acl acpi alsa amd64 amr apache apache2 asm avx avx2 berkdb bluetooth boost bzip2 cairo caps cdda cdr cgi cli coin cracklib crypt cryptlib cryptsetup cups dbus device-mapper dhcp directfb dri dri3 drm dvd dvda elogind emboss encode eselect-ldso fax fbcon ffmpeg flac fontconfig fortran gbm gcrypt gd gdbm geoip geolocation gimp glpk gmp gnutls gpm gps gtk hal hpijs hwdb iconv id3tag imaging innodb inotify java javafx javascript jce jpeg jpg js jscript keymap ladspa lapack laptop lcms libglvnd libnotify libtirpc lm_sensors lz4 mad mariadb matroska mmx modemmanager mp3 ncurses nfs nls nptl nptlonly nscd nss ntfsprogs objc ocr ogg opengl openh264 openmp openssl opus pam parport pbs pcre pcre16 pcsc-lite pdf perl php png policykit polkit ppds pppd python qt3support qt4 qt5 readline rendering resolvconf romio scanner sctp seccomp server session sha slideshow smartcard sndfile split-usr sqlite sse sse2 sse3 sse4_1 sse4_2 ssl sslv3 ssse3 startup-notification suexec svg syslog tcl tcpd threads tiff tk truetype twolame udev unicode usb v4l v4l2 vaapi vim-syntax vnc vorbis wavpack wifi x11 x264 x265 xattr xcb xml xorg xrandr xv xvid xvmc zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hdspm usb-usx2y" APACHE2_MODULES="alias authz_host auth_basic auth_digest cgi cgid deflate dir env filter include info mem_cache mime mime_magic negotiation remoteip setenvif status userdir vhost_alias rewrite usertrack cache file_cache disk_cache charset_lite log_config log_forensic" 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 sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="gpsclock navcom ntrip rtcm104v2 rtcm104v3 ublox nmea0183 nmea2000 aivdm passthrough" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US en-GB en cs" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" OPENMPI_RM="pbs" PHP_TARGETS="php5-4 php5-5" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_7 python3_8 python3_9 pypy3" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="vesa vmware fbdev intel i915 i965 iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 1 Mike Gilbert gentoo-dev 2021-08-28 16:52:10 UTC
I doubt the memstrack message is significant; just below it is a message from the ostree module, so it isn't getting stuck there.

Please run "dracut --debug --kver 5.4.143 > debug.log 2>&1" and attach debug.log.
Comment 2 Martin Mokrejš 2021-08-28 21:41:15 UTC
Created attachment 736543 [details]
debug.log

1. I zapped the UUID values.

2. Some variable is empty and then some ln(1) exec breaks:

//usr/lib/dracut/dracut-init.sh@1076(): [[ Usage: ln [OPTION]... [-T] TARGET LINK_NAME

3. Some escaping function is broken, see many instances of:

/usr/lib/dracut/dracut-functions.sh@25(is_func): [[ function == \f\u\n\c\t\i\o\n ]]
Comment 3 Mike Gilbert gentoo-dev 2021-08-28 23:24:37 UTC
It looks like /etc/dracut.conf.d/ostree.conf contains a reference to an "ostree" module. sys-kernel/dracut does not supply that module.

Did you remove dev-util/ostree, and forget to update your dracut config?
Comment 4 Martin Mokrejš 2021-08-29 00:12:31 UTC
$ ls -latr /etc/dracut.conf.d/ostree.conf 
-rw-r--r-- 1 root root 838 Jul  2 20:43 /etc/dracut.conf.d/ostree.conf
$ cat /etc/dracut.conf.d/ostree.conf 
# Copyright (C) 2013 Colin Walters <walters@verbum.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

add_dracutmodules+=" ostree systemd "
reproducible=yes
$


Somewhat hand-decorated original grep output:

$ grep ostree /var/log/emerge.log 
1625248035: Started emerge on: čec 02, 2021 19:47:14
1625248035:  *** emerge --newuse --oneshot --update --backtrack=30000 --keep-going --regex-search-auto=y =sys-cluster/singularity-3.8.0::gentoo
1625248045: Started emerge on: čec 02, 2021 19:47:24

...

1625248078:  >>> emerge (3 of 7) dev-util/ostree-2020.8 to /
1625248078:  === (3 of 7) Cleaning (dev-util/ostree-2020.8::/mnt/external/scratch/usr/portage/dev-util/ostree/ostree-2020.8.ebuild)
1625248078:  === (3 of 7) Compiling/Merging (dev-util/ostree-2020.8::/mnt/external/scratch/usr/portage/dev-util/ostree/ostree-2020.8.ebuild)
1625248141:  === (3 of 7) Merging (dev-util/ostree-2020.8::/mnt/external/scratch/usr/portage/dev-util/ostree/ostree-2020.8.ebuild)
1625248144:  >>> AUTOCLEAN: dev-util/ostree:0
1625248146:  === (3 of 7) Post-Build Cleaning (dev-util/ostree-2020.8::/mnt/external/scratch/usr/portage/dev-util/ostree/ostree-2020.8.ebuild)
1625248146:  ::: completed emerge (3 of 7) dev-util/ostree-2020.8 to /

...

1625248237:  ::: completed emerge (1 of 1) sys-cluster/singularity-3.8.0 to /
1625248237:  *** Finished. Cleaning up...
1625248240:  *** exiting successfully.
1625248242:  *** terminating.


1625251179: Started emerge on: čec 02, 2021 20:39:38
1625251179:  *** emerge --newuse --oneshot --update --backtrack=30000 --keep-going --regex-search-auto=y =sys-boot/grub-2.06:2/2.06::gentoo
1625251207:  >>> emerge (1 of 2) sys-boot/grub-2.06 to /
1625251208:  === (1 of 2) Cleaning (sys-boot/grub-2.06::/mnt/external/scratch/usr/portage/sys-boot/grub/grub-2.06.ebuild)
1625251208:  === (1 of 2) Compiling/Merging (sys-boot/grub-2.06::/mnt/external/scratch/usr/portage/sys-boot/grub/grub-2.06.ebuild)
1625251346:  === (1 of 2) Merging (sys-boot/grub-2.06::/mnt/external/scratch/usr/portage/sys-boot/grub/grub-2.06.ebuild)
1625251349:  >>> AUTOCLEAN: sys-boot/grub:2
1625251349:  === Unmerging... (sys-boot/grub-2.06_rc1)
1625251352:  >>> unmerge success: sys-boot/grub-2.06_rc1
1625251354:  === (1 of 2) Post-Build Cleaning (sys-boot/grub-2.06::/mnt/external/scratch/usr/portage/sys-boot/grub/grub-2.06.ebuild)
1625251354:  ::: completed emerge (1 of 2) sys-boot/grub-2.06 to /
1625251354:  >>> emerge (2 of 2) dev-util/ostree-2020.8 to /
1625251354:  === (2 of 2) Cleaning (dev-util/ostree-2020.8::/mnt/external/scratch/usr/portage/dev-util/ostree/ostree-2020.8.ebuild)
1625251354:  === (2 of 2) Compiling/Merging (dev-util/ostree-2020.8::/mnt/external/scratch/usr/portage/dev-util/ostree/ostree-2020.8.ebuild)
1625251385:  === (2 of 2) Merging (dev-util/ostree-2020.8::/mnt/external/scratch/usr/portage/dev-util/ostree/ostree-2020.8.ebuild)
1625251388:  >>> AUTOCLEAN: dev-util/ostree:0
1625251388:  === Unmerging... (dev-util/ostree-2020.8)
1625251390:  >>> unmerge success: dev-util/ostree-2020.8
1625251392:  === (2 of 2) Post-Build Cleaning (dev-util/ostree-2020.8::/mnt/external/scratch/usr/portage/dev-util/ostree/ostree-2020.8.ebuild)
1625251392:  ::: completed emerge (2 of 2) dev-util/ostree-2020.8 to /
1625251392:  *** Finished. Cleaning up...
1625251396:  *** exiting successfully.
1625251401:  *** terminating.
$


So, it is not installed at the moment, true. I don't know why.
Comment 5 Mike Gilbert gentoo-dev 2021-08-29 01:40:25 UTC
Please remove /etc/dracut.conf.d/ostree.conf if you are not using it.
Comment 6 Martin Mokrejš 2021-08-29 07:01:44 UTC
Thank you for your help. But could the messages be improved to make clear why dracut exited?
Comment 7 Martin Mokrejš 2021-08-29 07:14:27 UTC
Same here:

/usr/lib/dracut/dracut-init.sh@986(for_each_module_dir): for _mod in $_modcheck
/usr/lib/dracut/dracut-init.sh@987(for_each_module_dir): [[   i18n  dm  fs-lib  rootfs-block  crypt  kernel-modules  kernel-modules-extra  lvm  mdraid  crypt-gpg  crypt-loop  kernel-network-modules  terminfo  udev-rules  biosdevname  usrmount  base  shutdown   == *\ ssh-client\ * ]]
/usr/lib/dracut/dracut-init.sh@989(for_each_module_dir): [[    != *\ ssh-client\ * ]]
/usr/lib/dracut/dracut-init.sh@990(for_each_module_dir): [[  all  != *\ ssh-client\ * ]]
/usr/lib/dracut/dracut-init.sh@991(for_each_module_dir): [[   systemd   == *\ ssh-client\ * ]]
/usr/lib/dracut/dracut-init.sh@994(for_each_module_dir): derror 'dracut module '\''ssh-client'\'' cannot be found or installed.'
/usr/lib/dracut/dracut-logger.sh@438(derror): set +x
dracut: dracut module 'ssh-client' cannot be found or installed.
/usr/lib/dracut/dracut-init.sh@995(for_each_module_dir): [[    == *\ ssh-client\ * ]]
/usr/lib/dracut/dracut-init.sh@996(for_each_module_dir): [[  all  == *\ ssh-client\ * ]]
/usr/lib/dracut/dracut-init.sh@997(for_each_module_dir): [[   crypt-gpg crypt-loop crypt  crypt crypt-gpg lvm dm ssh-client  rootfs-block  fs-lib  network  kernel-network-modules  network-manager  dbus  dbus-daemon  systemd   == *\ ssh-client\ * ]]
/usr/lib/dracut/dracut-init.sh@997(for_each_module_dir): exit 1
/usr/lib/dracut/dracut-init.sh@2(for_each_module_dir): ret=1
/usr/lib/dracut/dracut-init.sh@3(for_each_module_dir): [[ -n '' ]]
/usr/lib/dracut/dracut-init.sh@3(for_each_module_dir): [[ -n /var/tmp/dracut.n9JvC1 ]]
/usr/lib/dracut/dracut-init.sh@3(for_each_module_dir): rm -rf -- /var/tmp/dracut.n9JvC1
/usr/lib/dracut/dracut-init.sh@4(for_each_module_dir): [[ -n '' ]]
/usr/lib/dracut/dracut-init.sh@7(for_each_module_dir): exit 1

# dracut --list-modules |  grep ssh
dracut: Executing: /usr/bin/dracut --list-modules
ssh-client
#

I used to have a working shell script calling dracut and copying the initrd file along bzImage to various boot media, mouting and unmounting them, etc. It simply has stopped working. So I dropped "ssh-client" from the dracut commandline too.
Comment 8 Mike Gilbert gentoo-dev 2021-08-29 13:05:21 UTC
(In reply to Martin Mokrejš from comment #6)
> Thank you for your help. But could the messages be improved to make clear
> why dracut exited?

You could suggest such an enhancement upstream.