UBIFS fails & crashes on SheevaPlug

Artem Bityutskiy dedekind1 at gmail.com
Fri Jul 24 10:38:27 EDT 2009

On 07/24/2009 04:12 PM, Erno Kuusela wrote:
> Ah, ok. I did google for that error message but searching for
> "ubi_io_write: error -5" doesn't yield anything useful for the first
> screenful of results..
> So workaround would be to disable CONFIG_MTD_NAND_VERIFY_WRITE or to
> follow the "ignore sub pages" entry from the faq...
> Indeed the latter seems to work, if I give --vid-hdr-offset 2048 option
> to the ubinize, ubiformat&  ubiattach commands. Thanks!

It should work without this. Your flash driver reports that your flash
supports 512-byte sub-pages. This means you may save your flash space
and put both UBI headers to the first NAND page. See this explanation:


If you follow links from this little section, you should grasp the picture.

So, disabling this option should help without the --vid-hdr-offset 2048
stuff. If it does not, then you should fix your driver.

> Maybe it would be better to disable the verify&  subpages combo
> until the bug is fixed? Especially since it crashes the kernel...

May be, but it is better to just fix this.

> Also, ubiformat mentioned 1400+ "bad" eraseblocks, what should I make of
> that? Is it really failed flash cells, just some blocks reserved for
> u-boot and stuff, or blocks traumatized from my earlier misadventures
> with ubiformat parameters?

Hmm, this is not normal. What is the version of ubiformat you use? Could
you try the latest one from the git tree:


Just in case, here are mtd-utils compile issues FAQ:
or you may always cd to ubi-utils and compile only UBI utils.

And what UBI is printing? See "UBI: number of bad PEBs:" message.

And please, send the exact ubiformat pritns.

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

More information about the linux-mtd mailing list