linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* mount ubi volume fails: No such device
@ 2011-01-31 10:35 Lars Michael
  2011-02-06 14:19 ` Artem Bityutskiy
  0 siblings, 1 reply; 18+ messages in thread
From: Lars Michael @ 2011-01-31 10:35 UTC (permalink / raw)
  To: linux-mtd

Hi,

I am trying to mount an UBI volume, but it fails:

# mount -t ubifs ubi0_0 /mnt/ubi
mount: mounting ubi0_0 on /mnt/ubi failed: No such device
 
Using mkfs.ubifs and ubinize I have prepared an image containing three volumes. On the target I have used ubiformat to flash the image and ubiattach to attach to mtd1.

Target kernel: 2.6.29, platform m68k (mcf54418). The UBI tools on the host are built from git://git.infradead.org/mtd-utils.git.

Everything looks fine to me, see below, but how do I mount a volume? I have tried various ways to refer to the device (like ubi0:datafs, ubi0_0) without luck.

Thanks for any help!

[root@M54418TWR /]# ls -l /dev/ubi*

crw-rw---- 1 root root 252,  0 Nov 24 17:54 /dev/ubi0
crw-rw---- 1 root root 252,  1 Nov 24 17:54 /dev/ubi0_0
crw-rw---- 1 root root 252,  2 Nov 24 17:54 /dev/ubi0_1
crw-rw---- 1 root root 252,  3 Nov 24 17:54 /dev/ubi0_2
crw-rw---- 1 root root  10, 63 Nov 24 17:31 /dev/ubi_ctrl
 
[root@M54418TWR /]# ubinfo -a
UBI version:                    1
Count of UBI devices:           1
UBI control device major/minor: 10:63
Present UBI devices:            ubi0
 
ubi0:
Volumes count:                           3
Logical eraseblock size:                 126976
Total amount of logical eraseblocks:     2036 (258523136 bytes, 246.5 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       4
Count of reserved physical eraseblocks:  20
Current maximum erase counter value:     5
Minimum input/output unit size:          2048 bytes
Character device major/minor:            252:0
Present volumes:                         0, 1, 2
 
Volume ID:   0 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        1058 LEBs (134340608 bytes, 128.1 MiB)
State:       OK
Name:        rootfs
Character device major/minor: 252:1
-----------------------------------
Volume ID:   1 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        133 LEBs (16887808 bytes, 16.1 MiB)
State:       OK
Name:        progfs
Character device major/minor: 252:2
-----------------------------------
Volume ID:   2 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        821 LEBs (104247296 bytes, 99.4 MiB)
State:       OK
Name:        datafs
Character device major/minor: 252:3
 





^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: mount ubi volume fails: No such device
  2011-01-31 10:35 mount ubi volume fails: No such device Lars Michael
@ 2011-02-06 14:19 ` Artem Bityutskiy
  0 siblings, 0 replies; 18+ messages in thread
From: Artem Bityutskiy @ 2011-02-06 14:19 UTC (permalink / raw)
  To: Lars Michael; +Cc: linux-mtd

On Mon, 2011-01-31 at 02:35 -0800, Lars Michael wrote:
> Hi,
> 
> I am trying to mount an UBI volume, but it fails:
> 
> # mount -t ubifs ubi0_0 /mnt/ubi
> mount: mounting ubi0_0 on /mnt/ubi failed: No such device
>  
> Using mkfs.ubifs and ubinize I have prepared an image containing three
> volumes. On the target I have used ubiformat to flash the image and
> ubiattach to attach to mtd1.
> 
> Target kernel: 2.6.29, platform m68k (mcf54418). The UBI tools on the
> host are built from git://git.infradead.org/mtd-utils.git.
> 
> Everything looks fine to me, see below, but how do I mount a volume? I
> have tried various ways to refer to the device (like ubi0:datafs,
> ubi0_0) without luck.
> 
> Thanks for any help!

Do you have ubifs in /proc/filesystems?

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* mount ubi volume fails: No such device
@ 2011-02-07 15:05 Lars Michael
  2011-02-07 15:27 ` Artem Bityutskiy
  0 siblings, 1 reply; 18+ messages in thread
From: Lars Michael @ 2011-02-07 15:05 UTC (permalink / raw)
  To: linux-mtd

> On Mon, 2011-01-31 at 02:35 -0800, Lars Michael wrote:
> > Hi,
> >
> > I am trying to mount an UBI volume, but it fails:
> >
> > # mount -t ubifs ubi0_0 /mnt/ubi
> > mount: mounting ubi0_0 on /mnt/ubi failed: No such device
> >
> > Using mkfs.ubifs and ubinize I have prepared an image containing 
> > three volumes. On the target I have used ubiformat to flash the 
> > image and ubiattach to attach to mtd1.
> >
> > Target kernel: 2.6.29, platform m68k (mcf54418). The UBI tools on 
> > the host are built from git://git.infradead.org/mtd-utils.git.
> >
> > Everything looks fine to me, see below, but how do I mount a volume? 
> > I have tried various ways to refer to the device (like ubi0:datafs,
> > ubi0_0) without luck.
> >
> > Thanks for any help!
> 
> Do you have ubifs in /proc/filesystems?
> 

Well, no! UBIFS is included in the kernel, why doesn't it show up?
Now I changed it to a kernel object and now it appears in proc/filesystems after running insmod.

Next I try to attach again. But now other errors occur, see below:

[root@M54418TWR /]# ubiattach /dev/ubi_ctrl -m 1
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: volume 2 ("datafs") re-sized from 133 to 821 LEBs
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "ubi"
UBI: MTD device size:            255 MiB
UBI: number of good PEBs:        2036
UBI: number of bad PEBs:         4
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     3
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 2036
UBI: number of PEBs reserved for bad PEB handling: 20
UBI: max/mean erase counter: 6/2
UBI: background thread "ubi_bgt0d" started, PID 642 UBI device number 0, total 2036 LEBs (258523136 bytes, 246.5 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB) [root@M54418TWR /]# UBI: scrubbed PEB 9, data moved to PEB 2035
UBI: scrubbed PEB 10, data moved to PEB 1963
UBI: scrubbed PEB 13, data moved to PEB 1767 ...
UBI: scrubbed PEB 860, data moved to PEB 1098
UBI: scrubbed PEB 863, data moved to PEB 1097 UBI warning: ubi_eba_copy_leb: read data back from PEB 1092 and it is different UBI error: wear_leveling_worker: error -22 while moving PEB 868 to PEB 1092 UBI warning: ubi_ro_mode: switch to read-only mode UBI error: do_work: work failed with error code -22 UBI error: ubi_thread: ubi_bgt0d: work failed with error code -22

Regards,
- Lars Michael





^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: mount ubi volume fails: No such device
  2011-02-07 15:05 Lars Michael
@ 2011-02-07 15:27 ` Artem Bityutskiy
  0 siblings, 0 replies; 18+ messages in thread
From: Artem Bityutskiy @ 2011-02-07 15:27 UTC (permalink / raw)
  To: Lars Michael; +Cc: linux-mtd

On Mon, 2011-02-07 at 07:05 -0800, Lars Michael wrote:
> UBI: scrubbed PEB 863, data moved to PEB 1097 UBI warning: ubi_eba_copy_leb: read data back from PEB 1092 and it is different UBI error: wear_leveling_worker: error -22 while moving PEB 868 to PEB 1092 UBI warning: ubi_ro_mode: switch to read-only mode UBI error: do_work: work failed with error code -22 UBI error: ubi_thread: ubi_bgt0d: work failed with error code -22

It says you that it wrote some date, then read it back, compared, and
the data did not match. You need to start with validating your falash
drivers - use mtd tests:

http://www.linux-mtd.infradead.org/doc/general.html#L_mtd_tests

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* mount ubi volume fails: No such device
@ 2011-02-09  8:32 Lars Michael
  2011-02-11 14:28 ` Artem Bityutskiy
  0 siblings, 1 reply; 18+ messages in thread
From: Lars Michael @ 2011-02-09  8:32 UTC (permalink / raw)
  To: linux-mtd

> On Mon, 2011-02-07 at 07:05 -0800, Lars Michael wrote:
> > UBI: scrubbed PEB 863, data moved to PEB 1097 UBI warning:
> ubi_eba_copy_leb: read data back from PEB 1092 and it is different UBI
> error: wear_leveling_worker: error -22 while moving PEB 868 to PEB 1092
> UBI warning: ubi_ro_mode: switch to read-only mode UBI error: do_work:
> work failed with error code -22 UBI error: ubi_thread: ubi_bgt0d: work
> failed with error code -22
> 
> It says you that it wrote some date, then read it back, compared, and
> the data did not match. You need to start with validating your falash
> drivers - use mtd tests:
> 
> http://www.linux-mtd.infradead.org/doc/general.html#L_mtd_tests
> 

The speedtest, stresstest, readtest, pagetest ran ok, but showing 1 bad eraseblock. I guess that is acceptable?

The oobtest and subpagetest found 3 errors, see below. Does it explain
my initial problem?

=================================================
mtd_oobtest: MTD device: 0
mtd_oobtest: MTD device size 1048576, eraseblock size 131072, page size 2048, count of eraseblocks 8, pages per eraseblock 64, OOB size 64
mtd_oobtest: scanning for bad eraseblocks
mtd_oobtest: block 0 is bad
mtd_oobtest: scanned 8 eraseblocks, 1 are bad
mtd_oobtest: test 1 of 5
mtd_oobtest: erasing whole device
mtd_oobtest: erased 8 eraseblocks
mtd_oobtest: writing OOBs of whole device
mtd_oobtest: written 8 eraseblocks
mtd_oobtest: verifying all eraseblocks
mtd_oobtest: error: verify failed at 0xa0000
mtd_oobtest: verified 8 eraseblocks
mtd_oobtest: test 2 of 5
mtd_oobtest: erasing whole device
mtd_oobtest: erased 8 eraseblocks
mtd_oobtest: writing OOBs of whole device
mtd_oobtest: written 8 eraseblocks
mtd_oobtest: verifying all eraseblocks
mtd_oobtest: verified 8 eraseblocks
mtd_oobtest: test 3 of 5
mtd_oobtest: erasing whole device
mtd_oobtest: erased 8 eraseblocks
mtd_oobtest: writing OOBs of whole device
mtd_oobtest: written 8 eraseblocks
mtd_oobtest: verifying all eraseblocks
mtd_oobtest: verified 8 eraseblocks
mtd_oobtest: test 4 of 5
mtd_oobtest: erasing whole device
mtd_oobtest: erased 8 eraseblocks
mtd_oobtest: attempting to start write past end of OOB
mtd_oobtest: an error is expected...
mtd_oobtest: error occurred as expected
mtd_oobtest: attempting to start read past end of OOB
mtd_oobtest: an error is expected...
mtd_oobtest: error occurred as expected
mtd_oobtest: attempting to write past end of device
mtd_oobtest: an error is expected...
mtd_oobtest: error occurred as expected
mtd_oobtest: attempting to read past end of device
mtd_oobtest: an error is expected...
mtd_oobtest: error: read past end of device
mtd_oobtest: attempting to write past end of device
mtd_oobtest: an error is expected...
mtd_oobtest: error occurred as expected
mtd_oobtest: attempting to read past end of device
mtd_oobtest: an error is expected...
mtd_oobtest: error: read past end of device
mtd_oobtest: test 5 of 5
mtd_oobtest: erasing whole device
mtd_oobtest: erased 8 eraseblocks
mtd_oobtest: writing OOBs of whole device
mtd_oobtest: written 7 eraseblocks
mtd_oobtest: verifying all eraseblocks
mtd_oobtest: verified 7 eraseblocks
mtd_oobtest: finished with 3 errors
=================================================
=================================================
mtd_subpagetest: MTD device: 0
mtd_subpagetest: MTD device size 1048576, eraseblock size 131072, page size 2048, subpage size 2048, count of eraseblocks 0, pages per eraseblock 0, OOB size 64
mtd_subpagetest: scanning for bad eraseblocks
mtd_subpagetest: block 0 is bad
mtd_subpagetest: scanned 8 eraseblocks, 1 are bad
mtd_subpagetest: erasing whole device
mtd_subpagetest: erased 8 eraseblocks
mtd_subpagetest: writing whole device
mtd_subpagetest: written 8 eraseblocks
mtd_subpagetest: verifying all eraseblocks
mtd_subpagetest: error: verify failed at 0xa0000
mtd_subpagetest: ------------- written----------------
290a823d1a832f294f3a152962dc06ad94bbe2a0556a0c65921a9092c1b7106f
<cut>
0d4441159c41f58ff943fe9fc93847c9f6d46b283a2b27736d1381b18f37b4bc
mtd_subpagetest: -------------------------------------
mtd_subpagetest: verified 8 eraseblocks
mtd_subpagetest: erasing whole device
mtd_subpagetest: erased 8 eraseblocks
mtd_subpagetest: verifying all eraseblocks for 0xff
mtd_subpagetest: verified 8 eraseblocks
mtd_subpagetest: writing whole device
mtd_subpagetest: written 8 eraseblocks
mtd_subpagetest: verifying all eraseblocks
mtd_subpagetest: error: verify failed at 0x40000
mtd_subpagetest: error: verify failed at 0xc0000
mtd_subpagetest: verified 8 eraseblocks
mtd_subpagetest: erasing whole device
mtd_subpagetest: erased 8 eraseblocks
mtd_subpagetest: verifying all eraseblocks for 0xff
mtd_subpagetest: verified 8 eraseblocks
mtd_subpagetest: finished with 3 errors
=================================================





^ permalink raw reply	[flat|nested] 18+ messages in thread

* mount ubi volume fails: No such device
@ 2011-02-09 12:34 Lars Michael
  2011-02-11 14:32 ` Artem Bityutskiy
  0 siblings, 1 reply; 18+ messages in thread
From: Lars Michael @ 2011-02-09 12:34 UTC (permalink / raw)
  To: linux-mtd

> On Mon, 2011-02-07 at 07:05 -0800, Lars Michael wrote:
> > UBI: scrubbed PEB 863, data moved to PEB 1097 UBI warning:
> ubi_eba_copy_leb: read data back from PEB 1092 and it is different UBI
> error: wear_leveling_worker: error -22 while moving PEB 868 to PEB 1092
> UBI warning: ubi_ro_mode: switch to read-only mode UBI error: do_work:
> work failed with error code -22 UBI error: ubi_thread: ubi_bgt0d: work
> failed with error code -22
> 
> It says you that it wrote some date, then read it back, compared, and
> the data did not match. You need to start with validating your falash
> drivers - use mtd tests:
> 
> http://www.linux-mtd.infradead.org/doc/general.html#L_mtd_tests
> 

I formatted and wrote the image again. ubiattach _sometimes_ completes without the error code -22. In this case the mount went ok. But mount sometimes fails completely (structure needs cleaning), other times errors are reported but successfully recovered. So it seems to work, but no in
a reliable way. Any suggestions on how to improve it? My kernel is 2.6.29 so perhaps some patches are needed?

For example:

[root@M54418TWR /]# mount -t ubifs ubi0:rootfs /mnt/ubi_rootfs
UBIFS error (pid 661): ubifs_scan: garbage
UBIFS error (pid 661): ubifs_scanned_corruption: corrupted data at LEB 2:8192
UBIFS error (pid 661): ubifs_scanned_corruption: first 4096 bytes from LEB 2:8192
UBIFS error (pid 661): ubifs_scan: LEB 2 scanning failed
UBIFS error (pid 661): ubifs_scan: corrupt empty space at LEB 5:69632
UBIFS error (pid 661): ubifs_scanned_corruption: corrupted data at LEB 5:69632
UBIFS error (pid 661): ubifs_scanned_corruption: first 4096 bytes from LEB 5:69632
UBIFS error (pid 661): ubifs_scan: LEB 5 scanning failed
mount: mounting ubi0:rootfs on /mnt/ubi_rootfs failed: Structure needs cleaning

or:

mount -t ubifs ubi0:datafs /mnt/udatafs
UBIFS error (pid 670): ubifs_scan: garbage
UBIFS error (pid 670): ubifs_scanned_corruption: corrupted data at LEB 2:4096
UBIFS error (pid 670): ubifs_scanned_corruption: first 4096 bytes from LEB 2:4096
UBIFS error (pid 670): ubifs_scan: LEB 2 scanning failed
UBIFS: recovery needed
UBIFS error (pid 670): ubifs_scan: garbage
UBIFS error (pid 670): ubifs_scanned_corruption: corrupted data at LEB 4:0
UBIFS error (pid 670): ubifs_scanned_corruption: first 4096 bytes from LEB 4:0
UBIFS error (pid 670): ubifs_scan: LEB 4 scanning failed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 2, name "datafs"
UBIFS: file system size:   4952064 bytes (4836 KiB, 4 MiB, 39 LEBs)
UBIFS: journal size:       1142785 bytes (1116 KiB, 1 MiB, 9 LEBs)
UBIFS: media format:       4 (latest is 4)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  0 bytes (0 KiB)

Regards,
- Lars




     

^ permalink raw reply	[flat|nested] 18+ messages in thread

* mount ubi volume fails: No such device
       [not found] <9186EF1D8AB86E40B9C8009D36864D0403CA4342@dhreinsvxb03.messaging.danaherad.com>
@ 2011-02-11 14:21 ` Lars Michael
  2011-02-11 14:35   ` Artem Bityutskiy
  0 siblings, 1 reply; 18+ messages in thread
From: Lars Michael @ 2011-02-11 14:21 UTC (permalink / raw)
  To: linux-mtd

> > On Mon, 2011-02-07 at 07:05 -0800, Lars Michael
> wrote:
> > > UBI: scrubbed PEB 863, data moved to PEB 1097 UBI
> warning:
> > ubi_eba_copy_leb: read data back from PEB 1092 and it
> is different UBI
> > error: wear_leveling_worker: error -22 while moving
> PEB 868 to PEB
> 1092
> > UBI warning: ubi_ro_mode: switch to read-only mode UBI
> error: do_work:
> > work failed with error code -22 UBI error: ubi_thread:
> ubi_bgt0d: work
> > failed with error code -22
> > 
> > It says you that it wrote some date, then read it
> back, compared, and
> > the data did not match. You need to start with
> validating your falash
> > drivers - use mtd tests:
> > 
> > http://www.linux-mtd.infradead.org/doc/general.html#L_mtd_tests
> > 
> 
> I formatted and wrote the image again. ubiattach
> _sometimes_ completes
> without the error code -22. In this case the mount went ok.
> But mount
> sometimes fails completely (structure needs cleaning),
> other times
> errors are reported but successfully recovered. So it seems
> to work, but
> no in
> a reliable way. Any suggestions on how to improve it? My
> kernel is
> 2.6.29 so perhaps some patches are needed?
> 

So I got 167 patches from the ubifs 2.6.29 back port tree, some of them
looking very relevant. I did manage to format, attach and mount once, but it appears very unstable reporting more and more errors, like:

UBI warning: process_eb: valid VID header but corrupted EC header at PEB 959

UBI error: check_corruption: PEB 1065 contains corrupted VID header, and the data does not contain all 0xFF, this may be a non-UBI PEB or a severe VID header corruption which requires manual inspection

I will make a new post with more details, using another mail client that dont screw the header info.




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: mount ubi volume fails: No such device
  2011-02-09  8:32 Lars Michael
@ 2011-02-11 14:28 ` Artem Bityutskiy
  2011-02-14  8:49   ` Lars Michael
  0 siblings, 1 reply; 18+ messages in thread
From: Artem Bityutskiy @ 2011-02-11 14:28 UTC (permalink / raw)
  To: Lars Michael; +Cc: linux-mtd

On Wed, 2011-02-09 at 00:32 -0800, Lars Michael wrote:
> > On Mon, 2011-02-07 at 07:05 -0800, Lars Michael wrote:
> > > UBI: scrubbed PEB 863, data moved to PEB 1097 UBI warning:
> > ubi_eba_copy_leb: read data back from PEB 1092 and it is different UBI
> > error: wear_leveling_worker: error -22 while moving PEB 868 to PEB 1092
> > UBI warning: ubi_ro_mode: switch to read-only mode UBI error: do_work:
> > work failed with error code -22 UBI error: ubi_thread: ubi_bgt0d: work
> > failed with error code -22
> > 
> > It says you that it wrote some date, then read it back, compared, and
> > the data did not match. You need to start with validating your falash
> > drivers - use mtd tests:
> > 
> > http://www.linux-mtd.infradead.org/doc/general.html#L_mtd_tests
> > 
> 
> The speedtest, stresstest, readtest, pagetest ran ok, but showing 1
> bad eraseblock. I guess that is acceptable?

Yes.

> The oobtest and subpagetest found 3 errors, see below. Does it explain
> my initial problem?

Yes. You cannot go forward with UBIFS before you have fixed those.
Esepcially subpage test is relevant to you, you really have to have it
fixed, or you can just ask UBIFS to not use sub-pages and see how it
behaves, but this is less optimal.

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: mount ubi volume fails: No such device
  2011-02-09 12:34 Lars Michael
@ 2011-02-11 14:32 ` Artem Bityutskiy
  0 siblings, 0 replies; 18+ messages in thread
From: Artem Bityutskiy @ 2011-02-11 14:32 UTC (permalink / raw)
  To: Lars Michael; +Cc: linux-mtd

On Wed, 2011-02-09 at 04:34 -0800, Lars Michael wrote:
> I formatted and wrote the image again. ubiattach _sometimes_ completes
> without the error code -22. In this case the mount went ok. But mount
> sometimes fails completely (structure needs cleaning), other times
> errors are reported but successfully recovered. So it seems to work,
> but no in
> a reliable way. Any suggestions on how to improve it? My kernel is
> 2.6.29 so perhaps some patches are needed?

You really need to make the subpage test work. You can ask UBI to not
use sub-pages using the 'vid_hdr_offs' parameter of the 'ubi.ko' module.
I cannot tell you the exact value because you did not provide enough
information about your flash. Ideally, reporters should read these
instructions:

http://www.linux-mtd.infradead.org/doc/ubifs.html#L_how_send_bugreport
http://www.linux-mtd.infradead.org/doc/ubi.html#L_how_send_bugreport

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: mount ubi volume fails: No such device
  2011-02-11 14:21 ` Lars Michael
@ 2011-02-11 14:35   ` Artem Bityutskiy
  2011-02-11 14:57     ` Artem Bityutskiy
  0 siblings, 1 reply; 18+ messages in thread
From: Artem Bityutskiy @ 2011-02-11 14:35 UTC (permalink / raw)
  To: Lars Michael; +Cc: linux-mtd

On Fri, 2011-02-11 at 06:21 -0800, Lars Michael wrote:
> So I got 167 patches from the ubifs 2.6.29 back port tree, some of
> them
> looking very relevant. I did manage to format, attach and mount once,
> but it appears very unstable reporting more and more errors, like:

You definitely have to take patches from the back-port tree.

But, please, first make sure your subpage problem disappears by either
fixing your driver or by asking UBI to not use sub-pages.

Also, there is one critical patch missing in the back-port trees which I
have to put there, I'll do this shortly.

And Ideally, I need to back-port mtd tests fixes to back-port trees, but
I do not think I have time for that, you can try to do this yourself.

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: mount ubi volume fails: No such device
  2011-02-11 14:35   ` Artem Bityutskiy
@ 2011-02-11 14:57     ` Artem Bityutskiy
  0 siblings, 0 replies; 18+ messages in thread
From: Artem Bityutskiy @ 2011-02-11 14:57 UTC (permalink / raw)
  To: Lars Michael; +Cc: linux-mtd

On Fri, 2011-02-11 at 16:35 +0200, Artem Bityutskiy wrote:
> Also, there is one critical patch missing in the back-port trees which I
> have to put there, I'll do this shortly.

Sorry, there is actually no need for this.

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* mount ubi volume fails: No such device
  2011-02-11 14:28 ` Artem Bityutskiy
@ 2011-02-14  8:49   ` Lars Michael
  2011-02-14 11:01     ` Artem Bityutskiy
  0 siblings, 1 reply; 18+ messages in thread
From: Lars Michael @ 2011-02-14  8:49 UTC (permalink / raw)
  To: linux-mtd

--- On Fri, 11/2/11, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> 
> > The oobtest and subpagetest found 3 errors, see below.
> Does it explain
> > my initial problem?
> 
> Yes. You cannot go forward with UBIFS before you have fixed
> those.
> Esepcially subpage test is relevant to you, you really have
> to have it
> fixed, or you can just ask UBIFS to not use sub-pages and
> see how it
> behaves, but this is less optimal.
> 

I am running on the TWR-MCF5441X eval. board, which has a 256MB NAND device: MT29F2G16AADWP. From the data sheet it should have no sub pages, and this matches what UBI reports:

UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096

# cat proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 0ff00000 00020000 "ubi"
mtd2: 00100000 00010000 "at26df081a"

I used ubiformat without the -s or -O:
ubiformat /dev/mtd1 -f /root/ubi.img

I tried with -O 2048, but still failed. I guess forcing the VID header to offset 2048 is anyway correct for this device? Are there another way to turn off sub-page in UBIFS? 

Here is how i made the UBI image:
./mkfs.ubifs -m 2048 -e 126976 -c 874 -v -Q -r ./rootfs rootfs.img
./mkfs.ubifs -m 2048 -e 126976 -c 36 -v -Q -r ./progfs progfs.img
./mkfs.ubifs -m 2048 -e 126976 -c 49 -v -Q -r ./datafs datafs.img
ubinize -o ubi.img -p 128KiB -m 2048 -v ubi-config.ini

Now i rebuild the kernel with additional debug options turned on. Will run subpage test again and submit report on that.

Thanks and regards,
- Lars 





^ permalink raw reply	[flat|nested] 18+ messages in thread

* mount ubi volume fails: No such device
@ 2011-02-14 10:22 Lars Michael
  0 siblings, 0 replies; 18+ messages in thread
From: Lars Michael @ 2011-02-14 10:22 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 1838 bytes --]

--- On Fri, 11/2/11, Artem Bityutskiy <dedekind1@gmail.com> wrote:

> From: Artem Bityutskiy <dedekind1@gmail.com>
> Subject: Re: mount ubi volume fails: No such device
> To: "Lars Michael" <lars.michael@yahoo.com>
> Cc: linux-mtd@lists.infradead.org
> Date: Friday, 11 February, 2011, 15:35
> On Fri, 2011-02-11 at 06:21 -0800,
> Lars Michael wrote:
> > So I got 167 patches from the ubifs 2.6.29 back port
> tree, some of
> > them
> > looking very relevant. I did manage to format, attach
> and mount once,
> > but it appears very unstable reporting more and more
> errors, like:
> 
> You definitely have to take patches from the back-port
> tree.
> 
> But, please, first make sure your subpage problem
> disappears by either
> fixing your driver or by asking UBI to not use sub-pages.
> 

Kernel is rebuild with add. debug info for UBI. First I format the flash (without writing an image).

[root@M54418TWR /]# insmod ubifs.ko
[root@M54418TWR /]# ubiformat /dev/mtd1 -O 2048
ubiformat: mtd1 (NAND), size 267386880 bytes (255.0 MiB), 131072 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 2039 -- 100 % complete
ubiformat: 1937 eraseblocks have valid erase counter, mean value is 13
ubiformat: 99 corrupted erase counters
ubiformat: bad eraseblocks: 2036, 2037, 2038, 2039
ubiformat: formatting eraseblock 2039 -- 100 % complete

I notice the number of corrupted erase counters, is it too high? Sometimes I can format without getting these corrupted counters.

Running the mtd tests now shows two bad erase blocks and the subpage test returns a varying number of errors from 8 to ? I have attached the output from the mtd tests.

I hope I have included enough details, let me know if I can do other tests. 

Thanks and regards,
- Lars


      

[-- Attachment #2: 5441x-mtd-tests.txt --]
[-- Type: text/plain, Size: 9002 bytes --]

ubiformat /dev/mtd1 -O 2048
ubiformat: mtd1 (NAND), size 267386880 bytes (255.0 MiB), 131072 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
ubiformat: 1937 eraseblocks have valid erase counter, mean value is 13
ubiformat: 99 corrupted erase counters
ubiformat: bad eraseblocks: 2036, 2037, 2038, 2039


ubiformat /dev/mtd1 -O 2048
ubiformat: mtd1 (NAND), size 267386880 bytes (255.0 MiB), 131072 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
ubiformat: 2036 eraseblocks have valid erase counter, mean value is 15
ubiformat: bad eraseblocks: 2036, 2037, 2038, 2039



=================================================
mtd_speedtest: MTD device: 0
mtd_speedtest: MTD device size 1048576, eraseblock size 131072, page size 2048, count of eraseblocks 8, pages per eraseblock 64, OOB size 64
mtd_speedtest: scanning for bad eraseblocks
mtd_speedtest: block 0 is bad
mtd_speedtest: block 3 is bad
mtd_speedtest: scanned 8 eraseblocks, 2 are bad
mtd_speedtest: testing eraseblock write speed
mtd_speedtest: eraseblock write speed is 3240 KiB/s
mtd_speedtest: testing eraseblock read speed
mtd_speedtest: eraseblock read speed is 12000 KiB/s
mtd_speedtest: testing page write speed
mtd_speedtest: page write speed is 2876 KiB/s
mtd_speedtest: testing page read speed
mtd_speedtest: page read speed is 11462 KiB/s
mtd_speedtest: testing 2 page write speed
mtd_speedtest: 2 page write speed is 3109 KiB/s
mtd_speedtest: testing 2 page read speed
mtd_speedtest: 2 page read speed is 11636 KiB/s
mtd_speedtest: Testing erase speed
mtd_speedtest: erase speed is 128000 KiB/s
mtd_speedtest: finished

=================================================

mtd_readtest: MTD device: 0
mtd_readtest: MTD device size 1048576, eraseblock size 131072, page size 2048, count of eraseblocks 8, pages per eraseblock 64, OOB size 64
mtd_readtest: scanning for bad eraseblocks
mtd_readtest: block 0 is bad
mtd_readtest: block 3 is bad
mtd_readtest: scanned 8 eraseblocks, 2 are bad
mtd_readtest: testing page read
mtd_readtest: finished

=================================================

mtd_pagetest: MTD device: 0
mtd_pagetest: MTD device size 1048576, eraseblock size 131072, page size 2048, count of eraseblocks 8, pages per eraseblock 64, OOB size 64
mtd_pagetest: scanning for bad eraseblocks
mtd_pagetest: block 0 is bad
mtd_pagetest: block 3 is bad
mtd_pagetest: scanned 8 eraseblocks, 2 are bad
mtd_pagetest: erasing whole device
mtd_pagetest: erased 8 eraseblocks
mtd_pagetest: writing whole device
mtd_pagetest: written 8 eraseblocks
mtd_pagetest: verifying all eraseblocks
mtd_pagetest: error: verify failed at 0x20000
mtd_pagetest: error: verify failed at 0x3f800
mtd_pagetest: error: verify failed at 0x40000
mtd_pagetest: error: verify failed at 0x9f800
mtd_pagetest: error: verify failed at 0xa0000
mtd_pagetest: verified 8 eraseblocks
mtd_pagetest: crosstest
mtd_pagetest: reading page at 0x20000
mtd_pagetest: reading page at 0xff800
mtd_pagetest: reading page at 0x20000
mtd_pagetest: verifying pages read at 0x20000 match
mtd_pagetest: crosstest ok
mtd_pagetest: erasecrosstest
mtd_pagetest: erasing block 1
mtd_pagetest: writing 1st page of block 1
mtd_pagetest: reading 1st page of block 1
mtd_pagetest: verifying 1st page of block 1
mtd_pagetest: erasing block 1
mtd_pagetest: writing 1st page of block 1
mtd_pagetest: erasing block 7
mtd_pagetest: reading 1st page of block 1
mtd_pagetest: verifying 1st page of block 1
mtd_pagetest: erasecrosstest ok
mtd_pagetest: erasetest
mtd_pagetest: erasing block 1
mtd_pagetest: writing 1st page of block 1
mtd_pagetest: erasing block 1
mtd_pagetest: reading 1st page of block 1
mtd_pagetest: verifying 1st page of block 1 is all 0xff
mtd_pagetest: erasetest ok
mtd_pagetest: finished with 5 errors

=================================================

mtd_oobtest: MTD device: 0
mtd_oobtest: MTD device size 1048576, eraseblock size 131072, page size 2048, count of eraseblocks 8, pages per eraseblock 64, OOB size 64
mtd_oobtest: scanning for bad eraseblocks
mtd_oobtest: block 0 is bad
mtd_oobtest: block 3 is bad
mtd_oobtest: scanned 8 eraseblocks, 2 are bad
mtd_oobtest: test 1 of 5
mtd_oobtest: erasing whole device
mtd_oobtest: erased 8 eraseblocks
mtd_oobtest: writing OOBs of whole device
mtd_oobtest: written 8 eraseblocks
mtd_oobtest: verifying all eraseblocks
mtd_oobtest: verified 8 eraseblocks
mtd_oobtest: test 2 of 5
mtd_oobtest: erasing whole device
mtd_oobtest: erased 8 eraseblocks
mtd_oobtest: writing OOBs of whole device
mtd_oobtest: written 8 eraseblocks
mtd_oobtest: verifying all eraseblocks
mtd_oobtest: verified 8 eraseblocks
mtd_oobtest: test 3 of 5
mtd_oobtest: erasing whole device
mtd_oobtest: erased 8 eraseblocks
mtd_oobtest: writing OOBs of whole device
mtd_oobtest: written 8 eraseblocks
mtd_oobtest: verifying all eraseblocks
mtd_oobtest: verified 8 eraseblocks
mtd_oobtest: test 4 of 5
mtd_oobtest: erasing whole device
mtd_oobtest: erased 8 eraseblocks
mtd_oobtest: attempting to start write past end of OOB
mtd_oobtest: an error is expected...
mtd_oobtest: error occurred as expected
mtd_oobtest: attempting to start read past end of OOB
mtd_oobtest: an error is expected...
mtd_oobtest: error occurred as expected
mtd_oobtest: attempting to write past end of device
mtd_oobtest: an error is expected...
mtd_oobtest: error occurred as expected
mtd_oobtest: attempting to read past end of device
mtd_oobtest: an error is expected...
mtd_oobtest: error: read past end of device
mtd_oobtest: attempting to write past end of device
mtd_oobtest: an error is expected...
mtd_oobtest: error occurred as expected
mtd_oobtest: attempting to read past end of device
mtd_oobtest: an error is expected...
mtd_oobtest: error: read past end of device
mtd_oobtest: test 5 of 5
mtd_oobtest: erasing whole device
mtd_oobtest: erased 8 eraseblocks
mtd_oobtest: writing OOBs of whole device
mtd_oobtest: written 7 eraseblocks
mtd_oobtest: verifying all eraseblocks
mtd_oobtest: verified 7 eraseblocks
mtd_oobtest: finished with 2 errors
=================================================

================================================

mtd_subpagetest: MTD device: 0
mtd_subpagetest: MTD device size 1048576, eraseblock size 131072, page size 2048, subpage size 2048, count of eraseblocks 0, pages per eraseblock 0, OOB size 64
mtd_subpagetest: scanning for bad eraseblocks
mtd_subpagetest: block 0 is bad
mtd_subpagetest: block 3 is bad
mtd_subpagetest: scanned 8 eraseblocks, 2 are bad
mtd_subpagetest: erasing whole device
mtd_subpagetest: erased 8 eraseblocks
mtd_subpagetest: writing whole device
mtd_subpagetest: written 8 eraseblocks
mtd_subpagetest: verifying all eraseblocks
mtd_subpagetest: error: verify failed at 0xc0000
mtd_subpagetest: ------------- written----------------
290a823d1a832f294f3a152962dc06ad94bbe2a0556a0c65921a9092c1b7106f
adc2732d01ed4de697780d587e4ee961cdde8a3a2aba777319f242b2062f742b
118e39df9b42cb9494e89f9783a95234521252f2dfb34c8f437959bee0cbe8a3
<CUT>
0d4441159c41f58ff943fe9fc93847c9f6d46b283a2b27736d1381b18f37b4bc
mtd_subpagetest: -------------------------------------
mtd_subpagetest: verified 8 eraseblocks
mtd_subpagetest: erasing whole device
mtd_subpagetest: erased 8 eraseblocks
mtd_subpagetest: verifying all eraseblocks for 0xff
mtd_subpagetest: error: verify 0xff failed at 0x20000
mtd_subpagetest: error: verify 0xff failed at 0x22000
mtd_subpagetest: error: verify 0xff failed at 0x8a800
mtd_subpagetest: error: verify 0xff failed at 0x8b800
mtd_subpagetest: error: verify 0xff failed at 0x8d800
mtd_subpagetest: error: verify 0xff failed at 0x96000
mtd_subpagetest: error: verify 0xff failed at 0x97800
mtd_subpagetest: error: verify 0xff failed at 0xbf800
mtd_subpagetest: error: verify 0xff failed at 0xc4000
mtd_subpagetest: error: verify 0xff failed at 0xdd800
mtd_subpagetest: error: verify 0xff failed at 0xe0000
mtd_subpagetest: error: verify 0xff failed at 0xec000
mtd_subpagetest: error: verify 0xff failed at 0xec800
mtd_subpagetest: error: verify 0xff failed at 0xed800
mtd_subpagetest: error: verify 0xff failed at 0xf7800
mtd_subpagetest: verified 8 eraseblocks
mtd_subpagetest: writing whole device
mtd_subpagetest: written 8 eraseblocks
mtd_subpagetest: verifying all eraseblocks
mtd_subpagetest: error: verify failed at 0x20000
mtd_subpagetest: error: verify failed at 0x40000
mtd_subpagetest: error: verify failed at 0xa0000
mtd_subpagetest: error: verify failed at 0xe0000
mtd_subpagetest: verified 8 eraseblocks
mtd_subpagetest: erasing whole device
mtd_subpagetest: erased 8 eraseblocks
mtd_subpagetest: verifying all eraseblocks for 0xff
mtd_subpagetest: error: verify 0xff failed at 0x5d800
mtd_subpagetest: verified 8 eraseblocks
mtd_subpagetest: finished with 21 errors
=================================================

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: mount ubi volume fails: No such device
  2011-02-14  8:49   ` Lars Michael
@ 2011-02-14 11:01     ` Artem Bityutskiy
  2011-02-14 12:47       ` Lars Michael
  0 siblings, 1 reply; 18+ messages in thread
From: Artem Bityutskiy @ 2011-02-14 11:01 UTC (permalink / raw)
  To: Lars Michael; +Cc: linux-mtd

On Mon, 2011-02-14 at 00:49 -0800, Lars Michael wrote:
> Here is how i made the UBI image:
> ./mkfs.ubifs -m 2048 -e 126976 -c 874 -v -Q -r ./rootfs rootfs.img
> ./mkfs.ubifs -m 2048 -e 126976 -c 36 -v -Q -r ./progfs progfs.img
> ./mkfs.ubifs -m 2048 -e 126976 -c 49 -v -Q -r ./datafs datafs.img
> ubinize -o ubi.img -p 128KiB -m 2048 -v ubi-config.ini

You also need to give this parameter to UBI: 
vid_hdr_offs=2048

I.e., modprobe ubi mtd=1 vid_hdr_offs=2048

Or if UBI is compiled-in, boot with the following kernel argument:

ubi.vid_hdr_offs=2048

With this option UBI will not use sub-pages at all. I think it makes
sense for  you to try how it works this way.

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* mount ubi volume fails: No such device
  2011-02-14 11:01     ` Artem Bityutskiy
@ 2011-02-14 12:47       ` Lars Michael
  0 siblings, 0 replies; 18+ messages in thread
