* nandsim LEB size mismatch
@ 2013-10-11 13:57 Simon Liddicott
2013-10-18 11:41 ` Simon Liddicott
0 siblings, 1 reply; 3+ messages in thread
From: Simon Liddicott @ 2013-10-11 13:57 UTC (permalink / raw)
To: linux-mtd
Hi
I've searched the archives and read the FAQ but not found anything
that matches my situation.
I am trying to read an image I think is made for an MT29F2G08ABAEA.
I have run the following:
$ sudo modprobe nandsim first_id_byte=0x2c second_id_byte=0xda \
third_id_byte=0x90 fourth_id_byte=0x95
$ sudo flash_erase /dev/mtd0 0 0
$ sudo modprobe ubi mtd=0
$ sudo ubimkvol /dev/ubi0 -N RFS -s $((0xA00000))
Volume ID 0, size 82 LEBs (10579968 bytes, 10.1 MiB), LEB size 129024
bytes (126.0 KiB), dynamic, name "RFS", alignment 1
$ sudo ubiupdatevol /dev/ubi0_0 RFS.bin
$ sudo mount /dev/ubi0_0 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/ubi0_0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
[1975256.515179] UBIFS error (pid 10309): validate_sb: LEB size
mismatch: 126976 in superblock, 129024 real
I think that nandsim provides the 'real' value for LEB size, and even
if the value is right - how can I read the data that expects a 124KiB
LEB size?
Any help appreciated.
Thanks in advance.
Simon.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: nandsim LEB size mismatch
2013-10-11 13:57 nandsim LEB size mismatch Simon Liddicott
@ 2013-10-18 11:41 ` Simon Liddicott
2014-02-05 16:10 ` Colton
0 siblings, 1 reply; 3+ messages in thread
From: Simon Liddicott @ 2013-10-18 11:41 UTC (permalink / raw)
To: linux-mtd
On 11 October 2013 14:57, Simon Liddicott <simon@liddicott.com> wrote:
> Hi
>
> I've searched the archives and read the FAQ but not found anything
> that matches my situation.
>
> I am trying to read an image I think is made for an MT29F2G08ABAEA.
>
> I have run the following:
>
> $ sudo modprobe nandsim first_id_byte=0x2c second_id_byte=0xda \
> third_id_byte=0x90 fourth_id_byte=0x95
> $ sudo flash_erase /dev/mtd0 0 0
> $ sudo modprobe ubi mtd=0
> $ sudo ubimkvol /dev/ubi0 -N RFS -s $((0xA00000))
>
> Volume ID 0, size 82 LEBs (10579968 bytes, 10.1 MiB), LEB size 129024
> bytes (126.0 KiB), dynamic, name "RFS", alignment 1
>
> $ sudo ubiupdatevol /dev/ubi0_0 RFS.bin
> $ sudo mount /dev/ubi0_0 /mnt
>
> mount: wrong fs type, bad option, bad superblock on /dev/ubi0_0,
> missing codepage or helper program, or other error
> In some cases useful info is found in syslog - try
> dmesg | tail or so
>
> [1975256.515179] UBIFS error (pid 10309): validate_sb: LEB size
> mismatch: 126976 in superblock, 129024 real
>
> I think that nandsim provides the 'real' value for LEB size, and even
> if the value is right - how can I read the data that expects a 124KiB
> LEB size?
>
> Any help appreciated.
>
> Thanks in advance.
>
> Simon.
I didn't get a reply, but have managed to find out how to do it.
The correct instructions should be:
$ sudo modprobe nandsim first_id_byte=0x2c second_id_byte=0xda \
third_id_byte=0x90 fourth_id_byte=0x95
$ sudo flash_erase /dev/mtd0 0 0
$ sudo ubiformat /dev/mtd0 -s 2048 -O 2048
$ sudo modprobe ubi
$ sudo ubiattach -m 0 -d 0 -O 2048
$ sudo ubimkvol /dev/ubi0 -N RFS -s $((0xA00000))
$ sudo ubiupdatevol /dev/ubi0_0 RFS.bin
$ sudo mount /dev/ubi0_0 /mnt
Success!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: nandsim LEB size mismatch
2013-10-18 11:41 ` Simon Liddicott
@ 2014-02-05 16:10 ` Colton
0 siblings, 0 replies; 3+ messages in thread
From: Colton @ 2014-02-05 16:10 UTC (permalink / raw)
To: linux-mtd
Thanks a lot Simon, this really helped me out. To anyone else who's doing
this, make sure that when you do the "ubimkvol" command you change 0xA00000
to a big enough filesize for your ubifs volume. I just looked at my filesize
and converted it to hex and used that.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-05 16:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-11 13:57 nandsim LEB size mismatch Simon Liddicott
2013-10-18 11:41 ` Simon Liddicott
2014-02-05 16:10 ` Colton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.