public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Volume write-protected
@ 2009-04-08 16:58 DATACOM - Nedel
  2009-04-09  6:09 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: DATACOM - Nedel @ 2009-04-08 16:58 UTC (permalink / raw)
  To: linux-mtd

Hi,

I've created a image with mkfs.ubifs and ubinize commands, as follow:

mkfs.ubifs -r ramdisk -m 2048 -c 8190 -e 126KiB -o image.temp
ubinize -o $(BUILT)/images/image.ubifs -m 2048 -p 128KiB -s 512 ubinize.cfg

ubinize.cfg content:
[ubifs]
mode=ubi
image=PD1200.temp
vol_id=0
vol_size=900MiB
vol_type=dynamic
vol_name=ubipart
vol_alignment=1
vol_flags=autoresize

After I flash the ubi image, with nand write u-boot command, I've tried 
to mount it:

# mount -t ubifs ubi0!ubipart /mnt/flash/
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 
8188:512, written 0 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 
8191:512, written 0 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 
8190:512, written 0 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 
8189:512, written 0 bytes
UBI error: ubi_io_write: read-only mode
UBI error: erase_worker: failed to erase PEB 8188, error -30
UBI error: do_work: work failed with error code -30
UBI error: ubi_thread: ubi_bgt0d: work failed with error code -30
UBIFS error (pid 6550): ubifs_write_node: cannot write 2048 bytes to LEB 
1:2048, error -30
mount: ubi0!ubipart is write-protected, mounting read-only

I can't find where this write-protected flag is set.
Sorry but when I try to run my kernel image with ubifs debug it hangs 
before u-boot initialization.

Thanks in advance,

-- 
Werner Maurício NEDEL

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

* Re: Volume write-protected
  2009-04-08 16:58 Volume write-protected DATACOM - Nedel
@ 2009-04-09  6:09 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2009-04-09  6:09 UTC (permalink / raw)
  To: DATACOM - Nedel; +Cc: linux-mtd

On Wed, 2009-04-08 at 13:58 -0300, DATACOM - Nedel wrote:
> # mount -t ubifs ubi0!ubipart /mnt/flash/
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 
> 8188:512, written 0 bytes
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 
> 8191:512, written 0 bytes
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 
> 8190:512, written 0 bytes
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 
> 8189:512, written 0 bytes

-5 is EIO, Input/output error. UBI tries to write 512 bytes, which is
one subpage, to offset 512 (i.e., it writes the second subpage). And
the MTD layer returns 512. So the issue is somewhere below UBI.

Possibly, your flash does not support sub-pages, but it declares that
it does. You should look at your MTD driver. The other possibility is
to force UBI not to use subpages.

> UBI error: ubi_io_write: read-only mode
> UBI error: erase_worker: failed to erase PEB 8188, error -30
> UBI error: do_work: work failed with error code -30
> UBI error: ubi_thread: ubi_bgt0d: work failed with error code -30
> UBIFS error (pid 6550): ubifs_write_node: cannot write 2048 bytes to LEB 
> 1:2048, error -30
> mount: ubi0!ubipart is write-protected, mounting read-only

UBI attaches the volume in R/O mode, because of the write error.
UBI tries to be nice to you, and instead of totally refusing the
MTD device, it attaches it R/O.

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

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

end of thread, other threads:[~2009-04-09  6:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-08 16:58 Volume write-protected DATACOM - Nedel
2009-04-09  6:09 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox