All of lore.kernel.org
 help / color / mirror / Atom feed
* UBIFS mounting error
@ 2009-03-09 21:56 Subramani Venkatesh
  2009-03-10  8:00 ` Adrian Hunter
  0 siblings, 1 reply; 2+ messages in thread
From: Subramani Venkatesh @ 2009-03-09 21:56 UTC (permalink / raw)
  To: linux-mtd

Hi
I am trying to mount UBIFS on NAND flash, I am quite often getting the
error below after rebooting.

UBIFS: recovery needed
UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
0:4096, written 0 bytes
UBI warning: ubi_eba_write_leb: failed to write 2048 bytes at offset 0
of LEB 0:4, PEB 0
UBI: try another PEB
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
1:2048, written 0 bytes
UBI warning: ubi_eba_write_leb: failed to write VID header to LEB 0:4, PEB 1
UBI: try another PEB
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
2:2048, written 0 bytes
UBI warning: ubi_eba_write_leb: failed to write VID header to LEB 0:4, PEB 2
UBI: try another PEB
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
11:2048, written 0 bytes
UBI warning: ubi_eba_write_leb: failed to write VID header to LEB 0:4, PEB 11
UBI warning: ubi_ro_mode: switch to read-only mode

I created UBIFS image for 400MiB volume

./mkfs.ubifs -r target -m 2KiB -e 124KiB -c 3164 -o ti-ubifs.img
./ubinize -o ti-flash.img -m 2048 -p 128KiB -s 2048 ubinize-ti.cfg

and the config file is

[ubifs]
mode=ubi
image=ti-ubifs.img
vol_id=0
vol_size=392448KiB
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize

I am getting above error only after rebooting.

I have software ecc for 512 bytes.
Though I have 512 bytes of sub-page, I forced it to 2048 Bytes,
considering no sub-page.

Can anyone guide why I am getting above error after rebooting for
autoresize and dynamic volume.

Thanks,
Subbu

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

* Re: UBIFS mounting error
  2009-03-09 21:56 UBIFS mounting error Subramani Venkatesh
@ 2009-03-10  8:00 ` Adrian Hunter
  0 siblings, 0 replies; 2+ messages in thread
From: Adrian Hunter @ 2009-03-10  8:00 UTC (permalink / raw)
  To: Subramani Venkatesh; +Cc: linux-mtd

Subramani Venkatesh wrote:
> Hi
> I am trying to mount UBIFS on NAND flash, I am quite often getting the
> error below after rebooting.
> 
> UBIFS: recovery needed
> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
> 0:4096, written 0 bytes
> UBI warning: ubi_eba_write_leb: failed to write 2048 bytes at offset 0
> of LEB 0:4, PEB 0
> UBI: try another PEB
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
> 1:2048, written 0 bytes
> UBI warning: ubi_eba_write_leb: failed to write VID header to LEB 0:4, PEB 1
> UBI: try another PEB
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
> 2:2048, written 0 bytes
> UBI warning: ubi_eba_write_leb: failed to write VID header to LEB 0:4, PEB 2
> UBI: try another PEB
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
> 11:2048, written 0 bytes
> UBI warning: ubi_eba_write_leb: failed to write VID header to LEB 0:4, PEB 11
> UBI warning: ubi_ro_mode: switch to read-only mode
> 
> I created UBIFS image for 400MiB volume
> 
> ./mkfs.ubifs -r target -m 2KiB -e 124KiB -c 3164 -o ti-ubifs.img
> ./ubinize -o ti-flash.img -m 2048 -p 128KiB -s 2048 ubinize-ti.cfg
> 
> and the config file is
> 
> [ubifs]
> mode=ubi
> image=ti-ubifs.img
> vol_id=0
> vol_size=392448KiB
> vol_type=dynamic
> vol_name=rootfs
> vol_flags=autoresize
> 
> I am getting above error only after rebooting.
> 
> I have software ecc for 512 bytes.
> Though I have 512 bytes of sub-page, I forced it to 2048 Bytes,
> considering no sub-page.

Well the errors above show UBI writing 512 bytes, so UBI is still
using subpages. See:

http://linux-mtd.infradead.org/faq/ubi.html#L_force_no_subpage

> 
> Can anyone guide why I am getting above error after rebooting for
> autoresize and dynamic volume.


What did you use to write the image?

Have you tried the NAND tests on your NAND driver?

http://git.infradead.org/mtd-2.6.git?a=tree;f=drivers/mtd/tests;h=25367d2dfba53d5f36bea2865aa4acef149f5a8c;hb=HEAD

I suggest you try the page test and subpage test at least.

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

end of thread, other threads:[~2009-03-10  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09 21:56 UBIFS mounting error Subramani Venkatesh
2009-03-10  8:00 ` Adrian Hunter

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.