HI,
I'm straggle from UBIFS failure on my box that happens after power short. The boot in this case looks like:
Marvell>> boot
UBI: mtd1 is detached from ubi0
Creating 1 MTD partitions on "nand0":
0x000000500000-0x000020000000 : "mtd=2"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=2"
UBI: MTD device size: 507 MiB
UBI: number of good PEBs: 4055
UBI: number of bad PEBs: 1
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: 4055
UBI: number of PEBs reserved for bad PEB handling: 40
UBI: max/mean erase counter: 1/0
UBIFS: recovery needed
Error reading superblock on volume 'ubi:rootfs'!
UBIFS not mounted, use ubifs mount to mount volume first!
UBIFS not mounted, use ubifs mount to mount volume first!
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Marvell>>
The recovery is to boot from USB stick and mount UBIFS partition:
root@debian:~# mount -t ubifs ubi0:rootfs /mnt
[ 306.205029] UBIFS: recovery needed
[ 309.341987] UBIFS: recovery completed
[ 309.345705] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[ 309.351738] UBIFS: file system size: 515192832 bytes (503118 KiB, 491 MiB, 3993 LEBs)
[ 309.359789] UBIFS: journal size: 25804800 bytes (25200 KiB, 24 MiB, 200 LEBs)
[ 309.367495] UBIFS: media format: w4/r0 (latest is w4/r0)
[ 309.373352] UBIFS: default compressor: lzo
[ 309.377479] UBIFS: reserved for root: 4952683 bytes (4836 KiB)
Looks like mount can recover partition while u-boot can't.
Here are the questions I try to answer to go on:
- Why it happens. I mean why I get broken UBIFS that can not be recovered. I read about UBIFS and they state that it is oriented to recover from power shorts
- Shoul I better use another file system? Like JFFS2 for example? What usually is used on SheevaPlug
- Maybe a latest u-boot version cat treat ubifs recovery better?
- What else can be done to make system more stable
Thanks a lot