UBIFS-based ROOTFS mount only works the first time

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

UBIFS-based ROOTFS mount only works the first time

1,391 Views
PeterThoeming
Contributor I

I'm booting my MX50 RD3 EVK from u-boot, kernel, and UBIFS ROOTFS held in NAND FLASH.

Upon first boot after the NAND FLASH is programmed using the FS MfgTool, I see it mount without any problems:

...

 UBI: attaching mtd2 to ubi0
 UBI: physical eraseblock size:   131072 bytes (128 KiB)
 UBI: logical eraseblock size:    126976 bytes
 UBI: smallest flash I/O unit:    2048
 UBI: VID header offset:          2048 (aligned 2048)
 UBI: data offset:                4096
 UBI: volume 0 ("rootfs") re-sized from 1652 to 1858 LEBs
 UBI: attached mtd2 to ubi0
 UBI: MTD device name:            "gpmi-nfc-general-use"
 UBI: MTD device size:            235 MiB
 UBI: number of good PEBs:        1880
 UBI: number of bad PEBs:         0
 UBI: max. allowed volumes:       128
 UBI: wear-leveling threshold:    4096
 UBI: number of internal volumes: 1
 UBI: number of user volumes:     1
 UBI: available PEBs:             0
 UBI: total number of reserved PEBs: 1880
 UBI: number of PEBs reserved for bad PEB handling: 18
 UBI: max/mean erase counter: 1/0
 UBI: image sequence number: 1123791523
...

 UBIFS: mounted UBI device 0, volume 0, name "rootfs"
 UBIFS: file system size:   234524672 bytes (229028 KiB, 223 MiB, 1847 LEBs)
 UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
 UBIFS: media format:       w4/r0 (latest is w4/r0)
 UBIFS: default compressor: none
 UBIFS: reserved for root:  0 bytes (0 KiB)

...

However, if I then type poweroff, the board reboots automatically and I typically see this:

...

 UBI: attaching mtd2 to ubi0
 UBI: physical eraseblock size:   131072 bytes (128 KiB)
 UBI: logical eraseblock size:    126976 bytes
 UBI: smallest flash I/O unit:    2048
 UBI: VID header offset:          2048 (aligned 2048)
 UBI: data offset:                4096

<no comment about re-sizing>
 UBI: attached mtd2 to ubi0
 UBI: MTD device name:            "gpmi-nfc-general-use"
 UBI: MTD device size:            235 MiB
 UBI: number of good PEBs:        1880
 UBI: number of bad PEBs:         0
 UBI: max. allowed volumes:       128
 UBI: wear-leveling threshold:    4096
 UBI: number of internal volumes: 1
 UBI: number of user volumes:     1
 UBI: available PEBs:             0
 UBI: total number of reserved PEBs: 1880
 UBI: number of PEBs reserved for bad PEB handling: 18
 UBI: max/mean erase counter: 2/0
 UBI: image sequence number: 1123791523
...

 UBI error: ubi_io_read: error -74 while reading 126976 bytes from PEB 3:4096, read 126976 bytes
 UBI error: ubi_io_read: error -74 while reading 126976 bytes from PEB 3:4096, read 126976 bytes
 UBI error: ubi_io_read: error -74 while reading 126976 bytes from PEB 4:4096, read 126976 bytes
 UBIFS: recovered master node from LEB 1
 UBI error: ubi_io_read: error -74 while reading 11 bytes from PEB 10:14336, read 11 bytes
 VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
 Please append a correct "root=" boot option; here are the available partitions:
 1f00           16384 mtdblock0 (driver?)
 1f01            5120 mtdblock1 (driver?)
 1f02          240640 mtdblock2 (driver?)
 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

...

any idea why the RootFS is only mount-able the first time?

Thanks,

Peter





Tags (1)
0 Kudos
0 Replies