New Build - 06/02/2023 - r52869

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3  Next
Author Message
Alozaros
DD-WRT Guru


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

PostPosted: Sun Jun 04, 2023 16:24    Post subject: Reply with quote
cd /tmp
curl -O https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2023/06-02-2023-r52869/netgear-r7000/netgear-r7000-webflash.bin
write netgear-r7000-webflash.bin linux &
reboot

this is more correct but your version will work too

difference is the & symbol

& symbol creates separate process for the write command, so it will be done even if the telnet/ssh connection is lost...

_________________
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
Sponsor
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Sun Jun 04, 2023 17:00    Post subject: Reply with quote
Alozaros wrote:
write netgear-r7000-webflash.bin linux &
reboot

this is more correct but your version will work too

difference is the & symbol

& symbol creates separate process for the write command, so it will be done even if the telnet/ssh connection is lost...

In an old thread, someone suggested the use of nohup. Something like "nohup write xxxx linux &"....

DD-WRT :: View topic - FYI: Command line upgrades via SSH will no longer work
Sep 03, 2009
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=57529&start=1

How to use Nohup in Linux
https://linuxhint.com/how_to_use_nohup_linux/

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
Alozaros
DD-WRT Guru


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

PostPosted: Sun Jun 04, 2023 17:15    Post subject: Reply with quote
mwchang wrote:
Alozaros wrote:
write netgear-r7000-webflash.bin linux &
reboot

this is more correct but your version will work too

difference is the & symbol

& symbol creates separate process for the write command, so it will be done even if the telnet/ssh connection is lost...

In an old thread, someone suggested the use of nohup. Something like "nohup write xxxx linux &"....

DD-WRT :: View topic - FYI: Command line upgrades via SSH will no longer work
Sep 03, 2009
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=57529&start=1

How to use Nohup in Linux
https://linuxhint.com/how_to_use_nohup_linux/


killing services in order to clear ram yes.. but this unit, has a plenty of ram...anyway..however its recommended to stop USB or ect..(i never do it)
flashing trough GUI, will stop few services in order to flash...CLI flash it not always safe, but works...there are few other ways to CLI flash or serial or TFTP so many of those...

_________________
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
par13del
DD-WRT Novice


Joined: 19 May 2023
Posts: 45

PostPosted: Sun Jun 04, 2023 21:43    Post subject: Reply with quote
Router: R7000
Firmware: DD-WRT v3.0
File: R52869
Kernel: Linux 4.4.302-st40
Previous: R52720
Reset: Before and After Upgrade via Web GUI
Mode: Gateway, AP, Router behind ISP Router
Status: Operational with Wireguard, uptime 2hrs

No issues so far, more testing required.
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5660

PostPosted: Mon Jun 05, 2023 8:30    Post subject: Reply with quote
Tectonic Plates wrote:
Can you please review if this is the correct commands for Netgear R7000.
Yes webflash is the correct file and write netgear-r7000-webflash.bin linux is correct and anything extra is overkill.
Never lost terminal, also never suddenly wanted to exit or log out. Stopped counting somewhere over 200 flashes.

If you are really concerned about it just rename to firmware.bin, and then wait for some automated dd-wrt magic.
Code:
mv netgear-r7000-webflash.bin firmware.bin

If you want to download directly to save the file as firmware.bin, use the lower case -o option or -output with curl.
Code:
curl -o firmware.bin https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2023/06-02-2023-r52869/netgear-r7000/netgear-r7000-webflash.bin
kernel-panic69
DD-WRT Guru


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

PostPosted: Mon Jun 05, 2023 20:04    Post subject: Reply with quote
Both the manual cli write process and webUI process have been patched to fix certain issues with upgrades. I have not experienced any disconnections over wired, but have not completely tested over wi-fi. The thing with using the ampersand (&) at the end of `write filename linux` is that you have no output to let you know when it is finished. Keep in mind, @frater's script is what contributed to certain things regarding patches to write, internal auto-upgrade, and webUI upgrade processes, if I am not mistaken. Plenty of enhancements over the years since 2009.

Considering both Flashing DD-WRT in Asus RT-N18U using Ash shell commands and FYI: Command line upgrades via SSH will no longer work threads, you could always do this to avoid possible issues if you do not use webUI or auto-upgrade options (change download location and filename to suit router model, of course):

For devices equipped with curl

Code:
cd /tmp
curl -O https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2023/06-02-2023-r52869/netgear-r7000/netgear-r7000-webflash.bin
nohup write netgear-r7000-webflash.bin linux && cat nohup.out
reboot


For devices without curl

Code:
cd /tmp
wget http://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2023/06-02-2023-r52869/netgear-r7000/netgear-r7000-webflash.bin
nohup write netgear-r7000-webflash.bin linux && cat nohup.out
reboot


You can also skip using nohup and use

Code:
write netgear-r7000-webflash.bin linux && tail -f /var/log/messages


You're welcome, thank you and come again.

_________________
"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
Alozaros
DD-WRT Guru


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

PostPosted: Mon Jun 05, 2023 20:33    Post subject: Reply with quote
Yep now you can see the picture...lots of different ways for flash procedure...and there is wiki too..
at the end of the day, all those will serve the purpose...
lots of other details, as the other GURU's explained...suggested...announced...too