From: Lars Michael @ 2011-02-14 12:47 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd



--- On Mon, 14/2/11, Artem Bityutskiy <dedekind1@gmail.com> wrote:

> From: Artem Bityutskiy <dedekind1@gmail.com>
> Subject: Re: mount ubi volume fails: No such device
> To: "Lars Michael" <lh_post@yahoo.com>
> Cc: linux-mtd@lists.infradead.org
> Date: Monday, 14 February, 2011, 12:01
> On Mon, 2011-02-14 at 00:49 -0800,
> Lars Michael wrote:
> > Here is how i made the UBI image:
> > ./mkfs.ubifs -m 2048 -e 126976 -c 874 -v -Q -r
> ./rootfs rootfs.img
> > ./mkfs.ubifs -m 2048 -e 126976 -c 36 -v -Q -r ./progfs
> progfs.img
> > ./mkfs.ubifs -m 2048 -e 126976 -c 49 -v -Q -r ./datafs
> datafs.img
> > ubinize -o ubi.img -p 128KiB -m 2048 -v
> ubi-config.ini
> 
> You also need to give this parameter to UBI: 
> vid_hdr_offs=2048
> 
> I.e., modprobe ubi mtd=1 vid_hdr_offs=2048
> 
> Or if UBI is compiled-in, boot with the following kernel
> argument:
> 
> ubi.vid_hdr_offs=2048
> 
> With this option UBI will not use sub-pages at all. I think
> it makes
> sense for  you to try how it works this way.
> 

I believe this is the correct syntax:

[root@M54418TWR /]# insmod ubi mtd=1,2048
UBI error: ubi_init: UBI error: cannot initialize UBI, error -19
insmod: cannot insert '/lib/modules/2.6.29/kernel/drivers/mtd/ubi/ubi.ko': No such device

Unfortunately, booting Linux the NAND flash is now detected bad, so I do not have an mtd1! what is the best way to try to recover? I do not understand how the flash can suddenly become bad!

NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron NAND 256MiB 3,3V 16-bit)
Bad block table not found for chip 0
Bad block table not found for chip 0
Scanning device for bad blocks
Bad eraseblock 0 at 0x000000000000
Bad eraseblock 1 at 0x000000020000
Bad eraseblock 2 at 0x000000040000
Bad eraseblock 3 at 0x000000060000
Bad eraseblock 4 at 0x000000080000
Bad eraseblock 5 at 0x0000000a0000
Bad eraseblock 6 at 0x0000000c0000
<cut>
Bad eraseblock 2046 at 0x00000ffc0000
Bad eraseblock 2047 at 0x00000ffe0000
No space left to write bad block table
fsl_nfc: NAND Flash not found !
m25p80 spi1.1: at26df081a (1024 Kbytes)
Creating 1 MTD partitions on "Atmel at26df081a SPI Flash chip":
0x000000000000-0x000000100000 : "at26df081a"
DSPI: Coldfire master initialized
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

Thanks and regards,
- Lars 




^ permalink raw reply	[flat|nested] 18+ messages in thread

