Skip to main content
Topic: Bug in kmod-27-1 (Read 955 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Bug in kmod-27-1

Code: [Select]
cp: cannot stat '(builtin)': No such file or directory
I can still reboot though. Downgrading to kmod 26-3 fixes this (no, my kernel config is not to blame). There's a patch to mkinitcpio that's supposed to fix this, but it doesn't, though  https://bugs.archlinux.org/task/65564 reports this as fixed.

Re: Bug in kmod-27-1

Reply #1
this bug should fixed in mkinitcpio 27-3 (artix release date 03.03.2020). Have you this version and still is not fixed?

Re: Bug in kmod-27-1

Reply #2
I am using kmod-27-1 and I have no issue. I know 27-2 has issue, so for now I put kmod in IgnorePkg.

Re: Bug in kmod-27-1

Reply #3
Still error message with 5.5.9.artix1 built with the new kmod, but I can boot (as before). No error with linux-5.5.9.arch1 built with the old kmod.

Works with dracut though, with the command
Code: [Select]
# dracut --force -H /boot/initramfs-linux.img --kver 5.5.9-artix1-1
It gives lots of errors and a larger image, but isn't configured yet.

Re: Bug in kmod-27-1

Reply #4
You use old version of dracut (November 2019, because archlinux yet not updated to newest version) instead mkinitcpio-27-3, which fixes this error.

So use mkinitcpio instead or try use self-compiled newest version of dracut - maybe is the error in newest version fixed.

Actually we can do not so much, if we want stay follow archlinux. Dracut is marked, but not updated to newest version yet.

 

Re: Bug in kmod-27-1

Reply #5
The following patch will eliminate the "(builtin)" warning:
Code: [Select]
--- /usr/lib/initcpio/functions	2020-03-07 06:59:19.000000000 +0100
+++ /usr/lib/initcpio/functions 2020-03-25 21:45:04.723045624 +0100
@@ -779,7 +779,7 @@
         return 0
     fi
 
-    cp "$@" "$moduledest/kernel"
+    cp ${@//\(builtin\)} "$moduledest/kernel" #no quotes around the array!
 
     # unzip modules prior to recompression
     for m in "$@"; do
I just rebooted from the fallback image thus created. This should always work, AFAIK kernel modules never have spaces in their names, but I'm not actually proposing this patch - it's as ugly as the rest of the code. The script should be rewritten.

Slightly less ugly:
Code: [Select]
--- functions	2020-03-03 23:26:38.530530666 +0100
+++ functions 2020-03-25 22:19:32.358410996 +0100
@@ -769,7 +769,7 @@
 }
 
 install_modules() {
-    local m moduledest=$BUILDROOT/lib/modules/$KERNELVERSION
+    local m n moduledest=$BUILDROOT/lib/modules/$KERNELVERSION
     local -a xz_comp gz_comp
 
     [[ $KERNELVERSION == none ]] && return 0
@@ -779,7 +779,10 @@
         return 0
     fi
 
-    cp "$@" "$moduledest/kernel"
+    for n in "$@"; do
+        [[ "$n" == '(builtin)' ]] && continue
+        cp "$n" "$moduledest/kernel"
+    done
 
     # unzip modules prior to recompression
     for m in "$@"; do
The mkinitcpio PKGBUILD needs makedepends=(asciidoc) added.