* UBIFS bad superblock error
@ 2010-01-20 8:51 dballman
2010-02-02 6:33 ` Artem Bityutskiy
2010-02-02 16:46 ` Artem Bityutskiy
0 siblings, 2 replies; 3+ messages in thread
From: dballman @ 2010-01-20 8:51 UTC (permalink / raw)
To: linux-mtd
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
[ 1.020000] UBIFS error (pid 1): validate_sb: bad superblock, error 1
[ 1.030000] List of all partitions:
[ 1.030000] 1f00 4096 mtdblock0 driver: physmap-flash
[ 1.040000] 1f01 61440 mtdblock1 driver: physmap-flash
[ 1.040000] No filesystem could mount root, tried: ubifs
[ 1.050000] Kernel panic - not syncing: VFS: Unable to mount root
fs on unknown-block(0,0)
I have tried different -m parameter options to change the min I/O unit
size but nothing works. I don't know what the error might be, any clue
about that?
Thanks in advance
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: UBIFS bad superblock error
2010-01-20 8:51 UBIFS bad superblock error dballman
@ 2010-02-02 6:33 ` Artem Bityutskiy
2010-02-02 16:46 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2010-02-02 6:33 UTC (permalink / raw)
To: dballman; +Cc: linux-mtd
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 (Артём Битюцкий)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: UBIFS bad superblock error
2010-01-20 8:51 UBIFS bad superblock error dballman
2010-02-02 6:33 ` Artem Bityutskiy
@ 2010-02-02 16:46 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2010-02-02 16:46 UTC (permalink / raw)
To: dballman; +Cc: linux-mtd
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)
Strange. I have just tried to reproduce this on mtdram and cannot.
May be endiannes issues? Is your target platform big-endian?
If you take a look at the 'validate_sb()', you'll see it dumps the
superblock. I'd like to see this dump. You can find instructions here:
http://www.linux-mtd.infradead.org/doc/ubifs.html#L_how_send_bugreport
Here is what I did to test:
[dedekind@eru tmp]$ pwd
/home/dedekind/tmp
[dedekind@eru tmp]$ ls
_install ubinize.ini
[dedekind@eru tmp]$ ls _install/
bin
[dedekind@eru tmp]$ mkfs.ubifs -U -x favor_lzo -m 1 -e 130944 -c 100 -r _install/ -obusybox-ubifs.img
[dedekind@eru tmp]$ ubinize -o busybox-ubiimg.bin -p 128KiB -m 1 ubinize.ini
[dedekind@eru tmp]$ sudo modprobe mtdram total_size=65536
[dedekind@eru tmp]$ sudo dd if=busybox-ubiimg.bin of=/dev/mtd0
7680+0 records in
7680+0 records out
3932160 bytes (3.9 MB) copied, 0.0120106 s, 327 MB/s
[dedekind@eru tmp]$ sudo modprobe ubi mtd=0
[dedekind@eru tmp]$ cat /proc/mtd
dev: size erasesize name
mtd0: 04000000 00020000 "mtdram test device"
[dedekind@eru tmp]$ ubinfo -a
UBI version: 1
Count of UBI devices: 1
UBI control device major/minor: 10:59
Present UBI devices: ubi0
ubi0:
Volumes count: 1
Logical eraseblock size: 130944
Total amount of logical eraseblocks: 512 (67043328 bytes, 63.9 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes 128
Count of bad physical eraseblocks: 0
Count of reserved physical eraseblocks: 0
Current maximum erase counter value: 1
Minimum input/output unit size: 1 bytes
Character device major/minor: 251:0
Present volumes: 0
Volume ID: 0 (on ubi0)
Type: dynamic
Alignment: 1
Size: 508 LEBs (66519552 bytes, 63.4 MiB)
State: OK
Name: rootfs
Character device major/minor: 251:1
[dedekind@eru tmp]$ sudo mount -t ubifs ubi0:rootfs /mnt/ubifs/
[dedekind@eru tmp]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 51403396 1629960 47162236 4% /
tmpfs 8132484 160 8132324 1% /dev/shm
/dev/sda5 73560060 38458804 31364540 56% /home
ubi0:rootfs 9952 1836 8116 19% /mnt/ubifs
[dedekind@eru tmp]$ ls /mnt/ubifs/
bin
[dedekind@eru tmp]$
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-02-02 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-20 8:51 UBIFS bad superblock error dballman
2010-02-02 6:33 ` Artem Bityutskiy
2010-02-02 16:46 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox