You are not logged in.

#1 2024-08-14 05:53:44

hx030
Member
Registered: 2024-08-14
Posts: 11

[SOLVED] mkinitcpio throws "module not found" errors after update

As title

`mkinitcpio -P` output: https://0x0.st/X4-X.txt
(using 6.9.10 for ZFS, also tried 6.10.4 and downgrade back to where I was - 6.8.9, while reinstalling corresponding kernel headers packages, but no luck)

Please let me know if further info is needed to look into this issue, thanks


Update:
Somehow it got fixed after running `sudo depmod -v -a (kernel version)` as per seth suggested here
the key of this problem seem to be `modules.alias` and `modules.alias.bin` not being correctly generated (small file size compared to normal ones)

Last edited by hx030 (2024-08-14 08:56:00)

Offline

#2 2024-08-14 06:02:07

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

Please share the output of

ls /usr/lib/modules
uname -r
file /boot/vmlinuz-linux
grep -v '^$\|^#' /etc/mkinitcpio.conf

Jin, Jîyan, Azadî

Offline

#3 2024-08-14 06:11:26

hx030
Member
Registered: 2024-08-14
Posts: 11

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

`ls /usr/lib/modules`

6.9.10-arch1-1  6.9.10-zen1-1-zen

`uname -r`

6.8.9-zen1-2-zen

Note. I upgraded from 6.8.9, haven't reboot yet since I don't think my system would be bootable after upgrade


`file /boot/vmlinuz-linux`

/boot/vmlinuz-linux: Linux kernel x86 boot executable bzImage, version 6.9.10-arch1-1 (linux@archlinux) #1 SMP PREEMPT_DYNAMIC Thu, 18 Jul 2024 18:06:13 +0000, RO-rootFS, swap_dev 0XC, Normal VGA

`grep -v '^$\|^#' /etc/mkinitcpio.conf`

MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
BINARIES=()
FILES=()
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)

Offline

#4 2024-08-14 06:16:27

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] mkinitcpio throws "module not found" errors after update


Jin, Jîyan, Azadî

Offline

#5 2024-08-14 06:24:43

hx030
Member
Registered: 2024-08-14
Posts: 11

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

Just tried `depmod -a 6.9.10-zen1-1-zen` and `depmod -a `6.9.10-arch1-1` before `mkinitcpio -P`,
depmod didn't report any error, but mkinitcpio still fails with same errors

Offline

#6 2024-08-14 08:01:06

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,067

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

pacman -Qikk linux linux-zen

Offline

#7 2024-08-14 08:01:47

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 707

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

Is the /lib -> /usr/lib symlink missing perhaps? Post the output of:

$ file /lib

Edit /usr/lib/initcpio/functions and add wrap the add_module function's contents in set -x & set +x:

diff --git a/functions b/functions
index 406278c7e10de9db3af7381951f492cf2920d54d..9836739cf37f4ae6284922720f8d7203acce1349 100755
--- a/functions
+++ b/functions
@@ -684,6 +684,7 @@ add_firmware() {
 }
 
 add_module() {
+    set -x
     # Add a kernel module to the initcpio image. Dependencies will be
     # discovered and added.
     #   $1: module name
@@ -765,6 +766,7 @@ add_module() {
             add_module "crypto-crc32c?"
             ;;
     esac
+    set +x
 }
 
 add_full_dir() {

Offline

#8 2024-08-14 08:02:57

hx030
Member
Registered: 2024-08-14
Posts: 11

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

seth wrote:
pacman -Qikk linux linux-zen

https://0x0.st/X4-k.txt

Name            : linux
Version         : 6.9.10.arch1-1
Description     : The Linux kernel and modules
Architecture    : x86_64
URL             : https://github.com/archlinux/linux
Licenses        : GPL-2.0-only
Groups          : None
Provides        : KSMBD-MODULE  VIRTUALBOX-GUEST-MODULES  WIREGUARD-MODULE
Depends On      : coreutils  initramfs  kmod
Optional Deps   : wireless-regdb: to set the correct wireless channels of your country
                  linux-firmware: firmware images needed for some devices [installed]
Required By     : None
Optional For    : base
Conflicts With  : None
Replaces        : virtualbox-guest-modules-arch  wireguard-arch
Installed Size  : 134.19 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Fri 19 Jul 2024 02:06:13 AM CST
Install Date    : Wed 14 Aug 2024 01:18:58 PM CST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

linux: 7279 total files, 0 altered files
Name            : linux-zen
Version         : 6.9.10.zen1-1
Description     : The Linux ZEN kernel and modules
Architecture    : x86_64
URL             : https://github.com/zen-kernel/zen-kernel
Licenses        : GPL-2.0-only
Groups          : None
Provides        : KSMBD-MODULE  UKSMD-BUILTIN  VHBA-MODULE  VIRTUALBOX-GUEST-MODULES  WIREGUARD-MODULE
Depends On      : coreutils  initramfs  kmod
Optional Deps   : wireless-regdb: to set the correct wireless channels of your country
                  linux-firmware: firmware images needed for some devices [installed]
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 138.97 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Fri 19 Jul 2024 02:05:52 AM CST
Install Date    : Wed 14 Aug 2024 01:19:01 PM CST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

linux-zen: 7282 total files, 0 altered files

Offline

#9 2024-08-14 08:06:05

hx030
Member
Registered: 2024-08-14
Posts: 11

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

nl6720 wrote:

Is the /lib -> /usr/lib symlink missing perhaps? Post the output of:

$ file /lib

Edit /usr/lib/initcpio/functions and add wrap the add_module function's contents in set -x & set +x:

- the symlink is present (`/lib: symbolic link to usr/lib`)
- the output of `mkinitcpio -P` after wrapping the function https://0x0.st/X4-d.txt

Last edited by hx030 (2024-08-14 08:13:06)

Offline

#10 2024-08-14 08:15:59

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 707

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

Post the output of

$ modinfo -b '' -k 6.9.10-arch1-1 video
$ modinfo /lib/modules/6.9.10-arch1-1/kernel/drivers/acpi/video.ko.zst

Edit: modinfo instead of stat.

Last edited by nl6720 (2024-08-14 08:16:48)

Offline

#11 2024-08-14 08:17:09

hx030
Member
Registered: 2024-08-14
Posts: 11

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

nl6720 wrote:

Post the output of

$ modinfo -b '' -k 6.9.10-arch1-1 video
$ stat /lib/modules/6.9.10-arch1-1/kernel/drivers/acpi/video.ko.zst
➜  ~ modinfo -b '' -k 6.9.10-arch1-1 video
modinfo: ERROR: Module video not found.
➜  ~ stat /lib/modules/6.9.10-arch1-1/kernel/drivers/acpi/video.ko.zst
  File: /lib/modules/6.9.10-arch1-1/kernel/drivers/acpi/video.ko.zst
  Size: 20587           Blocks: 48         IO Block: 4096   regular file
Device: 8,7     Inode: 8803545     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2024-08-14 16:01:42.256254325 +0800
Modify: 2024-07-19 02:06:13.000000000 +0800
Change: 2024-08-14 13:18:58.516262064 +0800
 Birth: 2024-08-14 13:18:58.516262064 +0800

Offline

#12 2024-08-14 08:18:15

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 707

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

Sorry, try with modinfo instead of stat:

$ modinfo /lib/modules/6.9.10-arch1-1/kernel/drivers/acpi/video.ko.zst

Offline

#13 2024-08-14 08:19:03

hx030
Member
Registered: 2024-08-14
Posts: 11

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

ok

➜  ~ modinfo /lib/modules/6.9.10-arch1-1/kernel/drivers/acpi/video.ko.zst
filename:       /lib/modules/6.9.10-arch1-1/kernel/drivers/acpi/video.ko.zst
license:        GPL
description:    ACPI Video Driver
author:         Bruno Ducrot
srcversion:     233AFD8F19B2AD5463911B3
alias:          acpi*:LNXVIDEO:*
depends:        wmi
retpoline:      Y
intree:         Y
name:           video
vermagic:       6.9.10-arch1-1 SMP preempt mod_unload 
sig_id:         PKCS#7
signer:         Build time autogenerated kernel key
sig_key:        7D:AA:C4:6E:6F:52:9D:D2:00:9C:04:67:FA:01:0A:02:F1:3B:40:F9
sig_hashalgo:   sha512
signature:      30:65:02:30:45:77:E7:AA:0D:CF:A7:BF:B7:8C:46:AB:37:67:87:A0:
                75:EF:A3:25:6C:1F:54:10:97:96:DF:2D:82:9D:FC:37:94:69:D1:00:
                2B:1A:44:40:A9:93:A9:A5:46:EB:0E:A1:02:31:00:E0:33:F7:6D:C5:
                1E:DA:66:99:1B:0E:5E:64:1F:43:49:9A:DB:A2:CE:BB:BD:DF:67:DE:
                0D:D2:AE:F9:F1:34:B8:7D:D7:B1:88:26:F6:4C:B3:A8:51:72:D1:F9:
                3B:41:02
parm:           brightness_switch_enabled:bool
parm:           allow_duplicates:bool
parm:           report_key_events:0: none, 1: output changes, 2: brightness changes, 3: all (int)
parm:           hw_changes_brightness:Set this to 1 on buggy hw which changes the brightness itself when a hotkey is pressed: -1: auto, 0: normal 1: hw-changes-brightness (int)
parm:           device_id_scheme:bool
parm:           only_lcd:int

Offline

#14 2024-08-14 08:27:17

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,067

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

ls -l /lib/modules/*/modules*
type -a modinfo
/usr/bin/modinfo -b '' -k 6.9.10-arch1-1 video
strace -f -tt -o /tmp/modinfo.strace modinfo -b '' -k 6.9.10-arch1-1 video
cat /tmp/modinfo.strace | curl -F 'file=@-' 0x0.st

Offline

#15 2024-08-14 08:28:59

hx030
Member
Registered: 2024-08-14
Posts: 11

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

➜  ~ ls -l /lib/modules/*/modules*

-rw-r--r-- 1 root root    534 Aug 14 14:22 /lib/modules/6.9.10-arch1-1/modules.alias
-rw-r--r-- 1 root root    614 Aug 14 14:22 /lib/modules/6.9.10-arch1-1/modules.alias.bin
-rw-r--r-- 1 root root   6743 Jul 19 02:06 /lib/modules/6.9.10-arch1-1/modules.builtin
-rw-r--r-- 1 root root   8088 Aug 14 14:22 /lib/modules/6.9.10-arch1-1/modules.builtin.alias.bin
-rw-r--r-- 1 root root   9013 Aug 14 14:22 /lib/modules/6.9.10-arch1-1/modules.builtin.bin
-rw-r--r-- 1 root root  67521 Jul 19 02:06 /lib/modules/6.9.10-arch1-1/modules.builtin.modinfo
-rw-r--r-- 1 root root    435 Aug 14 14:22 /lib/modules/6.9.10-arch1-1/modules.dep
-rw-r--r-- 1 root root    781 Aug 14 14:22 /lib/modules/6.9.10-arch1-1/modules.dep.bin
-rw-r--r-- 1 root root     68 Aug 14 14:22 /lib/modules/6.9.10-arch1-1/modules.devname
-rw-r--r-- 1 root root 247970 Jul 19 02:06 /lib/modules/6.9.10-arch1-1/modules.order
-rw-r--r-- 1 root root     55 Aug 14 14:22 /lib/modules/6.9.10-arch1-1/modules.softdep
-rw-r--r-- 1 root root  68388 Aug 14 14:22 /lib/modules/6.9.10-arch1-1/modules.symbols
-rw-r--r-- 1 root root  75372 Aug 14 14:22 /lib/modules/6.9.10-arch1-1/modules.symbols.bin
-rw-r--r-- 1 root root    534 Aug 14 14:22 /lib/modules/6.9.10-zen1-1-zen/modules.alias
-rw-r--r-- 1 root root    614 Aug 14 14:22 /lib/modules/6.9.10-zen1-1-zen/modules.alias.bin
-rw-r--r-- 1 root root   6856 Jul 19 02:05 /lib/modules/6.9.10-zen1-1-zen/modules.builtin
-rw-r--r-- 1 root root   8088 Aug 14 14:22 /lib/modules/6.9.10-zen1-1-zen/modules.builtin.alias.bin
-rw-r--r-- 1 root root   9096 Aug 14 14:22 /lib/modules/6.9.10-zen1-1-zen/modules.builtin.bin
-rw-r--r-- 1 root root  68005 Jul 19 02:05 /lib/modules/6.9.10-zen1-1-zen/modules.builtin.modinfo
-rw-r--r-- 1 root root    435 Aug 14 14:22 /lib/modules/6.9.10-zen1-1-zen/modules.dep
-rw-r--r-- 1 root root    781 Aug 14 14:22 /lib/modules/6.9.10-zen1-1-zen/modules.dep.bin
-rw-r--r-- 1 root root     68 Aug 14 14:22 /lib/modules/6.9.10-zen1-1-zen/modules.devname
-rw-r--r-- 1 root root 248044 Jul 19 02:05 /lib/modules/6.9.10-zen1-1-zen/modules.order
-rw-r--r-- 1 root root     55 Aug 14 14:22 /lib/modules/6.9.10-zen1-1-zen/modules.softdep
-rw-r--r-- 1 root root  68388 Aug 14 14:22 /lib/modules/6.9.10-zen1-1-zen/modules.symbols
-rw-r--r-- 1 root root  75372 Aug 14 14:22 /lib/modules/6.9.10-zen1-1-zen/modules.symbols.bin
➜  ~ type -a modinfo
modinfo is /usr/bin/modinfo
➜  ~ /usr/bin/modinfo -b '' -k 6.9.10-arch1-1 video
modinfo: ERROR: Module video not found.
➜  ~ strace -f -tt -o /tmp/modinfo.strace modinfo -b '' -k 6.9.10-arch1-1 video
modinfo: ERROR: Module video not found.
➜  ~ cat /tmp/modinfo.strace | curl -F 'file=@-' 0x0.st

http://0x0.st/X4oX.txt

Offline

#16 2024-08-14 08:38:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,067

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

modules.alias* and modules.*dep are WAY to small - run depmod again

sudo depmod -v -a 6.9.10-arch1-1

Last edited by seth (2024-08-14 08:39:07)

Offline

#17 2024-08-14 08:44:07

hx030
Member
Registered: 2024-08-14
Posts: 11

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

seth wrote:

modules.alias* and modules.*dep are WAY to small - run depmod again

sudo depmod -v -a 6.9.10-arch1-1

OMG, this is it! The pile of module not found errors are now gone!
I don't really understand why a verbose flag changes the final result though...

Offline

#18 2024-08-14 08:49:35

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,067

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

Ideally nothing, either the package was previously corrutped (the module files not there) or you fudged the call (there're a lot of stay upticks in your post) and just ran "depmod -a"

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#19 2024-08-14 08:56:40

hx030
Member
Registered: 2024-08-14
Posts: 11

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

OP and title updated, thanks for the help!

Offline

#20 2024-08-14 13:19:31

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,082

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

I don't think this is fixed, as the problem persisted after multiple kernel reinstalls and a manual depmod previously. It'll probably come back on the next update.

hx030, what does `type -a depmod`

Online

#21 2024-08-15 00:11:43

hx030
Member
Registered: 2024-08-14
Posts: 11

Re: [SOLVED] mkinitcpio throws "module not found" errors after update

@Scimmia :

➜  ~ type -a depmod
depmod is /usr/bin/depmod

Update: Just tried to upgrade vanilla kernel to 6.10, mkinitcpio seems to be working, I suppose the problem resides in depmod which somehow didn't work before?

Last edited by hx030 (2024-08-15 00:21:24)

Offline

Board footer

Powered by FluxBB