Mounting a JFFS2 filesystem in Linux

what is JFFS2?

JFFS2 is Journalling Flash File System version 2 or JFFS2 is a log-structured file system for use in flash memory devices. It is the successor to JFFS. JFFS2 has been included in the Linux kernel since the 2.4.10 release. JFFS2 is also available for Open Firmware, the eCos RTOS and the RedBoot bootloader.

Here we go

If /dev/mtdblock0 doesn’t exist, do the following

# mknod /dev/mtdblock0 b 31 0

Then do the following. The kernel modules can be enabled under Device Drivers->MTD. Make sure to get them all.

# modprobe mtd # get this when enabling MTD
# modprobe jffs2 # under Filesystems, Misc
# modprobe mtdram # under MTD section
# modprobe mtdchar # under MTD section
# modprobe mtdblock # under MTD section

# dd if=your.jffs2 of=/dev/mtd0
# mount -t jffs2 /dev/mtdblock0 /your-mount-point

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *