All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Angielski <jeff@theptrgroup.com>
To: linux-mtd@lists.infradead.org
Subject: ubiattach fails with "bad image sequence number"
Date: Mon, 21 Dec 2009 17:33:51 -0500	[thread overview]
Message-ID: <4B2FF7CF.7040401@theptrgroup.com> (raw)


If I ubiformat my NAND partition with an UBIFS image I keep on getting 
"bad image sequence number" when I try to do the ubiattach.  If I just 
do a plain ubiformat with no image then everything works fine when I 
ubiattach.

I was wondering if somebody ran into something similar.  The steps are 
so trivial it seems like something fundamentally wrong with either the 
mkfs.ubifs or the ubiformat.

I did not see anything related to this on the UBFI FAQ or documentation.



Here is how the image is being created on the x86 host:
======================================================

$ mkfs.ubifs -r build/targetfs_tiny -m 4096 -e 262144 -c 2047 -o tiny.ubifs

$ ubinize -s 1024 -o ubifs1b.img -m 4096 -p 256KiB ubifs1.cfg

$ more ubifs1.cfg
[ubifs]
mode=ubi
image=tiny.ubifs
vol_id=0
vol_size=500MiB
vol_type=dynamic
vol_name=fs1
vol_alignment=1
vol_flags=autoresize


And here is the sequence on the PowerPC target where the problem has 
manifested itself:
==================================================================

# mtdinfo -u /dev/mtd8
mtd8
Name:                           fs1
Type:                           nand
Eraseblock size:                262144 bytes, 256.0 KiB
Amount of eraseblocks:          2048 (536870912 bytes, 512.0 MiB)
Minimum input/output unit size: 4096 bytes
Sub-page size:                  1024 bytes
OOB size:                       128 bytes
Character device major/minor:   90:16
Bad blocks are allowed:         true
Device is writable:             true
Default UBI VID header offset:  1024
Default UBI data offset:        4096
Default UBI LEB size:           258048 bytes, 252.0 KiB
Maximum UBI volumes count:      128

# ubiformat -s 1024 -f ubifs1b.img /dev/mtd8
ubiformat: mtd8 (nand), size 536870912 bytes (512.0 MiB), 2048 
eraseblocks of 262144 bytes (256.0 KiB), min. I/O size 4096 bytes
libscan: scanning eraseblock 2047 -- 100 % complete
ubiformat: 2045 eraseblocks have valid erase counter, mean value is 4
ubiformat: 3 bad eraseblocks found, numbers: 72, 930, 1846
ubiformat: flashing eraseblock 30 -- 100 % complete
ubiformat: formatting eraseblock 2047 -- 100 % complete

# ubiattach /dev/ubi_ctrl -m 8
[ 2614.265521] UBI: attaching mtd8 to ubi0
[ 2614.269732] UBI: physical eraseblock size:   262144 bytes (256 KiB)
[ 2614.276645] UBI: logical eraseblock size:    258048 bytes
[ 2614.282420] UBI: smallest flash I/O unit:    4096
[ 2614.287251] UBI: sub-page size:              1024
[ 2614.292063] UBI: VID header offset:          1024 (aligned 1024)
[ 2614.298178] UBI: data offset:                4096
[ 2614.321544] UBI error: process_eb: bad image sequence number 
1294632561 in PEB 31, expected 1571790334
[ 2614.331112] UBI error: ubi_attach_mtd_dev: failed to attach by 
scanning, error -22
ubiattach: error!: cannot attach mtd8
            error 22 (Invalid argument)



-- 
Jeff Angielski
The PTR Group
www.theptrgroup.com

             reply	other threads:[~2009-12-21 22:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-21 22:33 Jeff Angielski [this message]
2010-01-09 23:51 ` ubiattach fails with "bad image sequence number" Artem Bityutskiy
2010-01-09 23:53   ` Artem Bityutskiy
2010-01-13  3:26     ` Jeff Angielski
2010-01-15 17:15       ` Artem Bityutskiy
2010-01-16 13:22         ` Peter Korsgaard
2010-01-26  9:47           ` Peter Korsgaard
2010-01-28 18:56             ` David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B2FF7CF.7040401@theptrgroup.com \
    --to=jeff@theptrgroup.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.