UBIFS bad superblock error

Artem Bityutskiy dedekind1 at gmail.com
Tue Feb 2 01:33:11 EST 2010


On Wed, 2010-01-20 at 09:51 +0100, dballman wrote:
> Hello,
> 
> By generating a busybox image with these commands:
> 
> mkfs.ubifs -U -x favor_lzo -m 1 -e 130944 -c 100 -r _install/ -o
> busybox-ubifs.img
> ubinize -o busybox-ubiimg.bin -p 128KiB -m 1 ubinize.ini
> 
> ubinize.ini content:
> 
> [rootfs-volume]
> mode=ubi
> image=busybox-ubifs.img
> vol_id=0
> vol_size=50MiB
> vol_type=dynamic
> vol_name=rootfs
> vol_alignment=1
> vol_flags=autoresize
> 
> Then I put the .bin file on the address for the second mtd partition
> on a custom made board with NOR flash and it gives the following
> error:
> (Only relevant information is shown)
> 
> ...
> [    0.000000] Kernel command line: mem=64M console=ttyS0,115200 ubi.mtd=1
> root=ubi0:rootfs rw rootfstype=ubifs
> mtdparts=physmap-flash.0:4096k(boot),-(root_rw)
> ...
> [    0.690000] 2 cmdlinepart partitions found on MTD device physmap-flash.0
> [    0.700000] Creating 2 MTD partitions on "physmap-flash.0":
> [    0.700000] 0x000000000000-0x000000400000 : "boot"
> [    0.710000] 0x000000400000-0x000004000000 : "root_rw"
> ...
> [    0.760000] UBI: attaching mtd1 to ubi0
> [    0.760000] UBI: physical eraseblock size:    131072 bytes (128 KiB)
> [    0.770000] UBI: logical eraseblock size:    130944 bytes
> [    0.770000] UBI: smallest flash I/O unit:    1
> [    0.780000] UBI: VID header offset:          64 (aligned 64)
> [    0.780000] UBI: data offset:                128
> [    0.830000] UBI: attached mtd1 to ubi0
> [    0.840000] UBI: MTD device name:            "root_rw"
> [    0.840000] UBI: MTD device size:            60 MiB
> [    0.850000] UBI: number of good PEBs:        480
> [    0.850000] UBI: number of bad PEBs:         0
> [    0.860000] UBI: max. allowed volumes:       128
> [    0.860000] UBI: wear-leveling threshold:    4096
> [    0.870000] UBI: number of internal volumes: 1
> [    0.870000] UBI: number of user volumes:     1
> [    0.870000] UBI: available PEBs:             0
> [    0.880000] UBI: total number of reserved PEBs: 480
> [    0.880000] UBI: number of PEBs reserved for bad PEB handling: 0
> [    0.890000] UBI: max/mean erase counter: 1/0
> ...
> [    0.900000] UBI: background thread "ubi_bgt0d" started, PID 284
> ...
> [    1.010000] UBIFS error (pid 1): validate_sb: min. I/O unit
> mismatch: 64 in superblock, 8 real

Looks like a bug in mkfs.ubifs. I'll look at this. But could you please
reproduce this on mtdram? mtdram is a test module which emulates NOR
flash.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list