Unable to get JFFS2 support working. Help please.

Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Author Message
djpeck1
DD-WRT Novice


Joined: 02 Feb 2020
Posts: 7
Location: Matlock, UK

PostPosted: Mon Feb 03, 2020 16:06    Post subject: Unable to get JFFS2 support working. Help please. Reply with quote
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;

NVRAM
26 KB / 64 KB
CIFS
(Not mounted)
JFFS2
(Not mounted)


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;

dev: size erasesize name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00040000 00020000 "u_env"
mtd2: 00040000 00020000 "s_env"
mtd3: 00100000 00020000 "devinfo"
mtd4: 02800000 00020000 "linux"
mtd5: 02500000 00020000 "ubi"
mtd6: 02700000 00020000 "linux2"
mtd7: 02400000 00020000 "rootfs2"
mtd8: 00040000 00020000 "nvram"
mtd9: 02500000 00020000 "ddwrt"
mtd10: 00680000 00020000 "unused_area"


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;

root@WRT1900ACS:/jffs# cat /etc/fstab
/dev/root / ext2 defaults 1 1


Not sure is this is expected behavour or not.

Please help.
Sponsor
djpeck1
DD-WRT Novice


Joined: 02 Feb 2020
Posts: 7
Location: Matlock, UK

PostPosted: Tue Feb 04, 2020 14:04    Post subject: Unable to get JFFS2 support working. Help please. - SOLVED Reply with quote
Just replying to my own post.

I have not been able to get JFFS2 support working through the gui, but I tried the alternative method using the following commands;

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

I can confirm that this resolves the problem for me and JFFS2 support is now working. I've no idea why the gui method does not work for me!
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 6268
Location: Texas

PostPosted: Tue Feb 04, 2020 14:14    Post subject: Reply with quote
Can't say about the Marvelly router but this is what works for many. Rolling Eyes
SEE --
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=322955&postdays=0&postorder=asc&start=15
u251
DD-WRT Novice


Joined: 06 Oct 2018
Posts: 30

PostPosted: Sun Feb 09, 2020 19:49    Post subject: Reply with quote
Thank you sooo much! It worked for me too. Had two days invested in this with no luck.

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
Zaheer
DD-WRT Novice


Joined: 28 Apr 2022
Posts: 3

PostPosted: Mon Jun 06, 2022 0:22    Post subject: Reply with quote
Hi

Its not working for me i tried all.

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

dev: size erasesize name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00020000 00020000 "u_env"
mtd2: 00040000 00020000 "s_env"
mtd3: 005c0000 00020000 "unused_area"
mtd4: 00040000 00020000 "devinfo"
mtd5: 07b00000 00020000 "linux"
mtd6: 07800000 00020000 "ubi"
mtd7: 07b00000 00020000 "linux2"
mtd8: 07700000 00020000 "rootfs2"
mtd9: 00040000 00020000 "nvram"
mtd10: 00100000 00020000 "BBT"



Using following version
DD-WRT v3.0-r49049 std (c) 2022 NewMedia-NET GmbH
Release: 06/02/22
Board: Linksys WRT32X
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Mon Jun 06, 2022 9:01    Post subject: Reply with quote
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,

Thanks.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum