From: Artem Bityutskiy <dedekind1@gmail.com>
To: "Kline, Matthew" <matthew.kline@flukenetworks.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: Mounting UBIFS images with a min. I/O unit of 1 byte
Date: Tue, 31 Mar 2015 09:27:52 +0300 [thread overview]
Message-ID: <1427783272.30360.153.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <E8C63C11EA3FB04DBDFEDECEFD927FD1140C207A@US-EVT-EXM04-P.global.tektronix.net>
Hi Matt,
On Mon, 2015-03-30 at 18:13 +0000, Kline, Matthew wrote:
> Hello all,
>
> I am attempting to mount a UBIFS image to extract and inspect the files within.
> Unfortunately, I'm running into a bunch of problems. For starters, there doesn't
> seem to be a canonical way to do so - the process listed at
> http://www.linux-mtd.infradead.org/faq/ubifs.html#L_ubifs_extract
> seems out of date given how my kernel (3.19.2) behaves and compared to processes
> listed at more recent sources such as
> http://elinux.org/UBIFS#Mounting_UBI_Image_on_PC_using_nandsim or
> https://gist.github.com/naodesu/10620506. At any rate, I have had the most luck
> with the third method, but mount fails, logging to dmesg,
> "validate_sb: min. I/O unit mismatch: 8 in superblock, 2048 real".
Right, there is no canonical way, unfortunately, no one created it.
> After asking around on the IRC channel #mtd, I understand that the
> problem is caused by the UBIFS image being byte-addressable
> (with mkfs.ubifs being passed -m 1), while the NAND device nandsim is simulating
> is addressable to 2048 bit (or byte?) blocks (hence the dmesg output).
8 is what UBI/UBIFS uses in case of NOR flashes. So you seem to have an
image made for a NOR flash and you are trying to put it to a NAND flash
simulator.
> So, if the image has a minimum I/O unit of 1 byte and most NAND memory
> has a unit of >= 512 bytes
> (as mentioned at http://linux-mtd.infradead.org/doc/ubi.html#L_min_io_unit),
> is mounting it with nandsim out of the question? Is there any other approach
> I can take?
Try mtdram - should help. Make sure it is built, then modprobe mtdram.
There are parameters to control eraseblock size and flash size.
Generally - UBI/UBIFS images are specific to flash geometry. If you want
to mount the image, you need to have a flash of the same geometry:
eraseblock size and min. I/O unit size. Flash size should be same or
larger.
HTH.
P.S: feel free to amend the mtd web site too. Send patches against the
'mtd-www.git' project.
next prev parent reply other threads:[~2015-03-31 6:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 18:13 Mounting UBIFS images with a min. I/O unit of 1 byte Kline, Matthew
2015-03-31 6:27 ` Artem Bityutskiy [this message]
2015-03-31 18:02 ` Kline, Matthew
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=1427783272.30360.153.camel@sauron.fi.intel.com \
--to=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=matthew.kline@flukenetworks.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