Kernel fails to update automatically to 7.0.x due to dracut error

In 2 of 3 my PC regular kernel package updates worked well, however on one of them, the update fails. Both kernel 7.0.4 and 7.0.6 packages have same issue. So this PC stuck on 6.19.9.

ilja@fedora:~$ sudo dnf update
Updating and loading repositories:
Repositories loaded.
Package                                                  Arch          Version                                                  Repository                           Size
Installing:
 kernel                                                  x86_64        0:7.0.6-200.fc44                                         updates                           0.0   B
 kernel-core                                             x86_64        0:7.0.6-200.fc44                                         updates                          99.1 MiB
 kernel-modules                                          x86_64        0:7.0.6-200.fc44                                         updates                          99.5 MiB
 kernel-modules-core                                     x86_64        0:7.0.6-200.fc44                                         updates                          72.7 MiB
 kernel-modules-extra                                    x86_64        0:7.0.6-200.fc44                                         updates                           4.4 MiB

Transaction Summary:
 Installing:         5 packages

Total size of inbound packages is 201 MiB. Need to download 201 MiB.
After this operation, 276 MiB extra will be used (install 276 MiB, remove 0 B).
Is this ok [y/N]: y
[1/5] kernel-0:7.0.6-200.fc44.x86_64                                                                                             100% | 263.8 KiB/s | 233.2 KiB |  00m01s
[2/5] kernel-core-0:7.0.6-200.fc44.x86_64                                                                                        100% |   2.4 MiB/s |  20.4 MiB |  00m09s
[3/5] kernel-modules-extra-0:7.0.6-200.fc44.x86_64                                                                               100% |   3.0 MiB/s |   4.7 MiB |  00m02s
[4/5] kernel-modules-core-0:7.0.6-200.fc44.x86_64                                                                                100% |   4.2 MiB/s |  74.4 MiB |  00m18s
[5/5] kernel-modules-0:7.0.6-200.fc44.x86_64                                                                                     100% |   3.8 MiB/s | 101.5 MiB |  00m26s
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[5/5] Total                                                                                                                      100% |   7.3 MiB/s | 201.2 MiB |  00m28s
Running transaction
[1/7] Verify package files                                                                                                       100% |   2.0   B/s |   5.0   B |  00m02s
[2/7] Prepare transaction                                                                                                        100% |   7.0   B/s |   5.0   B |  00m01s
[3/7] Installing kernel-core-0:7.0.6-200.fc44.x86_64                                                                             100% |  36.3 MiB/s |  29.6 MiB |  00m01s
[4/7] Installing kernel-modules-core-0:7.0.6-200.fc44.x86_64                                                                     100% |  43.0 MiB/s |  73.3 MiB |  00m02s
[5/7] Installing kernel-modules-0:7.0.6-200.fc44.x86_64                                                                          100% |   5.8 MiB/s | 100.0 MiB |  00m17s
[6/7] Installing kernel-modules-extra-0:7.0.6-200.fc44.x86_64                                                                    100% | 277.9 KiB/s |   4.4 MiB |  00m16s
[7/7] Installing kernel-0:7.0.6-200.fc44.x86_64                                                                                  100% |   2.0   B/s | 124.0   B |  00m46s
>>> Running %posttrans scriptlet: kernel-core-0:7.0.6-200.fc44.x86_64
>>> Finished %posttrans scriptlet: kernel-core-0:7.0.6-200.fc44.x86_64
>>> Scriptlet output:
>>> dracut[W]: If you need to use bluetooth, please include it explicitly.
>>> dracut[W]: If you need to use bluetooth, please include it explicitly.
>>> dracut-install: ERROR: cannot mmap '/var/tmp/dracut.dOlGFcB/initramfs/usr/lib64/libnss_myhostname.so.2;69c039c9': Invalid argument
>>> dracut-install: ERROR: cannot mmap '/var/tmp/dracut.dOlGFcB/initramfs/usr/lib64/libnss_resolve.so.2;69c039c9': Invalid argument
>>> dracut-install: ERROR: cannot mmap '/var/tmp/dracut.dOlGFcB/initramfs/usr/lib64/libnss_systemd.so.2;69c039c9': Invalid argument
>>> dracut[F]: Resolving executable dependencies failed
>>> /usr/lib/kernel/install.d/50-dracut.install failed with exit status 1.
>>> 
Complete!
ilja@fedora:~$

Any ideas?

We need some information about that machine that fails.
Please post the output of inxi -Fzxx here.

Ofc.

ilja@fedora:~$ inxi -Fzxx
System:
  Kernel: 6.19.9-200.fc43.x86_64 arch: x86_64 bits: 64 compiler: gcc v: 15.2.1
  Desktop: GNOME v: 50.1 tk: GTK v: 3.24.52 wm: gnome-shell dm: GDM
    Distro: Fedora Linux 44 (Workstation Edition)
Machine:
  Type: Laptop System: Dell product: XPS 13 9300 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 077Y9N v: A00 serial: <superuser required> part-nu: 096D
    Firmware: UEFI vendor: Dell v: 1.28.1 date: 12/24/2024
Battery:
  ID-1: BAT0 charge: 9.5 Wh (42.9%) condition: 22.1/51 Wh (43.4%) health: good
    temp: 32.3 C volts: 7.25 min: 7.6 model: LGC-LGC6.5 DELL 2XXFW06
    serial: <filter> charging: status: discharging control: start: 75%
    end: 80% cycles: N/A
CPU:
  Info: quad core model: Intel Core i7-1065G7 bits: 64 type: MT MCP
    arch: Ice Lake rev: 5 cache: L1: 320 KiB L2: 2 MiB L3: 8 MiB
  Speed (MHz): avg: 400 min/max: 400/3900 cores: 1: 400 2: 400 3: 400 4: 400
    5: 400 6: 400 7: 400 8: 400 bogomips: 23961
  Flags-basic: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Iris Plus Graphics G7 vendor: Dell driver: i915 v: kernel
    arch: Gen-11 ports: active: eDP-1 empty: DP-1, DP-2, DP-3, DP-4
    bus-ID: 00:02.0 chip-ID: 8086:8a52
  Device-2: Realtek Integrated_Webcam_HD driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-9:3 chip-ID: 0bda:58fe
  Display: wayland server: Xwayland v: 24.1.11 compositor: gnome-shell
    driver: gpu: i915 display-ID: 0
  Monitor-1: eDP-1 model: Sharp 0x14cb res: 1920x1200 dpi: 169
    diag: 340mm (13.4")
  API: OpenGL v: 4.6 vendor: intel mesa v: 26.0.6 glx-v: 1.4 es-v: 3.2
    direct-render: yes renderer: Mesa Intel Iris Plus Graphics (ICL GT2)
    device-ID: 8086:8a52 display-ID: :0.0
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
  Info: Tools: api: glxinfo gpu: gputop, intel_gpu_top, lsgpu x11: xdriinfo,
    xdpyinfo, xprop, xrandr
Audio:
  Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: Dell
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:34c8
  API: ALSA v: k6.19.9-200.fc43.x86_64 status: kernel-api
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 1.6.4 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Intel Ice Lake-LP PCH CNVi WiFi vendor: Rivet Networks
    driver: iwlwifi v: kernel bus-ID: 00:14.3 chip-ID: 8086:34f0
  IF: wlp0s20f3 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 3-10:4 chip-ID: 8087:0026
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.2
    lmp-v: 11
Drives:
  Local Storage: total: 476.94 GiB used: 97.36 GiB (20.4%)
  ID-1: /dev/nvme0n1 vendor: Toshiba model: KBG40ZNS512G NVMe KIOXIA 512GB
    size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 37.9 C
Partition:
  ID-1: / size: 475.35 GiB used: 97.04 GiB (20.4%) fs: btrfs
    dev: /dev/nvme0n1p3
  ID-2: /boot size: 973.4 MiB used: 286.6 MiB (29.4%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 598.8 MiB used: 33.5 MiB (5.6%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 475.35 GiB used: 97.04 GiB (20.4%) fs: btrfs
    dev: /dev/nvme0n1p3
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 50.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 16 GiB note: est. available: 15.2 GiB used: 3.64 GiB (24.0%)
  Processes: 351 Power: uptime: 23m wakeups: 0 Init: systemd v: 259
    default: graphical
  Packages: pm: rpm pkgs: N/A note: see --rpm pm: flatpak pkgs: 33
    Compilers: gcc: 16.1.1 Shell: Bash v: 5.3.9 running-in: ptyxis-agent
    inxi: 3.3.40

Have you tried manually running dracut? sudo dracut --force --kver 7.0.6-100.fc43.x86_64

It should create the initramfs image /boot/initramfs-7.0.6-100.fc43.x86_64.img and should also provide more detailed information if it fails.

Edit: If the 7.0 kernels are for f44 then use 7.0.6-200.fc44.x86_64 in the commands above.

Adding the --debug option may be useful.

Also, the kernel version is perhaps a fc44 one, since inxi states
Distro: Fedora Linux 44 but Kernel: 6.19.9-200.fc43.x86_64

Agreed, and after reviewing the first post it appears that would be the case. I edited my post above.

There is perhaps leftover files in /usr/lib64/ that confuse dracut.
What gives: ls -l /usr/lib64/*69c039c9

Here it is:

ilja@fedora:~$ ls -l /usr/lib64/*69c039c9
-rwxr-xr-x. 1 root root  0 Mar 13 02:00 '/usr/lib64/libnss_myhostname.so.2;69c039c9'
-rwxr-xr-x. 1 root root  0 Mar 13 02:00 '/usr/lib64/libnss_resolve.so.2;69c039c9'
-rwxr-xr-x. 1 root root  0 Mar 13 02:00 '/usr/lib64/libnss_systemd.so.2;69c039c9'
--w-------. 1 root root  0 Mar 22 20:49 '/usr/lib64/libsystemd.so.0.41.0;69c039c9'
lrwxrwxrwx. 1 root root 20 Mar 13 02:00 '/usr/lib64/libsystemd.so.0;69c039c9' -> libsystemd.so.0.41.0

I also ran sudo dracut --force --kver 7.0.6-200.fc44.x86_64 --debug. The output log 6MB :wink: so wonder what is the “right way” to attach it here…

Using fpaste will do, but did it failed with the same errors ?

It’s to big for me to be sure, since not an expert in this area, but the final error looks the same as above - “Resolving executable dependencies failed”

fpaste’ed: https://paste.centos.org/view/a7d11473

Maybe just removing those “leftover” files would solve an issue?

Those files look like the problem. They may be temporary files from some process which were never cleaned up. Can you try moving them to your home directory and see if that resolves the problem?

Does /usr/lib64/libnss_myhostname.so.2 exist?

BTW, this should definitely be reported as a bug at Issues · dracut-ng/dracut · GitHub . It should not be tripped up by such files existing.

Yes, but it would be good to identify all the bogus files before.
For example with: find /usr -name '*;*' -ls

Gentlemen, you’re both wonderful!

I’ve removed the folder /usr/lib64/*69c039c9. And dracut ... command now works well then. Grub did not pick it up, but after stupid dnf remove / upgrade, it all worked as expected. Huge thanks!

I just wonder now, if it is something worth reporting as a bug to dracut-ng team, or it’s just a quirk of specific machine?

I ran that, but have zero understanding what to do with that :slight_smile:

ilja@fedora:~$ sudo find /usr -name '*;*' -ls
  4400014      4 lrwxrwxrwx   1 root     root           41 Mar 13 02:00 /usr/lib/.build-id/2f/152b00e703dce24f8013dea94674aa58a76bc1;69c039c9 -> ../../../../usr/lib64/libnss_resolve.so.2
  4400015      4 lrwxrwxrwx   1 root     root           42 Mar 13 02:00 /usr/lib/.build-id/79/c0d88b55fdc0f54b682a3c9afa08b0ed655fb5;69c039c9 -> ../../../../usr/lib64/libsystemd.so.0.41.0
  4400016      4 lrwxrwxrwx   1 root     root           39 Mar 13 02:00 /usr/lib/.build-id/aa/8a58e5f218904ab1dfff96610fd1f086dbb8e7;69c039c9 -> ../../../../usr/lib64/libudev.so.1.7.11
  4400017      4 lrwxrwxrwx   1 root     root           44 Mar 13 02:00 /usr/lib/.build-id/dd/6d66a7158620042febadb38e6a876be3d09599;69c039c9 -> ../../../../usr/lib64/libnss_myhostname.so.2
  4400018      4 lrwxrwxrwx   1 root     root           41 Mar 13 02:00 /usr/lib/.build-id/fc/f2d8c52748c7c29bcd48a969dca77b86dac844;69c039c9 -> ../../../../usr/lib64/libnss_systemd.so.2

Should this be deleted as well?

I think so but before doing that, what gives:

rpm -qf \
  /usr/lib/.build-id/2f/152b00e703dce24f8013dea94674aa58a76bc1 \
  /usr/lib/.build-id/79/c0d88b55fdc0f54b682a3c9afa08b0ed655fb5 \
  /usr/lib/.build-id/aa/8a58e5f218904ab1dfff96610fd1f086dbb8e7 \
  /usr/lib/.build-id/dd/6d66a7158620042febadb38e6a876be3d09599 \
  /usr/lib/.build-id/fc/f2d8c52748c7c29bcd48a969dca77b86dac844

Edited. Probably you had this in mind:

file /usr/lib/.build-id/2f/152b00e703dce24f8013dea94674aa58a76bc1;69c039c9 is not owned by any package
file /usr/lib/.build-id/79/c0d88b55fdc0f54b682a3c9afa08b0ed655fb5;69c039c9 is not owned by any package
file /usr/lib/.build-id/aa/8a58e5f218904ab1dfff96610fd1f086dbb8e7;69c039c9 is not owned by any package
file /usr/lib/.build-id/dd/6d66a7158620042febadb38e6a876be3d09599;69c039c9 is not owned by any package
file /usr/lib/.build-id/fc/f2d8c52748c7c29bcd48a969dca77b86dac844;69c039c9 is not owned by any package

I was expecting to see the systemd-libs RPM that provides the /usr/lib64/*.so
related files. Forget it.

Remove them with: sudo find /usr/lib/.build-id -name '*;*' -delete
From /usr/lib/.build-id and not /usr by security.

PS: I discover that I have also such files on my machine, from past October :frowning:

You probably got lucky being not exposed to the same issue.

Would be glad to also post an issue to Dracut Github, if it helps others, but realized being not competent enough to clearly explain what was the issue about. :grin:

Regardless that, big thanks. Amazing help!