Joined: 02 Feb 2020 Posts: 7 Location: Matlock, UK
Posted: Mon Feb 03, 2020 16:06 Post subject: Unable to get JFFS2 support working. Help please.
Hello. I have a problem enabling and getting JFFS2 support to work on my Linksys WRT1900ACS router that is running DD-WRT v3.0-r41813 std (12/29/19).
I have used the following procedure to the letter to enable the JFFS2 support;
1. On the router web page click on Administration.
2. Scroll down until you see JFFS2 Support section.
3. Click Enable JFFS.
4. Click Save.
5. Wait couple seconds, then click Apply.
6. Wait again. Go back to the Enable JFFS section, and enable Clean JFFS.
7. Do not click "Save". Click Apply instead.
The router formats the available space.
8. Wait till you get the web-GUI back, then disable "Clean JFFS" again.
9. Click "Save".
10. It may be wise to Reboot the router, just to make sure
I did a reboot just to be sure. I have tried this procedure several times. Each time JFFS2 shows as enabled, but Total / Free size shows as (Not mounted) and in Status -> Space Usage the following is shown;
If I try to access /jffs and create a file I get the “Read-only file system error”.
In search of a solution I have tried the following so far;
Run mount command and it produced the following output;
root@WRT1900ACS:/jffs# mount
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
ramfs on /tmp type ramfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=512k)
devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
(No sign of the jffs2 filesystem being mounted)
Run cat /proc/mtd and it produced the following output;
I then tried to mount the filesystem manually with the following;
mount –t jffs2 /dev/mtdblock9 /jffs
The command produces no output and after a few seconds I believe the filesystem is mounted, and I am able to write files to /jffs
Running mount and it produced the following output;
root@WRT1900ACS:/jffs# mount
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
ramfs on /tmp type ramfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=512k)
devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
/dev/mtdblock9 on /jffs type jffs2 (rw,relatime)
(The jffs2 filesystem now appears mounted at /jffs
However looking at the output of dmesg there are a lot of errors reported. Examples follow;
[ 1458.960138] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000210a8: 0x 16f1 instead
[ 1458.969675] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00021154: 0x 16f1 instead
[ 1458.979298] jffs2: Further such events for this erase block will not be printed
[ 1476.698124] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x024e0018: 0x 5347 instead
[ 1476.707646] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x024e003c: 0x ca66 instead
[ 1476.738869] jffs2: notice: (2271) jffs2_build_xattr_subsystem: complete building xattr subsy stem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
What I would like to know is how to get the jffs2 filesystem to automatically mount after each reboot. I believe setting the JFFS2 Support option through the gui should have achieved this, but in my case it has not worked. As I have said previously I have tried numerous JFFS2 enable/disable and clean cycles, but jffs2 never gets mounted.
There is no entry in /etc/fstab for the jffs2 filesytem mount. See below;
On the router web page click on Administration.
Scroll down until you see JFFS2 Support section.
Click Enable JFFS.
Click Save.
Wait couple seconds, then click Apply.
Wait again. Go back to the Enable JFFS section, and enable Clean JFFS.
Do not click "Save". Click Apply instead.
The router formats the available space.
Wait till you get the web-GUI back, then disable "Clean JFFS" again.
Click "Save".
It may be wise to Reboot the router, just to make sure
Also tried
nvram set jffs_mounted=1
nvram set enable_jffs2=1
nvram set sys_enable_jffs2=1
nvram set clean_jffs2=1
nvram set sys_clean_jffs2=1
nvram commit
reboot
Filesystem Size Used Available Use% Mounted on
/dev/root 31.5M 31.5M 0 100% /
none 512.0K 0 512.0K 0% /dev
Joined: 31 Jul 2021 Posts: 2146 Location: All over YOUR webs
Posted: Mon Jun 06, 2022 9:01 Post subject:
Enable JFFS (Save) and Clean JFFS is done in one time and you must click Apply after setting clean, it works, cleaning JFFS must be done only once at first setup e.g. JFFS has not been used before and generally not needed again unless you want to wipe the JFFS contents of a previous setup.
Upon reboot JFFS2 will be prepared and wiped, depending on the size available to JFFS this can take some time to complete, this process is logged into syslog (so syslog must be enabled) and to troubleshoot issue we need the full log entry associated with this process, not just a snippet out of context.
Also, 2019 dd-wrt builds vs 2022 current build much has been changed (no one wants to troubleshoot an unsupported build running old libraries/kernels), so, upgrade to latest dd-wrt, and after reset router to default and manually reconfigure (do not restore an old backup). 2019 dd-wrt and associated libraries are out of date.
It works, I have tested it myself, so until dd-wrt upgrade and system logs are posted of the JFFS process,