* mount ubi volume fails: No such device
@ 2011-02-18 10:57 Lars Michael
  2011-02-25 10:45 ` Artem Bityutskiy
  0 siblings, 1 reply; 18+ messages in thread
From: Lars Michael @ 2011-02-18 10:57 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd

--- On Mon, 14/2/11, Lars Michael <lh_post@yahoo.com> wrote:
> Unfortunately, booting Linux the NAND flash is now detected
> bad, so I do not have an mtd1! what is the best way to try
> to recover? I do not understand how the flash can suddenly
> become bad!
> 
> NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron
> NAND 256MiB 3,3V 16-bit)
> Bad block table not found for chip 0
> Bad block table not found for chip 0
> Scanning device for bad blocks
> Bad eraseblock 0 at 0x000000000000
> Bad eraseblock 1 at 0x000000020000
> Bad eraseblock 2 at 0x000000040000
> Bad eraseblock 3 at 0x000000060000
> Bad eraseblock 4 at 0x000000080000
> Bad eraseblock 5 at 0x0000000a0000
> Bad eraseblock 6 at 0x0000000c0000
> <cut>
> Bad eraseblock 2046 at 0x00000ffc0000
> Bad eraseblock 2047 at 0x00000ffe0000
> No space left to write bad block table
> fsl_nfc: NAND Flash not found !
> m25p80 spi1.1: at26df081a (1024 Kbytes)
> Creating 1 MTD partitions on "Atmel at26df081a SPI Flash
> chip":
> 0x000000000000-0x000000100000 : "at26df081a"
> DSPI: Coldfire master initialized
> ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> 

I try to diagnose the flash from U-Boot. When I e.g. try to read from the
flash I get:

NAND read: device 0 offset 0x1, size 0xfffffff
Skipping bad block 0x00000000
Skipping bad block 0x00020000
Skipping bad block 0x00040000
<cut>
Skipping bad block 0x0ffa0000
Skipping bad block 0x0ffc0000
Skipping bad block 0x0ffe0000
NAND read from offset 10000000 failed -22
 0 bytes read: ERROR
-> nand 

I am really stuck here, and don't know how to proceed. Is it normal that
the flash can suddenly go totally bad? At one moment in Linux the device
just had a few bad blocks and after a reboot, all went bad. I am really
worried about this issue!

Do I need to replace the device?

Any comments on this is appreciated.

Thanks and regards,
- Lars




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: mount ubi volume fails: No such device
  2011-02-18 10:57 Lars Michael
@ 2011-02-25 10:45 ` Artem Bityutskiy
  2011-02-28  8:49   ` Lars Michael
  0 siblings, 1 reply; 18+ messages in thread
From: Artem Bityutskiy @ 2011-02-25 10:45 UTC (permalink / raw)
  To: Lars Michael; +Cc: linux-mtd

On Fri, 2011-02-18 at 02:57 -0800, Lars Michael wrote:
> NAND read: device 0 offset 0x1, size 0xfffffff
> Skipping bad block 0x00000000
> Skipping bad block 0x00020000
> Skipping bad block 0x00040000
> <cut>
> Skipping bad block 0x0ffa0000
> Skipping bad block 0x0ffc0000
> Skipping bad block 0x0ffe0000
> NAND read from offset 10000000 failed -22
>  0 bytes read: ERROR
> -> nand 
> 
> I am really stuck here, and don't know how to proceed. Is it normal that
> the flash can suddenly go totally bad?

Most likely not. Probably this is due to a bug somewhere.      


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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: mount ubi volume fails: No such device
  2011-02-25 10:45 ` Artem Bityutskiy
@ 2011-02-28  8:49   ` Lars Michael
  0 siblings, 0 replies; 18+ messages in thread
From: Lars Michael @ 2011-02-28  8:49 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd



--- On Fri, 25/2/11, Artem Bityutskiy <dedekind1@gmail.com> wrote:

> From: Artem Bityutskiy <dedekind1@gmail.com>
> Subject: Re: mount ubi volume fails: No such device
> To: "Lars Michael" <lh_post@yahoo.com>
> Cc: linux-mtd@lists.infradead.org
> Date: Friday, 25 February, 2011, 11:45
> On Fri, 2011-02-18 at 02:57 -0800,
> Lars Michael wrote:
> > NAND read: device 0 offset 0x1, size 0xfffffff
> > Skipping bad block 0x00000000
> > Skipping bad block 0x00020000
> > Skipping bad block 0x00040000
> > <cut>
> > Skipping bad block 0x0ffa0000
> > Skipping bad block 0x0ffc0000
> > Skipping bad block 0x0ffe0000
> > NAND read from offset 10000000 failed -22
> >  0 bytes read: ERROR
> > -> nand 
> > 
> > I am really stuck here, and don't know how to proceed.
> Is it normal that
> > the flash can suddenly go totally bad?
> 
> Most likely not. Probably this is due to a bug
> somewhere.      
> 

Let us assume this is a software problem and that the NAND device is
ok. Note: I did not cycle the power during a flash operation, and I 
did not write (e.g. format or erase) the flash prior to it going bad.

Can the bbt somehow be corrupt, reporting all blocks bad even if they
are not?

Is the problem likely to be in the UBI layer or in the NAND driver
(I suspect the first) and how can I troubleshoot this?

Any help is appreciated,

- Lars




^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-02-28  8:49 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-31 10:35 mount ubi volume fails: No such device Lars Michael
2011-02-06 14:19 ` Artem Bityutskiy
  -- strict thread matches above, loose matches on Subject: below --
2011-02-07 15:05 Lars Michael
2011-02-07 15:27 ` Artem Bityutskiy
2011-02-09  8:32 Lars Michael
2011-02-11 14:28 ` Artem Bityutskiy
2011-02-14  8:49   ` Lars Michael
2011-02-14 11:01     ` Artem Bityutskiy
2011-02-14 12:47       ` Lars Michael
2011-02-09 12:34 Lars Michael
2011-02-11 14:32 ` Artem Bityutskiy
     [not found] <9186EF1D8AB86E40B9C8009D36864D0403CA4342@dhreinsvxb03.messaging.danaherad.com>
2011-02-11 14:21 ` Lars Michael
2011-02-11 14:35   ` Artem Bityutskiy
2011-02-11 14:57     ` Artem Bityutskiy
2011-02-14 10:22 Lars Michael
2011-02-18 10:57 Lars Michael
2011-02-25 10:45 ` Artem Bityutskiy
2011-02-28  8:49   ` Lars Michael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).