R7800: Small JFFS - 25MB

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2, 3  Next
Author Message
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Sat Apr 30, 2022 20:42    Post subject: R7800: Small JFFS - 25MB Reply with quote
Hello,

I've here a Netgear R7800 and to my surprise DD-WRT reports the JFFS as only 25MB:



According to OpenWRT wiki it should be way more:

Quote:
Router has 512 MB RAM and 128 MB flash (about 80 MB free flash space after installation in 18.06 and later).


Also my R7000's have around 90MB of free JFFS space so it makes no sense this router only has 25MB.

Is this any specific limitation of this model, or is there something I can do?

Thank you.

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6856
Location: Romerike, Norway

PostPosted: Sat Apr 30, 2022 21:10    Post subject: Reply with quote
Add a USB Memory stick with a volume named "jffs". Much better than wear out the Flash Memory.
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Sat Apr 30, 2022 21:35    Post subject: Reply with quote
Per Yngve Berg wrote:
Add a USB Memory stick with a volume named "jffs". Much better than wear out the Flash Memory.


Hey, yeah, I'm aware of that, I think we've spoke about it a few months ago when I posted some guide about using the JFFS for the SmartDNS config Very Happy

Anyways, any tips about the small size?

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Sat Apr 30, 2022 21:49    Post subject: Reply with quote
Could be a bootloader limitation to the flash layout. Might want to find the R7800 thread(s) in the references sticky and read all 200 some-odd pages of that death trap.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Sat Apr 30, 2022 22:24    Post subject: Reply with quote
Also found this in the R7800:



Comparatively my R7000's are way simpler:

Quote:
cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00020000 "boot"
mtd1: 00180000 00020000 "nvram"
mtd2: 02000000 00020000 "linux"
mtd3: 01e00000 00020000 "rootfs"
mtd4: 00040000 00020000 "board_data"
mtd5: 05dc0000 00020000 "ddwrt"

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6407
Location: UK, London, just across the river..

PostPosted: Sat Apr 30, 2022 22:38    Post subject: Reply with quote
yep R7800 and R7000 are different routers from different vendors and have different mtd layout/partitions...all normal... Laughing and nobody uses the flash jffs not good idea...
_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 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 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Sun May 01, 2022 9:46    Post subject: Reply with quote
Per Yngve Berg wrote:
Add a USB Memory stick with a volume named "jffs". Much better than wear out the Flash Memory.


Alozaros wrote:
nobody uses the flash jffs not good idea...


I get all the risks of using the JFFS however... USB storage fails to work properly half of the time.

Correct me if I'm wrong:

From the all the reports I read here and my personal experience I can conclude that there are zero guarantees that a USB hard drive is mounted at the right time so services like Smartdns can use it to read config files at boot. What usually happens is that the hard drive mount gets delayed or fails and then the service starts with a built-in or generic config that may have other implications.

I get that the timing of startup related stuff is hard to get right but for static config files the internal JFFS is a sure way to avoid problems.

With that said 25M are more than enough to store simple configuration files, my question is more about why in this specific router I only get that and how likely it is someone with another firmware (or manually) did something that they shouldn't have done / how to reverse it.

Thank you!

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12834
Location: Netherlands

PostPosted: Sun May 01, 2022 10:29    Post subject: Reply with quote
Just restart the services after /jffs is mounted e.g. in startup:
Code:
# wait till jffs is mounted
is-mounted /jffs

# restart services
service smartdns restart

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Sun May 01, 2022 11:02    Post subject: Reply with quote
egc wrote:
Just restart the services after /jffs is mounted e.g. in startup:
Code:
# wait till jffs is mounted
is-mounted /jffs

# restart services
service smartdns restart


That's an option, is there any documentation on is-mounted? How does it handle hard drive failures etc?

Thank you.

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12834
Location: Netherlands

PostPosted: Sun May 01, 2022 11:09    Post subject: Reply with quote
cat /usr/bin/is-mounted

Code:
# Wait until directory is mounted and writable
# Usage: is-mounted path-of-directory  max-wait-time
# default is /jffs 35
# Can also be used to test drive readiness e.g.:
# if is-mounted /jffs 5; then echo "drive ready"; else echo "drive not ready"; fi


note this is working only in recent builds

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6407
Location: UK, London, just across the river..

PostPosted: Sun May 01, 2022 11:29    Post subject: Reply with quote
yep is-mounted /jffs works as intended...as well, to avoid troubles with jffs, you can use /opt instead...
In addition to what egc suggested...instead of is-mounted /jffs, you can save your commands in save to USB, and those will come executed after USB is up and running...
To fiddle with timings/scripts executions, in order to delay script execution or delay execution of certain commands, you can add sleep 5 or 10 or any period of seconds to the top of any script locations...

for example some routers have faster CPU and boot time, so sometimes fiddling with timing is needed on some slower routers....

At the end of the day, still not good idea to use internal jffs...
either stick to egc advise or save script to USB...

as well in order to shutdown correctly
you'd need a shutdown script too, for example as im running things from /opt, i would like to stop those before router is down/rebooted...(just for the record i used to use SmartDNS form /opt) now im using Stubby...

sleep 10
/opt/etc/init.d/rc.unslung stop

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 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 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Sun May 01, 2022 15:02    Post subject: Reply with quote
Guys thank you for the feedback. I'll try the is-mounted script in this router to see how it goes long term.

Particularly speaking about SmartDNS, why can't we "have nice things" and have an "Additional SmartDNS Options" textarea to save its config to NVRAM? Example:



Thank you.

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12834
Location: Netherlands

PostPosted: Sun May 01, 2022 18:37    Post subject: Reply with quote
The problem is not making it it is about 20 minutes work.

I just added a setting to Force redirect DNS over TLS (DoT) to redirect a DoT query to the router (see picture and this is not a mock up but it is working Smile )

The problem is that it adds extra code and takes up extra nvram.
As it also has to fit into very low specced routers we do have to be careful with what we add.

That said as SmartDNS is configurable I will see what I can do Smile

But although I can make it, the big Kahuna has to endorse it, so no guarantee (and as I am busy the upcoming week, it can take some time)

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12834
Location: Netherlands

PostPosted: Sun May 01, 2022 20:13    Post subject: Reply with quote
Code:
root@EA8500:/tmp# cat smartdns.conf
bind :6053
prefetch-domain yes
serve-expired yes
log-size 64K
log-num 1
log-level error
log-file /tmp/smartdns.log
server 1.0.0.1
server 9.9.9.9
server 192.168.0.1
#test smartdns
#options


Only the translation and it is done Smile

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6407
Location: UK, London, just across the river..

PostPosted: Sun May 01, 2022 21:43    Post subject: Reply with quote
yep egc this will be a very cool option to have it, as SmartDNS offers a tons of useful other than just DoT and Doh settings...although to me, setting it up via config file, its not a proble (as long as its working its fine)...the only thing is SmartDNS must be 100% working a hassle free and in conjunction with DNSmasq...(as i had some odd behaviour with it and went back to good old Stubby, it never fails)...

p.s. there you go....we have it on the current build 48786


4:48 PM Changeset [48784] by brainslayer
update by egc for extended optiond with smartdns
4:47 PM Changeset [48783] by brainslayer
update by egc for extended optiond with smartdns

Thanks egc

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 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 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Goto page 1, 2, 3  Next Display posts from previous:    Page 1 of 3
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware 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