ubifs image file confusion!

Nancy nancydreaming at gmail.com
Fri May 9 03:05:31 EDT 2008


On 5/8/08, Artem Bityutskiy <dedekind at infradead.org> wrote:
> >    My current tool ubidumpvol works fine with VFAT volume
> I have no idea what VFAT volume mean.
VFAT volume means an UBI volume which is managed by VFAT file system.
Current UBI do not have block device layer to support traditional file
system. I have implement one. Not so elegant code, also few comments,
not do code clean. If you need it to solve this problem. OK, I plase
it here.

>I have not idea what your "current tool" is.
please refer to  "[patch]new-ubi-util: ubidumpvol" which I just sent to ML

> It is very difficult to realize what is the question an the problem from
> this mail. Could you please think more on your questions and how you
> formulate them? It will help us answering them. Moreover, a well
> formulated question already has half an answer.
I'm sorry for my careless and bad expression.

To make it simple, short, go to straight:
Normally, if you do
#ubiupdatevol /dev/ubi0_0 ubifs.img (generated by mkfs.ubifs)
then do
#ubidumpvol /dev/ubi0_0 vol0.img
vol0.img and ubifs.img should be exactly the same! But the fact is no!
#ubiupdatevol /dev/ubi0_0 vol0.img
#mount -t ubifs ubi0:ubifs /mnt/1
mount failed, the error message which I already sent before.


Let's see the VFAT volume:
#mkfs.vfat /dev/ubiblock1
#mount -t vfat /dev/ubiblock1 /mnt/1
cp data to /mnt/1
#umount /mnt/1
#ubidumpvol /dev/ubi0_1 vfat.img
#ubiupdatevol /dev/ubi0_1 vfat.img -t
#ubiupdatevol /dev/ubi0_1 vfat.img
#mount -t vfat /dev/ubiblock1 /mnt/1
successful! And all the data is completely fine.

Same tool, same process!
I wonder what's the internal organizeation of ubifs.img(generated by
mkfs.ubifs).
You said ubifs.img is composed of LEBs (from leb 0 to ? what ever the
final logic block number is) and the logical block number keep
increase. If it is like this, there should be no problem for
ubidumpvol goes right, but the practice say no.

Will you please help to figure this problem out? Thanks in advance!

-- 
Best wishes,
Nancy



More information about the linux-mtd mailing list