[Bug 1864992] Re: depmod: ERROR: ../libkmod/libkmod.c:515 lookup_builtin_file() could not open builtin file '/lib/modules/5.4.0-14-generic/modules.builtin.bin'
Rafael David Tinoco
rafaeldtinoco at ubuntu.com
Wed Mar 11 12:54:12 UTC 2020
Alright, afaict what is happening is this:
In Focal I first faced this issue when upgrading kmod to
26+20191223-1ubuntu1.. but my reproducer was "update-initramfs" only.
The issue is that both: mkinitramfs (initramfs-tools) needs a patch to
work with recent 5.x kernels:
# mkinitramfs (initramfs-tools)
# Copy in modules.builtin and modules.order (not generated by depmod)
# and modules.builtin.bin (generated by depmod, but too late to avoid
# error messages as in #948257)
for x in modules.builtin modules.builtin.bin modules.order; do
if [ -f "${MODULESDIR}/${x}" ]; then
cp -p "${MODULESDIR}/${x}" "${DESTDIR}${MODULESDIR}/${x}"
fi
done
All other Ubuntu versions that might use a HWE kernel will need a SRU of
that patch.
But thats not the only way to trigger the issue as it seems...
I was able to reproduce the issue when doing:
(k)rafaeldtinoco at kmodissuefocal:~$ apt-get install linux-
image-5.4.0-14-generic linux-headers-5.4.0-14-generic linux-modules-
extra-5.4.0-14-generic
while I had kernel 5.4.0-18-generic installed.
Setting up linux-modules-5.4.0-14-generic (5.4.0-14.17) ...
depmod: ERROR: ../libkmod/libkmod.c:515 lookup_builtin_file() could not open builtin file '/lib/modules/5.4.0-14-generic/modules.builtin.bin'
depmod: ERROR: ../libkmod/libkmod.c:515 lookup_builtin_file() could not open builtin file '/lib/modules/5.4.0-14-generic/modules.builtin.bin'
depmod: ERROR: ../libkmod/libkmod.c:515 lookup_builtin_file() could not open builtin file '/lib/modules/5.4.0-14-generic/modules.builtin.bin'
depmod: ERROR: ../libkmod/libkmod.c:515 lookup_builtin_file() could not open builtin file '/lib/modules/5.4.0-14-generic/modules.builtin.bin'
depmod: ERROR: ../libkmod/libkmod.c:515 lookup_builtin_file() could not open builtin file '/lib/modules/5.4.0-14-generic/modules.builtin.bin'
The same happened when installing linux-modules-5.4.0-9-generic AND when
uninstalling and re-installing 5.4.0-18-generic. So now I'll reproduce
this second issue.. and I'm marking LP: #1863261 that SRU is needed for
that case.
For this case.. it turns out that postinst script for linux-modules is
executing:
$ sudo depmod -a -F /boot/System.map-5.4.0-18-generic 5.4.0-18-generic
for the first time when
/lib/modules/5.4.0-18-generic/modules.builtin.bin DOES NOT exist yet.
an easy way to reproduce is this:
$ sudo rm /lib/modules/5.4.0-18-generic/modules.builtin.bin
and then:
$ sudo depmod -a -F /boot/System.map-5.4.0-18-generic 5.4.0-18-generic
depmod: ERROR: ../libkmod/libkmod.c:515 lookup_builtin_file() could not open builtin file '/lib/modules/5.4.0-18-generic/modules.builtin.bin'
depmod: ERROR: ../libkmod/libkmod.c:515 lookup_builtin_file() could not open builtin file '/lib/modules/5.4.0-18-generic/modules.builtin.bin'
depmod: ERROR: ../libkmod/libkmod.c:515 lookup_builtin_file() could not open builtin file '/lib/modules/5.4.0-18-generic/modules.builtin.bin'
depmod: ERROR: ../libkmod/libkmod.c:515 lookup_builtin_file() could not open builtin file '/lib/modules/5.4.0-18-generic/modules.builtin.bin'
the second time you run same command, it will not have these errors
messages because "modules.builtin.bin" file will already have been
created.
--
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1864992
Title:
depmod: ERROR: ../libkmod/libkmod.c:515 lookup_builtin_file() could
not open builtin file
'/lib/modules/5.4.0-14-generic/modules.builtin.bin'
To manage notifications about this bug go to:
https://bugs.launchpad.net/curtin/+bug/1864992/+subscriptions
More information about the Ubuntu-server-bugs
mailing list