public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@infradead.org>
To: simon polette <spolette@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Ubiattach problem after flashing an image
Date: Fri, 03 Apr 2009 10:09:18 +0300	[thread overview]
Message-ID: <1238742558.20906.103.camel@localhost.localdomain> (raw)
In-Reply-To: <72795ccb0904020658s35f8fd6aw97798be53ed7d559@mail.gmail.com>

Hi,

On Thu, 2009-04-02 at 15:58 +0200, simon polette wrote:
> Hi,
> 
> I'm using the last mtd utils version provided by the git mtd
> repository. I want to flash an ubi image built with mkfs.ubfis and
> ubinize into a Nand flash. Once the nand is flashed, when I try to
> attach ubi, I get this error :
> 
> # ubiattach  /dev/ubi_ctrl -m 2
> [  968.980000] UBI: attaching mtd2 to ubi1
> [  969.000000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
> [  969.030000] UBI: logical eraseblock size:    129024 bytes
> [  969.050000] UBI: smallest flash I/O unit:    2048
> [  969.060000] UBI: sub-page size:              512
> [  969.080000] UBI: VID header offset:          512 (aligned 512)
> [  969.100000] UBI: data offset:                2048
> [  969.330000] UBI error: vtbl_check: volume table check failed:
> record 1, error 9
> ubiattach: error!: cannot attach mtd2
>            error 22 (Invalid argument)
> 
> The ubi image I use is ok because I already successfully flashed it
> and used it with this hardware. This error appeared since I upgraded
> both mtd utils and Linux kernel, but even if come back to the previous
> versions I was used to work with, this error persist. I think I'm
> doing something wrong, but don't know where at all.
> Any idea is welcome.

You did not enable debugging, as it is asked for here:
http://www.linux-mtd.infradead.org/doc/ubifs.html#L_how_send_bugreport

But I took a look into the code, and the following is error 9:

                if (reserved_pebs > ubi->good_peb_count) {
                        dbg_err("too large reserved_pebs %d, good PEBs %d",
                                reserved_pebs, ubi->good_peb_count);
                        err = 9;
                        goto bad;
                }

This means you created a too large UBI volume in the image,
and your real flash is smaller.

Try to enable UBI debugging, and type dmesg, then you'll see
reserved and real eraseblock numbers.

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

      reply	other threads:[~2009-04-03  7:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-02 13:58 Ubiattach problem after flashing an image simon polette
2009-04-03  7:09 ` Artem Bityutskiy [this message]

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=1238742558.20906.103.camel@localhost.localdomain \
    --to=dedekind@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=spolette@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox