I'm using Ubuntu 24.04.1 LTS on an Intel Thinkpad. I have a weird problem since a couple of weeks where the new kernel (6.8.0-51-generic) doesn't boot. There's a kernel panic similar to this question.
The error message looks like (and the screen freezes):
VFS: Cannot open root device "/dev/nvme0n1pX" or unknown-block(0,0): error
Please append a correct "root=" boot option
...
...
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
I confirm that it is not a disk problem because I am able to use advanced options and boot using the older kernel. I tried the solution to that question which was to sudo update-initramfs -u -k version. Since some symptoms were superficially to this older question, whose solution also suggests update-initramfs -c -k , I tried it. But it has no effect.
When I use the older kernel (6.8.0-50-generic) and try dpkg --configure -a and apt upgrade, they both give this error:
...
...
Building module:
Cleaning build area...
make -j8 KERNELRELEASE=6.8.0-51-generic all KVERSION=...(bad exit status: 2)
ERROR (dkms apport): binary package for v4l2loopback_dc: 0.0.1 not found
Error! Bad return status for module build on kernel: 6.8.0-51-generic (x86_64)
Consult /var/lib/dkms/v4l2loopback_dc/0.0.1/build/make.log for more information.
dkms autoinstall on 6.8.0-51-generic/x86_64 succeeded for acpi-call
dkms autoinstall on 6.8.0-51-generic/x86_64 failed for v4l2loopback_dc(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
* dkms: autoinstall for kernel 6.8.0-51-generic
...fail!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.8.0-51-generic (--configure):
installed linux-image-6.8.0-51-generic package post-installation script subprocess returned error exit status 11
Errors were encountered while processing:
linux-headers-6.8.0-51-generic
The contents of the log file (/var/lib/dkms/v4l2loopback_dc/0.0.1/build/make.log) referenced above are:
DKMS make.log for v4l2loopback_dc-0.0.1 for kernel 6.8.0-51-generic (x86_64)
Saturday 04 January 2025 04:57:56 PM IST
make -C /lib/modules/6.8.0-51-generic/build M=/var/lib/dkms/v4l2loopback_dc/0.0.1/build modules
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-51-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
You are using: gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
CC [M] /var/lib/dkms/v4l2loopback_dc/0.0.1/build/v4l2loopback-dc.o
/var/lib/dkms/v4l2loopback_dc/0.0.1/build/v4l2loopback-dc.c: In function ‘vidioc_querycap’:
/var/lib/dkms/v4l2loopback_dc/0.0.1/build/v4l2loopback-dc.c:622:3: error: implicit declaration of function ‘strlcpy’; did you
mean ‘strscpy’? [-Werror=implicit-function-declaration]
622 | strlcpy(cap->driver, "Droidcam", sizeof(cap->driver));
| ^~~~~~~
| strscpy
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/v4l2loopback_dc/0.0.1/build/v4l2loopback-dc.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.8.0-51-generic/Makefile:1925: /var/lib/dkms/v4l2loopback_dc/0.0.1/build] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-51-generic'
make: *** [Makefile:8: all] Error 2
Appreciate any guidelines on how to resolve it.
Edit -
The output of dkms status is:
acpi-call/1.2.2, 6.8.0-50-generic, x86_64: installed
acpi-call/1.2.2, 6.8.0-51-generic, x86_64: installed
v4l2loopback_dc/0.0.1, 6.2.0-26-generic, x86_64: installed (WARNING! Diff between built and installed module!)