Site Tools


jffs

This is an old revision of the document!


JFFS

The JFFS menu contains settings and information used to create, prepare and view the status of a JFFS2 partition used for permanent storage.

Common routers contain two types of permanent storage:

Flash RAM - is the storage area where your FreshTomato firmware image is uploaded, stored and executed. At boot time, the image is loaded into a squash filesystem which mean it's executed read-only. Flash size is measured in Megabytes (MB).

NVRAM - Non-volatile RAM is where the configuration is stored. While loading the firmware from the squash filesystem, parameters in the form of variables are fetched from the NVRAM. NVRAM size is relatively small and is measured in Kilobytes KB.

Since modern routers have a relatively large amount of FLASH memory available, FreshTomato can mount the unused storage space and make it available to FreshTomato's underlying (Linux) OS for normal file storage operations. This function is called JFFS, short for the Journalling Flash File System type used for the storage. Currently, JFFS2 (version 2) is used.

The figures below represent an example of storage allocation, and don't scale well. The numbers will vary based on your FreshTomato version and your hardware specifications. See the Hardware Compatibility page for more information on specific FLASH and NVRAM specifications.

Enable: Checking this box enables JFFS, as shown in the image below. (Default: Disabled).

Execute when mounted: In this field, you can enter the name of a script or similar to run immeidately after the partition becomes available to FreshTomato. (Default: blank).

Total / Free Size: This displays the storage size available/the storage amount in use. This cannot be changed.

Format / Erase: The very first time you enable JFFS, you must format the partition with the JFFS2 filesystem. Once formatting is complete, the “(not mounted)” should change to “(mounted)” to reflect that FreshTomato has access to the partition. Once the JFFS partition is mounted, it can be accessed in the filesystem under the root folder as /jffs .


NOTE: As a safety precaution, FreshTomato will prevent you from doing firmware upgrades if a JFFS partition is mounted/in use. If you disable JFFS and upgrade the FreshTomato firmware, you'll lose the contents of the /jffs partition. For this reason, you should do a backup and restore operation to preserve your data there. To learn more about backup and restore of JFFS partition data, see the XXXX page.

Technical Notes/Troubleshooting

IMPORTANT: Flash memory is not designed for frequent write operations. Because of this, you should avoid frequent write operationss to it. For example, avoid storing the logs in JFFS as it will shorten the life of your router. Once FLASH Limitation is the writes but not the reads so e.g. an entware installation would be totally ok instead. Beaware of your JFFS, it should be used only if no other storage like USB or CIFS is available.

jffs.1620319237.txt.gz · Last modified: 2021/05/06 17:40 by pedro