From: "Manuel Sahm" <Manuel.Sahm@feig.de>
To: <dedekind@infradead.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Re: Create, Flash and Mount UBIFS Images
Date: Thu, 02 Apr 2009 14:07:01 +0200 [thread overview]
Message-ID: <49D4C682.187F.00BC.1@feig.de> (raw)
In-Reply-To: <1238672548.20906.83.camel@localhost.localdomain>
Hello, sorry for the previous post without informations...
Here are the last two steps I did embedded:
[Attach the /dev/mtd6 to ubifs and try to mount it]
[Before I did a "flash_eraseall /dev/mtd6" and a "ubiformat /dev/mtd6
-s512 -f ubi.img"]
/usr/sbin # ubiattach /dev/ubi_ctrl -m6 -d6 -O512
UBI: attaching mtd6 to ubi6
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: attached mtd6 to ubi6
UBI: MTD device name: "Partition 7 - UPDATE : 32 MByte"
UBI: MTD device size: 32 MiB
UBI: number of good PEBs: 256
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 233
UBI: total number of reserved PEBs: 23
UBI: number of PEBs reserved for bad PEB handling: 2
UBI: max/mean erase counter: 0/0
UBI: background thread "ubi_bgt6d" started, PID 1336
UBI device number 6, total 256 LEBs (33030144 bytes, 31.5 MiB),
available 233 LEBs (30062592 bytes, 28.7 MiB), LEB size 129024 bytes
(126.0 KiB)
/usr/sbin # mount -t ubifs ubi
ubiattach ubidetach ubimirror ubinize ubiupdatevol
ubicrc32 ubiformat ubimkvol ubirename
ubicrc32.pl ubigen ubinfo ubirmvol
/usr/sbin # mount -t ubifs ubi6_0 /mnt/OBIDfs_ubi/
UBIFS: static UBI volume - read-only mode
UBIFS error (pid 1391): mount_ubifs: cannot mount read-write -
read-only media
UBIFS: static UBI volume - read-only mode
UBIFS error (pid 1391): validate_sb: bad superblock, error 4
mount: mounting ubi6_0 on /mnt/OBIDfs_ubi/ failed: Invalid argument
Any idea why this seems to fail ?
By the way if I use:
"flash_eraseall /dev/mtd6"
"ubiformat /dev/mtd6 -s512"
"ubiattach /dev/ubi_ctrl -d6 -m6 -O512"
"ubimkvol /dev/ubi6 -m -N "TEST""
"mount -t ubifs ubi6_0 /mnt/ubi/"
this works ??
Thank you very much
>>> Artem Bityutskiy <dedekind@infradead.org> 02.04.2009 13:42 >>>
Hi,
On Thu, 2009-04-02 at 13:36 +0200, Manuel Sahm wrote:
> Hello,
>
> Could anybody explain me how to build an ubi.img that I could flash
> inside my system ?
>
> NAND Flash: Micron 256 MByte
> Physical Eraseblock Size = 131072
> Logical Eraseblock Size = 129024
> Min I/O Size = 2048
> SubPage = 512
>
> The Partition /dev/mtd6 is 32MByte.
>
>
> I did the following steps:
> On my host I created the file through:
>
> mkfs.ubifs -d /exports/ -m 2048 -e 129024 -o ubifs.img -x "none" -c
> 2047
> ubinize -p 128KiB -m 2048 -s 512 -O 512 -o ubi.img ubi.ini
>
> with ubi.ini
> [TEST]
> mode=ubi
> image=ubifs.img
> vol_id=0
> vol_size=3MiB
> vol_type=dynamic
> vol_alignment=1
> vol_flags=autoresize
>
> Then I copy this creted ubi.img to my embedded system.
>
> On my embedded system I did:
> flash_eraseall /dev/mtd6
> ubiformat /dev/mtd6 -s 512 -f ubi.img
> ubiattach /dev/ubi_ctrl -m6 -d6 -O512
> mount -t ubifs ubi6_0 /mnt/ubi6
>
> Then at the mount command I got the error:
> validate_sb: bad superblock
>
> So what´s wrong ?
Could you please try to enable debugging, as it is asked here:
http://www.linux-mtd.infradead.org/doc/ubifs.html#L_how_send_bugreport
And I do not understand why you did not provide all UBIFS output.
The print is:
ubifs_err("bad superblock, error %d", err);
and you did not provide error code number.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
next prev parent reply other threads:[~2009-04-02 12:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-02 11:36 Create, Flash and Mount UBIFS Images Manuel Sahm
2009-04-02 11:42 ` Artem Bityutskiy
2009-04-02 12:07 ` Manuel Sahm [this message]
[not found] ` <49D4C59A.187F.00BC.1@feig.de>
2009-04-02 12:20 ` Antw: " Artem Bityutskiy
2009-04-02 12:21 ` Artem Bityutskiy
2009-04-03 7:32 ` Manuel Sahm
2009-04-03 8:30 ` Artem Bityutskiy
2009-04-03 10:57 ` Manuel Sahm
2009-04-03 14:41 ` Artem Bityutskiy
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=49D4C682.187F.00BC.1@feig.de \
--to=manuel.sahm@feig.de \
--cc=dedekind@infradead.org \
--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.