Sep 162010

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
Jul 092008


There are several reasons why you might want to make your root file system read only. I wanted to have a system on a flash disk, and since flash disks are damaged after repeated read-write circles the read-only root is a very nice solution. Other reasons why you would want to make your root partition read only include:

  • If you want maximum security for your server, and want it to boot from a read only medium (i.e. a CD-ROM)
  • If you want to make your own live-cd
  • To avoid that power loss or system crash damage the root partition.
  • If you want to mount the same nfsroot on several thin clients

The following procedure is what i did to turn my SuSE 10.1 root file system to read-only. It should work on both earlier and later versions but i haven’t tested it yet. There could be better/more elegant solutions, if you think that something is missing please fill free to edit this howto.


Some of the information on this howto where found here.

Continue reading »