Posted: Sat Aug 16, 2025 7:37 Post subject: R7000 Admin Tab -> Save & Apply -> Wipes JFFS2
This is an issue that I've been experiencing for a while now. I was hoping it would be fixed by now. When I hit the Save & Apply button on the Administration tab, it wipes my JFFS2 partition. I lost a bunch of scripts and haven't had the time to rewrite them. What other surprises are there? Where can I find the script source code that's run when I hit this button?
TIA
Netgear R7000
Firmware VersionDD-WRT v3.0-r62036 std (08/08/25)
Kernel VersionLinux 4.4.302-rt232-st63 #14124 SMP Fri Aug 8 05:26:57 +07 2025 armv7l
CPU ModelBroadcom BCM4709
CPU Cores2
CPU Features
EDSP FASTMULT HALF TLS
CPU Clock1000 MHz
Dhrystones6775.62 DMIPS
Factory Reset after upgrades.
Code:
Aug 16 01:20:46.466 r7000 user.err : [flash] : Could not unlock MTD device: ddwrt
Aug 16 01:20:46.639 r7000 user.err : [flash] : Could not unlock MTD device: ddwrt
Aug 16 01:20:46.639 r7000 user.info : [flash] : Flash is NAND
Aug 16 01:20:46.639 r7000 user.info : [flash] : erase[0]
Aug 16 01:20:46.639 r7000 user.info : [flash] : erase[131072]
Aug 16 01:20:46.640 r7000 user.info : [flash] : erase[262144]
Aug 16 01:20:46.640 r7000 user.info : [flash] : erase[393216]
Aug 16 01:20:46.641 r7000 user.info : [flash] : erase[524288]
...
Aug 16 01:20:46.986 r7000 user.info : [flash] : erase[98041856]
Aug 16 01:20:46.986 r7000 user.info : [flash] : erase[98172928]
Aug 16 01:20:46.987 r7000 user.info : [flash] : erase[98304000]
Aug 16 01:20:47.432 r7000 kern.notice kernel: klogd: exiting
Aug 16 01:20:47.443 r7000 user.info : [klogd] : kernel log daemon successfully stopped
Aug 16 01:20:47.452 r7000 syslog.info syslogd exiting
Aug 16 01:20:47.469 r7000 syslog.info syslogd started: BusyBox v1.37.0
Aug 16 01:20:47.469 r7000 user.info : [syslogd] : successfully started
Aug 16 01:20:47.475 r7000 kern.notice kernel: klogd started: BusyBox v1.37.0 (2025-08-08 07:19:11 +07)
Aug 16 01:20:47.475 r7000 user.info : [klogd] : successfully started
Aug 16 01:20:47.486 r7000 user.info : [resetbutton] : successfully started
Joined: 16 Nov 2015 Posts: 7069 Location: UK, London, just across the river..
Posted: Sat Aug 16, 2025 9:53 Post subject:
hmmm i haven't seen this yet...but at the first place why do you need juffs2 enabled ...?
if you want to save/use some stiff at jffs, you dont need to enable jffs2...just name your usb partition jffs and automount enabled...than use it...
i usually use /opt rather than /jffs...
Flash is NAND
Aug 16 01:20:46.639 r7000 user.info : [flash] : erase[0]
Aug 16 01:20:46.639 r7000 user.info : [flash] : erase[131072]
Aug 16 01:20:46.640 r7000 user.info : [flash] : erase[262144]
Aug 16 01:20:46.640 r7000 user.info : [flash] : erase[393216]
Aug 16 01:20:46.641 r7000 user.info : [flash] : erase[524288]
...
Aug 16 01:20:46.986 r7000 user.info : [flash] : erase[98041856]
Aug 16 01:20:46.986 r7000 user.info : [flash] : erase[98172928]
Aug 16 01:20:46.987 r7000 user.info : [flash] : erase[98304000
not sure if those are USB related....at all..jffs2 is usually in the ram so, yes those seems like erased...on save/apply.. _________________ Atheros
TP-Link WR1043NDv2 -DD-WRT 62606 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 -DD-WRT 63257 GTW/SmDNS/DoT,AD-Blk,Forced DNS,AP&Net Isolation,x2VLAN,Vanilla
Netgear R7800 --DD-WRT 62606 Gateway/DNSCryptv2,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla,VPN cli
Netgear R9000 --DD-WRT 62606 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Dynalink DL-WRX36-DDWRT 62606
Broadcom
Netgear R7000 --DD-WRT 63257 GTW/DNScrypt-proxy2/AD-Block,IPset Firewall,Forced DNS,x4VLAN,VPN cli
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
I preferred the self-contained solution where nothing was poking out.
Quote:
MTD device: ddwrt
that is the jffs2 partition. /dev/mtdblock/5 or /dev/mtdblock5. What is /opt? I was installing Entware and mounting /jffs/.opt to /opt... /opt on r7000 is empty otherwise.
Thanks! It's been there for a while though! I'm glad you found it, because I was going to spend time looking at the source code and also explore disabling jffs2 in the gui, while enabling it with console commands. Very hacky.
Joined: 08 May 2018 Posts: 16711 Location: Texas, USA
Posted: Sat Aug 16, 2025 16:09 Post subject:
Normally when you enable internal JFFS, you have to do a process that requires a reboot just to be sure because it cleans (erases) that partition. Normal behavior of Save & Apply or a bug...
Yeah... I've tried everything and it does still does it. This bug is over a few months old on at least the R7000. Disabling jffs2 support in the gui and using a startup script works for me. I don't like this solution, but I have peace of mind for now.
Here are the lines if anyone else want them until they patch it.
Code:
modprobe jffs2 2> /tmp/errortrace.txt
mount -t jffs2 /dev/mtdblock5 /jffs 2>> /tmp/errortrace.txt
mount /jffs/.entware /opt 2>> /tmp/errortrace.txt
Just did a quick check with my R7000 and can confirm your findings, although for me jffs is wiped after a a Save an Apply and then a reboot.
Problem is in services/services/jffs.c , maybe in line 195, but I have no time to look into it
It's actually all gone before the reboot. You can confirm by unmounting and remounting the partition. I tried reading a file to stdout and it complained about handles.
Joined: 16 Nov 2015 Posts: 7069 Location: UK, London, just across the river..
Posted: Sun Aug 17, 2025 6:14 Post subject:
what if you modify the nvram variables regarding cleaning jffs, do they stay or revert on the next reboot ...or survive save/apply ?
nvram show | grep jffs2
then....
Code:
nvram set clean_jffs2=0
nvram set sys_clean_jffs2=0
nvram commit
reboot
still not sure why you need to use wearable system Ram, then USB /jffs partition and ect.
in general jffs2 partition is not favorable to use as it can produce awkward results.... _________________ Atheros
TP-Link WR1043NDv2 -DD-WRT 62606 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 -DD-WRT 63257 GTW/SmDNS/DoT,AD-Blk,Forced DNS,AP&Net Isolation,x2VLAN,Vanilla
Netgear R7800 --DD-WRT 62606 Gateway/DNSCryptv2,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla,VPN cli
Netgear R9000 --DD-WRT 62606 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Dynalink DL-WRX36-DDWRT 62606
Broadcom
Netgear R7000 --DD-WRT 63257 GTW/DNScrypt-proxy2/AD-Block,IPset Firewall,Forced DNS,x4VLAN,VPN cli
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
I appreciate everyone who's replied so far. To clarify:
I prefer using the router's integrated storage regardless of whether it's "best practice" or "popular," which is why I asked about this issue. The bug first showed up a few months ago. I've tested multiple angles but haven’t seen anything unusual.
* The HTML form always posts clean_jffs2=0 to apply.cgi.
* The nvram variable for clean stays 0. If I remove it, it reappears with a 0.
* Enabling storage in settings may trigger an initial format after hitting Save & Apply.
* After that, pressing Save & Apply reformats the partition again.
* Rebooting and pressing Save & Apply at any point wipes the storage again.
* I've factory reset the router each time I upgraded thinking an old variable was triggering it.
This may be specific to the Netgear R7000 model. I was mainly asking because I want to keep using the 256MB of free integrated storage and wanted to know if others are seeing the same behavior. At least one person has confirmed it. I will keep the storage disabled in the settings, and enable by startup commands until someone updates us on a patch.
Joined: 18 Mar 2014 Posts: 13880 Location: Netherlands
Posted: Sun Aug 17, 2025 14:44 Post subject:
I am also not a big fan of using flash storage, writing to it wears it out quickly, but if you read from it no problem.
I can confirm the problem it is specific for Broadcom routers and perhaps some others.
I think the problem is in line 195 of services/services/jffs.c that does not evaluate to 0 but to -1 meaning it cannot determine if it is mounted (maybe because it is "in use"?)
Joined: 08 May 2018 Posts: 16711 Location: Texas, USA
Posted: Sun Aug 17, 2025 18:38 Post subject:
If it's -1, the partition is jffs2, if it's 0, it's ddwrt, unless I'm reading the entire start_jffs2 function wrong, which is ALWAYS possible. Again, I think it's expected behavior when you click Save & Apply.
Joined: 18 Mar 2014 Posts: 13880 Location: Netherlands
Posted: Wed Aug 20, 2025 15:31 Post subject:
@efficient_horror can you test the attached build if this solve the JFFS2 problem?
As always make a backup and know how to unbrick your router but these Netgear routers are almost unbreakable and easily recoverable with NMRP flash
But this build is tested on my own R7000 and also on my EA6900
Unzip and upload to the router
P.S. other users with an R7000 are also welcome to test
Sorry about the late reply. I monkey tested for a while, and the issue appears to be fixed. Hopefully the change can be merged. Thank you for looking into it.