From: Artem Bityutskiy <dedekind1@gmail.com>
To: dballman <pnetrisk@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBIFS bad superblock error
Date: Tue, 02 Feb 2010 18:46:05 +0200 [thread overview]
Message-ID: <1265129165.2790.9.camel@localhost> (raw)
In-Reply-To: <30e5226d1001200051o5cd62e18p7020e6bc8a734032@mail.gmail.com>
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 (Артём Битюцкий)
prev parent reply other threads:[~2010-02-02 16:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1265129165.2790.9.camel@localhost \
--to=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=pnetrisk@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox