I tried many applications to format an empty USB drive with a JFFS2 filesystem, but I haven't found a tool that would let me do it.

  • gnome-disk-utility doesn't list it
  • gparted doesn't list it
  • mkfs.jffs2 build the file system from directory, and I don't want that
  • flash_eraseall fails with the error can't initialize libmtd

I'm trying to use it with my router, a R8000 running DD-WRT.


JFFS2 is not designed for using it on regular block devices such as those implemented via USB storage or your hard drive controller - it's designed for embedded devices and when you have direct MTD access to the flash chips.

It isn't possible to use it on a block device except with some fairly advanced hacks, such as this one that details using a kernel trick called "block2mtd" to emulate an MTD interface on top of a block device. This is so impractical as to be an intellectual curiosity only, don't do it in the real world.

If you want a log structured file system on a USB drive, get one that's implemented in hardware - any Flash hard drive or USB stick which implements wear-leveling is essentially a log-structured file system at a low level upon which a regular file system is implemented at a higher level. While a mainstay of SSDs, this is still relatively uncommon for a USB stick with some exceptions, such as my "Sandisk Extreme" branded stick.

Or you may want to try experimenting with NILFS. But, it's much slower than traditional file systems at some tasks. You may be surprised to find good old ext4 to be faster than you thought.

| improve this answer | |

I don’t think you need to format your USB drive or memory stick to JFFS2. Just use a partition named JFFS and formatted with ext2. Enable USB disk services and it should be automatically mounted by DD-WRT. I use a memory stick on my R7800 running DD-WRT f/w. Check out the settings in GUI tabs USB and NAS. There’s also a jffs setting somewhere in administration.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.