Mounting UBIFS images with a min. I/O unit of 1 byte

Kline, Matthew matthew.kline at flukenetworks.com
Mon Mar 30 11:13:47 PDT 2015


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".

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).

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?

Best wishes,

Matt Kline
Fluke Networks



More information about the linux-mtd mailing list