Ubuntu 24.04 update fails with Kernel panic VFS: Unable to mount root fs on unknown-block(0,0)
https://askubuntu.com/questions/1564834/ubuntu-24-04-update-fails-with-kernel-panic-vfs-unable-to-mount-root-fs-on-unknafter running regular update cycle vie GUI updater, system halts while booting with Kernel panic
VFS: Unable to mount root fs on unknown-block(0,0)
I was able to get the system booting using the recovery console of one of the older Kernel entries.Then I issued:
ls -all /boot
update-initramfs -c -k 6.17.0-19-generic
update-grub
Next reboot was ok.
Another attempt to update with:
sudo apt update
sudo apt upgrade
failed, again.
So I tried:
sudo apt autoremove
which came out:
apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
libnvidia-compute-550 nvidia-firmware-580-580.95.05
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 105 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 273996 files and directories currently installed.)
Removing libnvidia-compute-550:amd64 (550.163.01-0ubuntu0.24.04.2) ...
Removing nvidia-firmware-580-580.95.05 (580.95.05-0ubuntu0.24.04.3) ...
Setting up linux-image-6.17.0-19-generic (6.17.0-19.19~24.04.2) ...
Setting up linux-headers-6.17.0-19-generic (6.17.0-19.19~24.04.2) ...
/etc/kernel/header_postinst.d/dkms:
* dkms: running auto installation service for kernel 6.17.0-19-generic
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der
Building module:
Cleaning build area...
make -j8 KERNELRELEASE=6.17.0-19-generic -j8 -C /lib/modules/6.17.0-19-generic/build M=/var/lib/dkms/blksnap/6.3.2.1207/build modules...(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/blksnap.0.crash'
Error! Bad return status for module build on kernel: 6.17.0-19-generic (x86_64)
Consult /var/lib/dkms/blksnap/6.3.2.1207/build/make.log for more information.
dkms autoinstall on 6.17.0-19-generic/x86_64 failed for blksnap(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
* dkms: autoinstall for kernel 6.17.0-19-generic
...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
dpkg: error processing package linux-headers-6.17.0-19-generic (--configure):
installed linux-headers-6.17.0-19-generic package post-installation script subprocess returned error exit status 11
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates it
s a followup error from a previous failure.
dpkg: dependency problems prevent configuration of linux-headers-generic-hwe-24.04:
linux-headers-generic-hwe-24.04 depends on linux-headers-6.17.0-19-generic; however:
Package linux-headers-6.17.0-19-generic is not configured yet.
dpkg: error processing package linux-headers-generic-hwe-24.04 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-hwe-24.04:
linux-generic-hwe-24.04 depends on linux-headers-generic-hwe-24.04 (= 6.17.0-19.19~24.04.2); however:
Package linux-headers-generic-hwe-24.04 is not configured yet.
dpkg: error processing package linux-generic-hwe-24.04 (--configure):
dependency problems - leaving unconfigured
Processing triggers for linux-image-6.17.0-19-generic (6.17.0-19.19~24.04.2) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 6.17.0-19-generic
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der
Building module:
Cleaning build area...
make -j8 KERNELRELEASE=6.17.0-19-generic -j8 -C /lib/modules/6.17.0-19-generic/build M=/var/lib/dkms/blksnap/6.3.2.1207/build modules...(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/blksnap.0.crash'
Error! Bad return status for module build on kernel: 6.17.0-19-generic (x86_64)
Consult /var/lib/dkms/blksnap/6.3.2.1207/build/make.log for more information.
dkms autoinstall on 6.17.0-19-generic/x86_64 failed for blksnap(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
* dkms: autoinstall for kernel 6.17.0-19-generic
...fail!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.17.0-19-generic (--configure):
installed linux-image-6.17.0-19-generic package post-installation script subprocess returned error exit status 11
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-headers-6.17.0-19-generic
linux-headers-generic-hwe-24.04
linux-generic-hwe-24.04
linux-image-6.17.0-19-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
In this error messages I found the note to consult make.log:
cat /var/lib/dkms/blksnap/6.3.2.1207/build/make.log
DKMS make.log for blksnap-6.3.2.1207 for kernel 6.17.0-19-generic (x86_64)
Sat Mar 14 10:02:14 PM CET 2026
make: Entering directory '/usr/src/linux-headers-6.17.0-19-generic'
make[1]: Entering directory '/var/lib/dkms/blksnap/6.3.2.1207/build'
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.1) 13.3.0
You are using: gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
CC [M] bdevfilter.o
CC [M] log.o
CC [M] log_histogram.o
CC [M] big_buffer.o
CC [M] cbt_map.o
CC [M] chunk.o
CC [M] ctrl.o
CC [M] diff_io.o
cbt_map.c:7:10: fatal error: linux/blk_snap.h: No such file or directory
7 | #include <linux/blk_snap.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/usr/src/linux-headers-6.17.0-19-generic/scripts/Makefile.build:287: cbt_map.o] Error 1
make[3]: *** Waiting for unfinished jobs....
ctrl.c:11:10: fatal error: linux/blk_snap.h: No such file or directory
11 | #include <linux/blk_snap.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/usr/src/linux-headers-6.17.0-19-generic/scripts/Makefile.build:287: ctrl.o] Error 1
log.c:11:10: fatal error: linux/blk_snap.h: No such file or directory
11 | #include <linux/blk_snap.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/usr/src/linux-headers-6.17.0-19-generic/scripts/Makefile.build:287: log.o] Error 1
chunk.c:21:24: error: redefinition of ‘bdev_nr_sectors’
21 | static inline sector_t bdev_nr_sectors(struct block_device *bdev)
| ^~~~~~~~~~~~~~~
In file included from chunk.h:6,
from chunk.c:8:
/usr/src/linux-headers-6.17.0-19-generic/include/linux/blkdev.h:824:24: note: previous definition of ‘bdev_nr_sectors’ with type ‘sector_t(struct block_device *)’ {aka ‘long long unsigned int(struct block_device *)’}
824 | static inline sector_t bdev_nr_sectors(struct block_device *bdev)
| ^~~~~~~~~~~~~~~
chunk.c: In function ‘bdev_nr_sectors’:
chunk.c:23:32: error: ‘struct block_device’ has no member named ‘bd_inode’
23 | return i_size_read(bdev->bd_inode) >> 9;
| ^~
diff_io.c: In function ‘diff_io_do’:
diff_io.c:180:40: warning: passing argument 1 of ‘bio_alloc_bioset’ makes pointer from integer without a cast [-Wint-conversion]
180 | bio = bio_alloc_bioset(gfp, nr_iovecs, &diff_io_bioset);
| ^~~
| |
| gfp_t {aka unsigned int}
In file included from /usr/src/linux-headers-6.17.0-19-generic/include/linux/blkdev.h:17,
from diff_io.c:6:
/usr/src/linux-headers-6.17.0-19-generic/include/linux/bio.h:356:51: note: expected ‘struct block_device *’ but argument is of type ‘gfp_t’ {aka ‘unsigned int’}
356 | struct bio *bio_alloc_bioset(struct block_device *bdev, unsigned short nr_vecs,
| ~~~~~~~~~~~~~~~~~~~~~^~~~
diff_io.c:180:56: warning: passing argument 3 of ‘bio_alloc_bioset’ makes integer from pointer without a cast [-Wint-conversion]
180 | bio = bio_alloc_bioset(gfp, nr_iovecs, &diff_io_bioset);
| ^~~~~~~~~~~~~~~
| |
| struct bio_set *
/usr/src/linux-headers-6.17.0-19-generic/include/linux/bio.h:357:40: note: expected ‘blk_opf_t’ {aka ‘unsigned int’} but argument is of type ‘struct bio_set *’
357 | blk_opf_t opf, gfp_t gfp_mask,
| ~~~~~~~~~~^~~
diff_io.c:180:23: error: too few arguments to function ‘bio_alloc_bioset’
180 | bio = bio_alloc_bioset(gfp, nr_iovecs, &diff_io_bioset);
| ^~~~~~~~~~~~~~~~
/usr/src/linux-headers-6.17.0-19-generic/include/linux/bio.h:356:13: note: declared here
356 | struct bio *bio_alloc_bioset(struct block_device *bdev, unsigned short nr_vecs,
| ^~~~~~~~~~~~~~~~
chunk.c: In function ‘chunk_store_failed’:
chunk.c:80:17: error: implicit declaration of function ‘LIMIT_BEGIN’ [-Werror=implicit-function-declaration]
80 | LIMIT_BEGIN(7)
| ^~~~~~~~~~~
In file included from /usr/src/linux-headers-6.17.0-19-generic/include/asm-generic/bug.h:22,
from /usr/src/linux-headers-6.17.0-19-generic/arch/x86/include/asm/bug.h:103,
from /usr/src/linux-headers-6.17.0-19-generic/arch/x86/include/asm/alternative.h:9,
from /usr/src/linux-headers-6.17.0-19-generic/arch/x86/include/asm/nospec-branch.h:10,
from /usr/src/linux-headers-6.17.0-19-generic/arch/x86/include/asm/irqflags.h:9,
from /usr/src/linux-headers-6.17.0-19-generic/include/linux/irqflags.h:18,
from /usr/src/linux-headers-6.17.0-19-generic/include/linux/spinlock.h:59,
from /usr/src/linux-headers-6.17.0-19-generic/include/linux/mmzone.h:8,
from /usr/src/linux-headers-6.17.0-19-generic/include/linux/gfp.h:7,
from /usr/src/linux-headers-6.17.0-19-generic/include/linux/slab.h:16,
from chunk.c:3:
/usr/src/linux-headers-6.17.0-19-generic/include/linux/printk.h:484:10: error: expected expression before ‘{’ token
484 | ({ \
| ^
/usr/src/linux-headers-6.17.0-19-generic/include/linux/printk.h:514:26: note: in expansion of macro ‘printk_index_wrap’
514 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
/usr/src/linux-headers-6.17.0-19-generic/include/linux/printk.h:557:9: note: in expansion of macro ‘printk’
557 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
chunk.c:81:17: note: in expansion of macro ‘pr_err’
81 | pr_err("Failed to store chunk #%lu\n", chunk->number);
| ^~~~~~
chunk.c:80:17: error: called object is not a function or function pointer
80 | LIMIT_BEGIN(7)
| ^~~~~~~~~~~
chunk.c:82:17: error: implicit declaration of function ‘LIMIT_STOP’; did you mean ‘RLIMIT_STACK’? [-Werror=implicit-function-declaration]
82 | LIMIT_STOP()
| ^~~~~~~~~~
| RLIMIT_STACK
/usr/src/linux-headers-6.17.0-19-generic/include/linux/printk.h:484:10: error: expected expression before ‘{’ token
484 | ({ \
| ^
/usr/src/linux-headers-6.17.0-19-generic/include/linux/printk.h:514:26: note: in expansion of macro ‘printk_index_wrap’
514 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
/usr/src/linux-headers-6.17.0-19-generic/include/linux/printk.h:557:9: note: in expansion of macro ‘printk’
557 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
chunk.c:83:17: note: in expansion of macro ‘pr_err’
83 | pr_err("Too many chunk have failed, stop flooding\n");
| ^~~~~~
chunk.c:82:17: error: called object is not a function or function pointer
82 | LIMIT_STOP()
| ^~~~~~~~~~
chunk.c:84:17: error: implicit declaration of function ‘LIMIT_END’ [-Werror=implicit-function-declaration]
84 | LIMIT_END()
| ^~~~~~~~~
chunk.c:84:28: error: expected ‘;’ before ‘diff_area_set_corrupted’
84 | LIMIT_END()
| ^
| ;
85 | diff_area_set_corrupted(diff_area, error);
| ~~~~~~~~~~~~~~~~~~~~~~~
diff_io.c:191:17: error: implicit declaration of function ‘bio_set_op_attrs’ [-Werror=implicit-function-declaration]
191 | bio_set_op_attrs(bio, opf, op_flags);
| ^~~~~~~~~~~~~~~~
chunk.c: In function ‘bdev_nr_sectors’:
chunk.c:24:1: error: control reaches end of non-void function [-Werror=return-type]
24 | };
| ^
cc1: some warnings being treated as errors
diff_io.c:223:17: error: implicit declaration of function ‘io_set_flag’; did you mean ‘bio_set_flag’? [-Werror=implicit-function-declaration]
223 | io_set_flag(bio, BIO_FILTERED);
| ^~~~~~~~~~~
| bio_set_flag
make[3]: *** [/usr/src/linux-headers-6.17.0-19-generic/scripts/Makefile.build:287: chunk.o] Error 1
diff_io.c:223:34: error: ‘BIO_FILTERED’ undeclared (first use in this function)
223 | io_set_flag(bio, BIO_FILTERED);
| ^~~~~~~~~~~~
diff_io.c:223:34: note: each undeclared identifier is reported only once for each function it appears in
bdevfilter.c:372:2: error: #error "Your kernel is too old for this module."
372 | #error "Your kernel is too old for this module."
| ^~~~~
cc1: some warnings being treated as errors
bdevfilter.c:374:1: error: expected identifier or ‘(’ before ‘{’ token
374 | {
| ^
make[3]: *** [/usr/src/linux-headers-6.17.0-19-generic/scripts/Makefile.build:287: diff_io.o] Error 1
In file included from /usr/src/linux-headers-6.17.0-19-generic/include/linux/linkage.h:7,
from /usr/src/linux-headers-6.17.0-19-generic/include/linux/printk.h:8,
from /usr/src/linux-headers-6.17.0-19-generic/include/asm-generic/bug.h:22,
from /usr/src/linux-headers-6.17.0-19-generic/arch/x86/include/asm/bug.h:103,
from /usr/src/linux-headers-6.17.0-19-generic/arch/x86/include/asm/alternative.h:9,
from /usr/src/linux-headers-6.17.0-19-generic/arch/x86/include/asm/barrier.h:5,
from /usr/src/linux-headers-6.17.0-19-generic/include/linux/list.h:11,
from /usr/src/linux-headers-6.17.0-19-generic/include/linux/module.h:12,
from bdevfilter.c:3:
bdevfilter.c:381:15: error: ‘submit_bio_noacct_notrace’ undeclared here (not in a function); did you mean ‘submit_bio_noacct’?
381 | EXPORT_SYMBOL(submit_bio_noacct_notrace);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/linux-headers-6.17.0-19-generic/include/linux/export.h:76:23: note: in definition of macro ‘__EXPORT_SYMBOL’
76 | extern typeof(sym) sym; \
| ^~~
/usr/src/linux-headers-6.17.0-19-generic/include/linux/export.h:89:41: note: in expansion of macro ‘_EXPORT_SYMBOL’
89 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
bdevfilter.c:381:1: note: in expansion of macro ‘EXPORT_SYMBOL’
381 | EXPORT_SYMBOL(submit_bio_noacct_notrace);
| ^~~~~~~~~~~~~
bdevfilter.c:389:1: error: expected identifier or ‘(’ before ‘{’ token
389 | {
| ^
bdevfilter.c: In function ‘ftrace_handler_submit_bio_noacct’:
bdevfilter.c:420:62: error: ‘submit_bio_noacct_handler’ undeclared (first use in this function); did you mean ‘submit_bio_noacct_notrace’?
420 | instruction_pointer_set(regs, (unsigned long)submit_bio_noacct_handler);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| submit_bio_noacct_notrace
bdevfilter.c:420:62: note: each undeclared identifier is reported only once for each function it appears in
bdevfilter.c: At top level:
bdevfilter.c:426:17: error: initialization of ‘void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct ftrace_regs *)’ from incompatible pointer type ‘void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct pt_regs *)’ [-Werror=incompatible-pointer-types]
426 | .func = ftrace_handler_submit_bio_noacct,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bdevfilter.c:426:17: note: (near initialization for ‘ops_submit_bio_noacct.func’)
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-6.17.0-19-generic/scripts/Makefile.build:287: bdevfilter.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.17.0-19-generic/Makefile:2016: .] Error 2
make[1]: *** [/usr/src/linux-headers-6.17.0-19-generic/Makefile:248: __sub-make] Error 2
make[1]: Leaving directory '/var/lib/dkms/blksnap/6.3.2.1207/build'
make: *** [Makefile:248: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.17.0-19-generic'
Now here I got lost, its beyond my knowledge.
Any help appreciated.










