2009-12-04

Loop mount JFFS2 image(quote)

Loop mount JFFS2 image

JFFS2 images can not be loop mounted. The loop device is essentially a driver which represents files as block devices. But JFFS2 works on top of MTD devices which are different. So an “mtdloop” device would be needed for this, but nobody implemented it yet.
maemo.org provide two solution to solve the issue.
Block Device Emulating a MTD
Kernel Memory Emulating a MTD
I think the second method is very convenient. The method is:
mknod /tmp/mtdblock0 b 31 0
modprobe mtdblock
modprobe mtdram total_size=65536 erase_size=256
modprobe jffs2
dd if=/pathtoimage/rootfs.jffs2 of=/tmp/mtdblock0
mkdir /media/jffs2
mount -t jffs2 /tmp/mtdblock0 /media/jffs2
Very good method! And I cost about 24 hours to find it. So keep it here.

No comments:

Post a Comment