解决那些千奇百怪的 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block 错误
-
传言道:80%的 Kernel panic 是都是同一个报错:
剩下 5% 是 init 设置错了,其余的是剩余各式各样的
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block ]---
所以开个帖子,记录下遇到的那些奇奇怪怪的 VFS Panic 和解决方法
-
错误列表【持续更新中】
[EXFAT] trying to mount...
并打印分区表:https://bbs.aw-ol.com/topic/1726/share/3- 打印分区表出现
No filesystem could mount root, tried: xxx
:https://bbs.aw-ol.com/topic/1726/share/4 - eMMC、TF卡、SDNAND启动卡在
Waiting for root device /dev/ubiblockxxx...
不动了:https://bbs.aw-ol.com/topic/1726/share/5 - SPI NAND、SPI NOR 启动卡在
Waiting for root device /dev/ubiblockxxx...
不动了:https://bbs.aw-ol.com/topic/1726/share/6 - rootfs格式设置都是正确的但是还是打印分区表然后
No filesystem could mount root, tried: xxx
:https://bbs.aw-ol.com/topic/1726/share/7 - 报错
Filesystem uses "xz" compression. This is not supported
:https://bbs.aw-ol.com/topic/1726/share/8
-
错误
设备:T113 + eMMC,SDC2
错误描述:[EXFAT] trying to mount...
后 Panic,显示 MMC 分区表LOG
[ 2.345878] [EXFAT] trying to mount... [ 2.350344] VFS: Cannot open root device "mmcblk0p5" or unknown-block(179,5): error -5 [ 2.359283] Please append a correct "root=" boot option; here are the available partitions: [ 2.368687] b300 15392768 mmcblk0 [ 2.368690] driver: mmcblk [ 2.376362] b301 17219 mmcblk0p1 a0085546-4166-744a-a353-fca9272b8e45 [ 2.376366] [ 2.386443] b302 1024 mmcblk0p2 a0085546-4166-744a-a353-fca9272b8e46 [ 2.386446] [ 2.396519] b303 1024 mmcblk0p3 a0085546-4166-744a-a353-fca9272b8e47 [ 2.396521] [ 2.406588] b304 16384 mmcblk0p4 a0085546-4166-744a-a353-fca9272b8e48 [ 2.406590] [ 2.416657] b305 16384 mmcblk0p5 a0085546-4166-744a-a353-fca9272b8e49 [ 2.416659] [ 2.426726] b306 1024 mmcblk0p6 a0085546-4166-744a-a353-fca9272b8e4a [ 2.426728] [ 2.436797] b307 15302828 mmcblk0p7 a0085546-4166-744a-a353-fca9272b8e4b [ 2.436799] [ 2.446875] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,5) [ 2.456348] CPU0: stopping [ 2.459386] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.61+ #3 [ 2.466119] Hardware name: Generic DT based system [ 2.471515] [<c010e048>] (unwind_backtrace) from [<c010a788>] (show_stack+0x10/0x14) [ 2.480206] [<c010a788>] (show_stack) from [<c05f93e8>] (dump_stack+0x88/0xa4) [ 2.488313] [<c05f93e8>] (dump_stack) from [<c010c3d8>] (handle_IPI+0xd4/0x180) [ 2.496518] [<c010c3d8>] (handle_IPI) from [<c0329cbc>] (gic_handle_irq+0x70/0x78) [ 2.505016] [<c0329cbc>] (gic_handle_irq) from [<c01021cc>] (__irq_svc+0x6c/0xa8) [ 2.513408] Exception stack(0xc0b01f40 to 0xc0b01f88) [ 2.519077] 1f40: 000008d0 c7aba334 00000000 c01149c0 00000001 c0b00000 c0b03de4 c0b03e20 [ 2.528253] 1f60: 00000000 c7bff5c0 c0a240c0 00000000 00000001 c0b01f90 c01080a0 c01080a4 [ 2.537424] 1f80: 60000113 ffffffff [ 2.541342] [<c01021cc>] (__irq_svc) from [<c01080a4>] (arch_cpu_idle+0x2c/0x38) [ 2.549643] [<c01080a4>] (arch_cpu_idle) from [<c013dbe4>] (do_idle+0xbc/0x128) [ 2.557845] [<c013dbe4>] (do_idle) from [<c013dee0>] (cpu_startup_entry+0x18/0x20) [ 2.566344] [<c013dee0>] (cpu_startup_entry) from [<c0a00c80>] (start_kernel+0x354/0x3e0) [ 2.575520] [<c0a00c80>] (start_kernel) from [<00000000>] (0x0) [ 2.582170] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,5) ]---
解决
看到
[EXFAT] trying to mount...
不用慌,这只是一个障眼法,它真正的报错是No filesystem could mount root, tried: xxx
也就是没有找到可以挂载的格式。因为 EXFAT 的驱动很特别,他一般是之前设置的格式都没法挂载后才会尝试 EXFAT。所以实际上错误与下一个要介绍的错误是相同的。
建议关闭 exfat 看看真正的报错是什么
-
错误
设备:T113 + eMMC,SDC2
错误描述:显示分区表后 Panic,提示没有可供挂载的格式LOG
[ 2.337965] List of all partitions: [ 2.341882] b300 15392768 mmcblk0 [ 2.341885] driver: mmcblk [ 2.349544] b301 17219 mmcblk0p1 a0085546-4166-744a-a353-fca9272b8e45 [ 2.349547] [ 2.359627] b302 1024 mmcblk0p2 a0085546-4166-744a-a353-fca9272b8e46 [ 2.359630] [ 2.369712] b303 1024 mmcblk0p3 a0085546-4166-744a-a353-fca9272b8e47 [ 2.369714] [ 2.379784] b304 16384 mmcblk0p4 a0085546-4166-744a-a353-fca9272b8e48 [ 2.379786] [ 2.389853] b305 42232 mmcblk0p5 a0085546-4166-744a-a353-fca9272b8e49 [ 2.389855] [ 2.399921] b306 1024 mmcblk0p6 a0085546-4166-744a-a353-fca9272b8e4a [ 2.399923] [ 2.409989] b307 15302828 mmcblk0p7 a0085546-4166-744a-a353-fca9272b8e4b [ 2.409992] [ 2.420057] No filesystem could mount root, tried: [ 2.429837] squashfs [ 2.434530] [ 2.438364] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,5) [ 2.447834] CPU0: stopping [ 2.450871] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.61+ #4 [ 2.457595] Hardware name: Generic DT based system [ 2.462990] [<c010e048>] (unwind_backtrace) from [<c010a788>] (show_stack+0x10/0x14) [ 2.471682] [<c010a788>] (show_stack) from [<c05ece28>] (dump_stack+0x88/0xa4) [ 2.479789] [<c05ece28>] (dump_stack) from [<c010c3d8>] (handle_IPI+0xd4/0x180) [ 2.487994] [<c010c3d8>] (handle_IPI) from [<c0329cbc>] (gic_handle_irq+0x70/0x78) [ 2.496491] [<c0329cbc>] (gic_handle_irq) from [<c01021cc>] (__irq_svc+0x6c/0xa8) [ 2.504883] Exception stack(0xc0b01f40 to 0xc0b01f88) [ 2.510552] 1f40: 00000a3c c7aba334 00000000 c01149c0 00000001 c0b00000 c0b03de4 c0b03e20 [ 2.519728] 1f60: 00000000 c7bff5c0 c0a240c0 00000000 c0b4b7e8 c0b01f90 c01080a0 c01080a4 [ 2.528900] 1f80: 60000113 ffffffff [ 2.532816] [<c01021cc>] (__irq_svc) from [<c01080a4>] (arch_cpu_idle+0x2c/0x38) [ 2.541118] [<c01080a4>] (arch_cpu_idle) from [<c013dbe4>] (do_idle+0xbc/0x128) [ 2.549321] [<c013dbe4>] (do_idle) from [<c013dee0>] (cpu_startup_entry+0x18/0x20) [ 2.557819] [<c013dee0>] (cpu_startup_entry) from [<c0a00c80>] (start_kernel+0x354/0x3e0) [ 2.566996] [<c0a00c80>] (start_kernel) from [<00000000>] (0x0) [ 2.573643] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,5) ]---
解决
检查下你的 rootfs 的格式,这里只支持
squashfs
看看你的 rootfs 是不是打包成ext4
或者是其他什么格式的了。 -
错误:
设备 T113 + eMMC,SDC2
错误描述:卡在Waiting for root device /dev/ubiblock0_5...
不动了LOG
[ 3.793291] Waiting for root device /dev/ubiblock0_5... [ 3.836994] random: crng init done [ 6.927839] [ 6.927839] insmod_device_driver [ 6.927839]
解决
看设备名:
ubiblock0_5
,ubixxxx
表示这是一个 SPI NAND 设备,如果是 SPI NOR 那一般是mtdxxxx
。
再看看我们实际的启动设备,是eMMC,是一个MMC设备,应该是mmcblkxxx
这样的才对
检查下 bootargs 里的参数,看看root=
后面是不是设置成 SPI FLASH 了 -
错误:
设备 T113 + SPI NAND,SPI 0
错误描述:卡在 Waiting for root device /dev/ubiblock0_5... 不动了LOG
[ 3.793291] Waiting for root device /dev/ubiblock0_5... [ 3.836994] random: crng init done [ 6.927839] [ 6.927839] insmod_device_driver [ 6.927839]
解决
看设备名:ubiblock0_5,ubixxxx 表示这是一个 SPI NAND 设备,如果是 SPI NOR 那一般是 mtdxxxx。
再看看我们实际的启动设备,也是 SPI NAND,那这里就对上了。
再看看咋们的设备树:
好嘛,你把 SPI0 都 disable 了他咋启动啊,设置 okay 就好了 -
错误
设备:T113 + eMMC,SDC2
错误描述:rootfs格式设置都是正确的,驱动也有,但是还是打印分区表然后提示没有可供挂载的格式LOG
[ 2.337965] List of all partitions: [ 2.341882] b300 15392768 mmcblk0 [ 2.341885] driver: mmcblk [ 2.349544] b301 17219 mmcblk0p1 a0085546-4166-744a-a353-fca9272b8e45 [ 2.349547] [ 2.359627] b302 1024 mmcblk0p2 a0085546-4166-744a-a353-fca9272b8e46 [ 2.359630] [ 2.369712] b303 1024 mmcblk0p3 a0085546-4166-744a-a353-fca9272b8e47 [ 2.369714] [ 2.379784] b304 16384 mmcblk0p4 a0085546-4166-744a-a353-fca9272b8e48 [ 2.379786] [ 2.389853] b305 16384 mmcblk0p5 a0085546-4166-744a-a353-fca9272b8e49 [ 2.389855] [ 2.399921] b306 1024 mmcblk0p6 a0085546-4166-744a-a353-fca9272b8e4a [ 2.399923] [ 2.409989] b307 15302828 mmcblk0p7 a0085546-4166-744a-a353-fca9272b8e4b [ 2.409992] [ 2.420057] No filesystem could mount root, tried: [ 2.420059] ext3 [ 2.425525] ext2 [ 2.427686] ext4 [ 2.429837] squashfs [ 2.431988] vfat [ 2.434530] [ 2.438364] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,5) [ 2.447834] CPU0: stopping [ 2.450871] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.61+ #4 [ 2.457595] Hardware name: Generic DT based system [ 2.462990] [<c010e048>] (unwind_backtrace) from [<c010a788>] (show_stack+0x10/0x14) [ 2.471682] [<c010a788>] (show_stack) from [<c05ece28>] (dump_stack+0x88/0xa4) [ 2.479789] [<c05ece28>] (dump_stack) from [<c010c3d8>] (handle_IPI+0xd4/0x180) [ 2.487994] [<c010c3d8>] (handle_IPI) from [<c0329cbc>] (gic_handle_irq+0x70/0x78) [ 2.496491] [<c0329cbc>] (gic_handle_irq) from [<c01021cc>] (__irq_svc+0x6c/0xa8) [ 2.504883] Exception stack(0xc0b01f40 to 0xc0b01f88) [ 2.510552] 1f40: 00000a3c c7aba334 00000000 c01149c0 00000001 c0b00000 c0b03de4 c0b03e20 [ 2.519728] 1f60: 00000000 c7bff5c0 c0a240c0 00000000 c0b4b7e8 c0b01f90 c01080a0 c01080a4 [ 2.528900] 1f80: 60000113 ffffffff [ 2.532816] [<c01021cc>] (__irq_svc) from [<c01080a4>] (arch_cpu_idle+0x2c/0x38) [ 2.541118] [<c01080a4>] (arch_cpu_idle) from [<c013dbe4>] (do_idle+0xbc/0x128) [ 2.549321] [<c013dbe4>] (do_idle) from [<c013dee0>] (cpu_startup_entry+0x18/0x20) [ 2.557819] [<c013dee0>] (cpu_startup_entry) from [<c0a00c80>] (start_kernel+0x354/0x3e0) [ 2.566996] [<c0a00c80>] (start_kernel) from [<00000000>] (0x0) [ 2.573643] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,5) ]---
解决
这一般是因为 rootfs 的数据错误,看一下是不是打包错了,把uboot打包进rootfs里了,或者是
root=
的分区搞错了,或者 rootfs 因为不正常关机损坏了比如这里,
mmcblk0p4
与mmcblk0p5
容量一模一样的,肯定是打包错了 -
错误
设备:T113 + TF 卡,SDC0
错误描述:rootfs格式设置都是正确的,驱动也有,报错Filesystem uses "xz" compression. This is not supported
LOG
[ 4.049960] Filesystem uses "xz" compression. This is not supported [ 4.058133] [EXFAT] trying to mount... [ 4.062717] VFS: Cannot open root device "mmcblk0p5" or unknown-block(179,5): error -5 [ 4.071559] Please append a correct "root=" boot option; here are the available partitions: [ 4.080869] b300 30253056 mmcblk0 [ 4.080872] driver: mmcblk [ 4.088504] b301 252 mmcblk0p1 a0085546-4166-744a-a353-fca9272b8e45 [ 4.088507] [ 4.098521] b302 252 mmcblk0p2 a0085546-4166-744a-a353-fca9272b8e46 [ 4.098524] [ 4.108544] b303 252 mmcblk0p3 a0085546-4166-744a-a353-fca9272b8e47 [ 4.108547] [ 4.118568] b304 8316 mmcblk0p4 a0085546-4166-744a-a353-fca9272b8e48 [ 4.118570] [ 4.128581] b305 30992 mmcblk0p5 a0085546-4166-744a-a353-fca9272b8e49 [ 4.128583] [ 4.138575] b306 30176111 mmcblk0p6 a0085546-4166-744a-a353-fca9272b8e4a [ 4.138577] [ 4.148600] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,5) [ 4.158014] CPU0: stopping [ 4.161030] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.61+ #1 [ 4.167708] Hardware name: Generic DT based system [ 4.173059] [<c010e048>] (unwind_backtrace) from [<c010a788>] (show_stack+0x10/0x14) [ 4.181681] [<c010a788>] (show_stack) from [<c05f9108>] (dump_stack+0x88/0xa4) [ 4.189727] [<c05f9108>] (dump_stack) from [<c010c3d8>] (handle_IPI+0xd4/0x180) [ 4.197865] [<c010c3d8>] (handle_IPI) from [<c03299e4>] (gic_handle_irq+0x70/0x78) [ 4.206291] [<c03299e4>] (gic_handle_irq) from [<c01021cc>] (__irq_svc+0x6c/0xa8) [ 4.214611] Exception stack(0xc0b01f40 to 0xc0b01f88) [ 4.220234] 1f40: 00000c60 c7abb334 00000000 c01149c0 00000001 c0b00000 c0b03de4 c0b03e20 [ 4.229331] 1f60: 00000000 c7bff5c0 c0a240c0 00000000 00000001 c0b01f90 c01080a0 c01080a4 [ 4.238429] 1f80: 60000113 ffffffff [ 4.242314] [<c01021cc>] (__irq_svc) from [<c01080a4>] (arch_cpu_idle+0x2c/0x38) [ 4.250551] [<c01080a4>] (arch_cpu_idle) from [<c013dbe4>] (do_idle+0xbc/0x128) [ 4.258686] [<c013dbe4>] (do_idle) from [<c013dee0>] (cpu_startup_entry+0x18/0x20) [ 4.267114] [<c013dee0>] (cpu_startup_entry) from [<c0a00c80>] (start_kernel+0x354/0x3e0) [ 4.276219] [<c0a00c80>] (start_kernel) from [<00000000>] (0x0) [ 4.282806] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,5) ]---
解决
Filesystem uses "xz" compression. This is not supported
SquashFS 不支持这个压缩格式
丢脸,看看你的 kernel menuconfig 里有没有打开 xz 压缩了,这不没开的嘛
-
@yuzukitsuru ,好帖
-
@yuzukitsuru 我要是不回复感谢一下,我都觉得对不起你…
-
发现一种同样的报错,原因是卡启动det引脚电平不对!这个硬件错误也会导致同样的报错。
-
还有一种是tf卡太差,有时候就挂了。。
-
@yuzukitsuru D1s关闭sdc1的设备树,出现下面的报错,怎么解决?
VFS: Cannot open root device "mmcblk0p5" or unknown-block(0,0): error -6 Please append a correct "root=" boot option; here are the available partitions: Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.61 #128 Call Trace: [<ffffffe000020164>] walk_stackframe+0x0/0x98 [<ffffffe00002031c>] show_stack+0x2a/0x34 [<ffffffe0002f05cc>] dump_stack+0x20/0x28 [<ffffffe000024724>] panic+0xec/0x272 [<ffffffe000000ef2>] mount_block_root+0x214/0x27a [<ffffffe000000fde>] mount_root+0x86/0x90 [<ffffffe000001130>] prepare_namespace+0x148/0x152 [<ffffffe000000b54>] kernel_init_freeable+0x166/0x198 [<ffffffe000300d30>] kernel_init+0x12/0xee [<ffffffe00001eed0>] ret_from_exception+0x0/0xc ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
-
@maihuanyi
没有生成 /dev/mmcblk0p5 ? -
@whycan 是的,谢谢
-
@maihuanyi
注意sdc0 TF卡的det引脚的电平,看下是高检测,还是低检测,如果反了Linux就检测不到卡片。 -
@maihuanyi 在lichee/linux-5.4/drivers/staging/exfat/exfat_super.c的4027行添加延时,如下图所示
主要问题是exFAT初始化过快,需要等sd初始化完成,再初始化exFAT文件系统。
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号