Off the record, i had a couple flashes via SSh over WAN, that something went wrong and i lost connection with the unit...ever since i use &, in my case...it saved the day...
I still do have 3 units that i administer or flash over WAN .. Razz

yes in the past flashing with & used to end the flash procedure with no report and you had to hit return to get the report..on the new builds, its fixed now..

Just to add if your device doesn't have enough free ram...CLI flash is not recommended..
you can always check while in cli mode with top command...even if you have a mounted USB and you have your file there, instead of /tmp directory you still must to have enough free ram in order to successfully flash..

_________________
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
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1899

PostPosted: Mon Jun 05, 2023 21:25    Post subject: Reply with quote
You could probably alternatively use:

Code:
nohup write netgear-r7000-webflash.bin linux & tail -f nohup.out


Would make life a little more easier. Regarding flashing over WAN, that is probably something to consider, since there is always a possibility that WAN (possibly) does get sent down during the write process. Only one way to find out in current releases <wink>

_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
Tectonic Plates
DD-WRT User


Joined: 02 Oct 2012
Posts: 65
Location: Canada

PostPosted: Mon Jun 05, 2023 22:38    Post subject: Reply with quote
Hi gentleman,

Sorry for hijacking the firmware update log for my off-topic question about CLI flash methodology. I didn't expect there would be that many answers. If you think the CLI flash method should be moved to a separate post, please let me know.

For now still a question

blkt wrote:
If you are really concerned about it just rename to firmware.bin, and then wait for some automated dd-wrt magic.
Code:
mv netgear-r7000-webflash.bin firmware.bin



I assume that when DD-WRT sees a file /tmp/firmware.bin, it will trigger itself a flash? If so, when would that occur? (within a minute?) Would there be any progression output in the SSH terminal?

Other members didn't discuss too much about the rename to firmware.bin. Is it b/c this practice is less popular or has some inconveniences?


Last edited by Tectonic Plates on Tue Jun 06, 2023 2:57; edited 1 time in total
kernel-panic69
DD-WRT Guru


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

PostPosted: Mon Jun 05, 2023 22:41    Post subject: Reply with quote
DD-WRT checks for presence of "firmware.bin" in /tmp and automatically runs a firmware update process for you, and you have to `tail -f /var/log/messages` as alluded to already. Rolling Eyes
_________________
"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
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1899

PostPosted: Mon Jun 05, 2023 23:12    Post subject: Reply with quote
Tectonic Plates wrote:
Other members didn't discuss too much about the rename to firmware.bin. Is it b/c this practice is less popular or has some inconveniences?


I'm being a lazy bitch, but one example of it being "discussed" in the past:

New Build - 07/30/2022 - r49599
mrjcd wrote:
Linksys E2500
DD-WRT v3.0-r49599 mega (07/30/22)
Linux 4.4.302-st14 #17676 Sat Jul 30 05:29:32 +07 2022 mips
scp 'firmware.bin' (dd-wrt.v24-49599_NEWD-2_K3.x_mega.bin) install over r49566
Code:
mrjcd@Will-Be-Was:~$ scp firmware.bin root@Volus-E2500.mrjcd.com:/tmp
DD-WRT v3.0-r49566 mega (c) 2022 NewMedia-NET GmbH
Release: 07/26/22
Board: Linksys E2500
firmware.bin                                                              100% 7424KB 833.3KB/s   00:08   
mrjcd@Will-Be-Was:~$
uptime 'bout 17 minutes -- all ok

People use the convenience of the automatic process all the time.

_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Tue Jun 06, 2023 4:38    Post subject: Reply with quote
kernel-panic69 wrote:
DD-WRT checks for presence of "firmware.bin" in /tmp and automatically runs a firmware update process for you, and you have to `tail -f /var/log/messages` as alluded to already. Rolling Eyes

When would it happen? During startup? Anytime?

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1899

PostPosted: Tue Jun 06, 2023 5:16    Post subject: Reply with quote
It (constantly) checks for the presence of the file every minute, 24/7 essentially. Why are we remediating on a years and years old feature of this firmware?

https://github.com/mirror/dd-wrt/blob/master/src/router/rc/check_ps.c#L311

_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Tue Jun 06, 2023 8:30    Post subject: Reply with quote
dale_gribble39 wrote:
It (constantly) checks for the presence of the file every minute, 24/7 essentially. Why are we remediating on a years and years old feature of this firmware?

https://github.com/mirror/dd-wrt/blob/master/src/router/rc/check_ps.c#L311

Could this polling be turned off via NVRAM?

Isn't it a bit dangerous? Imagine someone doing 'ln -s /dev/random /tmp/firmware.bin'!!! This hidden, automatic process MUST be managed. Smile

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
kernel-panic69
DD-WRT Guru


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

PostPosted: Tue Jun 06, 2023 17:26    Post subject: Reply with quote
Can you read the function's code? Are you asking a rhetorical question?

Code:
nvram set flash_active=0
nvram commit
reboot


And we're still discussing in a discussion that's already been discussed.
This community amazes me.

_________________
"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
Goto page Previous  1, 2, 3  Next Display posts from previous:    Page 2 of 3
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC 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 can attach files in this forum
You can download files in this forum