Thursday, September 19, 2013

How to mount a JFFS2 image

Mount a JFFS2 image:

$ sudo su
$ mkdir /mnt/image
$ modprobe mtdram total_size=deviceSize erase_size=128
$ modprobe mtdblock
$ dd if=jffs2_image.bin of=/dev/mtdblock0
$ mount -t jffs2 /dev/mtdblock0 /mnt/image
$ cd /mnt/image

deviceSize: size of the virtual MTD device in Kb (choose a size greater than the image size)

This procedure is also useful when you need to emulate an MTD device for testing or other purposes.

No comments: