Unable to mount ubifs rootfs. Zero length root inode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to mount ubifs rootfs. Zero length root inode

223 Views
cha-king
Contributor I

I'm having some issues booting an imx7 currently. I receive a kernel panic on boot when attempting to mount the ubifs root fs. I've pasted the panic below. The assert statement that fails is:

ubifs_assert(len >= UBIFS_CH_SZ && offs + len <= c->leb_size);
 
With some debugging, I was able to see that the length is zero, which seems erroneous. Looking further, it seems as though the zbranch has a length of 0, although I'm not able to find out why this is the case.
 
For context, I'm attempting to mount an ubifs that was formatter with Linux version 4.9, and I'm trying to mount it with Linux 4.14. I don't believe there's an issue with the file system itself, since I'm able to mount it when booting to a different 4.9 kernel. I imagine the issue might stem from upgrading from 4.9 to 4.14.

Any help is appreciated. Thanks! 




UBIFS assert failed in ubifs_read_node at 996 (pid 1)
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.98-1.1.0+g0d650fa #1
Hardware name: Freescale i.MX7 Dual (Device Tree)
[<8010eef0>] (unwind_backtrace) from [<8010b268>] (show_stack+0x10/0x14)
[<8010b268>] (show_stack) from [<8096fae8>] (dump_stack+0x78/0x8c)
[<8096fae8>] (dump_stack) from [<803594e4>] (ubifs_read_node+0x120/0x2f4)
[<803594e4>] (ubifs_read_node) from [<8037409c>] (ubifs_load_znode+0xec/0x414)
[<8037409c>] (ubifs_load_znode) from [<8035b604>] (ubifs_lookup_level0+0x188/0x1c4)
[<8035b604>] (ubifs_lookup_level0) from [<8035b680>] (ubifs_tnc_locate.part.2+0x40/0x1ac)
[<8035b680>] (ubifs_tnc_locate.part.2) from [<80355350>] (ubifs_iget+0x7c/0x590)
[<80355350>] (ubifs_iget) from [<803560c0>] (ubifs_mount+0x85c/0x8b4)
[<803560c0>] (ubifs_mount) from [<802262f4>] (mount_fs+0x14/0xa8)
[<802262f4>] (mount_fs) from [<80242cb8>] (vfs_kern_mount.part.4+0x48/0xe4)
[<80242cb8>] (vfs_kern_mount.part.4) from [<8024640c>] (do_mount+0x80c/0xb60)
[<8024640c>] (do_mount) from [<802453ec>] (SyS_mount+0xb8/0xc8)
[<802453ec>] (SyS_mount) from [<80e01248>] (mount_block_root+0x170/0x38c)
[<80e01248>] (mount_block_root) from [<80e016c0>] (prepare_namespace+0xd8/0x224)
[<80e016c0>] (prepare_namespace) from [<80e00f14>] (kernel_init_freeable+0x288/0x2bc)
[<80e00f14>] (kernel_init_freeable) from [<80981cb4>] (kernel_init+0x8/0x110)
[<80981cb4>] (kernel_init) from [<801079e8>] (ret_from_fork+0x14/0x2c)
Unable to handle kernel NULL pointer dereference at virtual address 00000024
pgd = 80004000
[00000024] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.98-1.1.0+g0d650fa #1
Hardware name: Freescale i.MX7 Dual (Device Tree)
task: a6070000 task.stack: a6078000
PC is at ubifs_read_node+0x1d8/0x2f4
LR is at 0x3e000
pc : [<8035959c>] lr : [<0003e000>] psr: 60000013
sp : a6079cf8 ip : 000001b4 fp : 00000000
r10: 00000009 r9 : 00000010 r8 : 00000000
r7 : 00000000 r6 : 00000000 r5 : 00000000 r4 : a6604000
r3 : 00000001 r2 : 00000009 r1 : 00000000 r0 : 00003f50
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 10c53c7d Table: 8000406a DAC: 00000051
Process swapper/0 (pid: 1, stack limit = 0xa6078210)
Stack: (0xa6079cf8 to 0xa607a000)
9ce0: 00000000 00000000
9d00: 00000010 00000010 a66040e0 a6604000 00000000 00000000 00000000 00000010
9d20: 00000200 8037409c 00000000 00000000 00000000 00000000 a67370c0 60000013
9d40: 01400040 ffffe000 00000000 a6604000 a6079d98 a6604000 a6079df8 00000002
9d60: 00000018 a6079d9c 00000200 8035b604 80fffcb4 00000000 a6604000 00000000
9d80: a6079df8 a66040cc 00000000 00000018 a6704000 8035b680 bf551000 80986ff0
9da0: bf551000 80987274 a4262000 8023eb10 60000013 a4262000 00000000 a4262000
9dc0: a6704000 a6604000 80ff5ca4 00001000 a6604000 0003e000 00000200 80355350
9de0: 00000000 00001000 a6604000 0003e000 00000200 801701ac 00000001 00000000
9e00: a68193c0 00001000 a673a800 a6604718 a68193c0 00001000 a6604000 0003e000
9e20: 00000200 803560c0 a6604000 80ffca90 80ffca90 a6819445 a6819440 80355864
9e40: a6819440 80f1d174 80f1d174 00000000 a6819480 00000000 80f1d174 802262f4
9e60: 80f1d174 00000000 a669a800 a6819440 00008001 80242cb8 00008001 00008001
9e80: 00000060 a6819440 00000001 8024640c 00000000 80e6486c a6819440 00000051
9ea0: a6006d10 a4032dd0 0000000c 00000000 0000000c 801e7100 0000000c a6819480
9ec0: a6819440 80c0c828 00008001 00000000 a6078000 80e6486c 00000008 802453ec
9ee0: 00000000 a6079ef4 a681e000 bfbc3438 a681e000 00000000 00008001 80e01248
9f00: 00000000 80e6485c 80e6486c 80e6485c 80e64858 80e64838 00000008 00000153
9f20: 00000008 801701ac 80c0c944 a6079f4c 80e64858 80e6485c 80e6486c 80e004c8
9f40: 80e64858 80e64838 00000008 00000153 00000008 80e016c0 80e64858 80e00f10
9f60: 80fad000 80fad000 80e004c8 80e00f14 00000007 00000007 00000000 80e004c8
9f80: 80981cac 00000000 80981cac 00000000 00000000 00000000 00000000 00000000
9fa0: 00000000 80981cb4 00000000 801079e8 00000000 00000000 00000000 00000000
9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<8035959c>] (ubifs_read_node) from [<8037409c>] (ubifs_load_znode+0xec/0x414)
[<8037409c>] (ubifs_load_znode) from [<8035b604>] (ubifs_lookup_level0+0x188/0x1c4)
[<8035b604>] (ubifs_lookup_level0) from [<8035b680>] (ubifs_tnc_locate.part.2+0x40/0x1ac)
[<8035b680>] (ubifs_tnc_locate.part.2) from [<80355350>] (ubifs_iget+0x7c/0x590)
[<80355350>] (ubifs_iget) from [<803560c0>] (ubifs_mount+0x85c/0x8b4)
[<803560c0>] (ubifs_mount) from [<802262f4>] (mount_fs+0x14/0xa8)
[<802262f4>] (mount_fs) from [<80242cb8>] (vfs_kern_mount.part.4+0x48/0xe4)
[<80242cb8>] (vfs_kern_mount.part.4) from [<8024640c>] (do_mount+0x80c/0xb60)
[<8024640c>] (do_mount) from [<802453ec>] (SyS_mount+0xb8/0xc8)
[<802453ec>] (SyS_mount) from [<80e01248>] (mount_block_root+0x170/0x38c)
[<80e01248>] (mount_block_root) from [<80e016c0>] (prepare_namespace+0xd8/0x224)
[<80e016c0>] (prepare_namespace) from [<80e00f14>] (kernel_init_freeable+0x288/0x2bc)
[<80e00f14>] (kernel_init_freeable) from [<80981cb4>] (kernel_init+0x8/0x110)
[<80981cb4>] (kernel_init) from [<801079e8>] (ret_from_fork+0x14/0x2c)
Code: e35b0000 1a000044 e1a0200a e3030f50 (e5d91014)
---[ end trace 3a0409854da599ec ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

CPU1: stopping
CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 4.14.98-1.1.0+g0d650fa #1
Hardware name: Freescale i.MX7 Dual (Device Tree)
[<8010eef0>] (unwind_backtrace) from [<8010b268>] (show_stack+0x10/0x14)
[<8010b268>] (show_stack) from [<8096fae8>] (dump_stack+0x78/0x8c)
[<8096fae8>] (dump_stack) from [<8010dd4c>] (handle_IPI+0x180/0x1ac)
[<8010dd4c>] (handle_IPI) from [<80101504>] (gic_handle_irq+0x8c/0x90)
[<80101504>] (gic_handle_irq) from [<8010bfcc>] (__irq_svc+0x6c/0xa8)
Exception stack(0xa6099f50 to 0xa6099f98)
9f40: 00000000 bf630200 00000001 bf630200
9f60: ffffe000 80f059bc 00000000 00000000 bf62c528 00000001 c3d28d63 c36ee33a
9f80: 00000000 a6099fa0 80987274 806c8654 20000013 ffffffff
[<8010bfcc>] (__irq_svc) from [<806c8654>] (cpuidle_enter_state+0x88/0x304)
[<806c8654>] (cpuidle_enter_state) from [<80165ddc>] (do_idle+0x1b8/0x200)
[<80165ddc>] (do_idle) from [<801660dc>] (cpu_startup_entry+0x18/0x1c)
[<801660dc>] (cpu_startup_entry) from [<801017ec>] (__enable_mmu+0x0/0x14)
---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

0 Kudos
0 Replies