easyddup a simple upgrade/downgrade utility

Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload
Goto page Previous  1, 2, 3 ... 18, 19, 20, 21  Next
Author Message
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 666
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Wed Aug 23, 2023 18:40    Post subject: Reply with quote
I can confirm that putting EDDUP_DISABLE_HTTPS=Y in easyddup.ini before upgrading avoids the error message.
The subsequent (manually initiated) upgrade on my R7800 went just fine.

...
BusyBox v1.36.1 (2023-08-21 04:12:47 +07) built-in shell (ash)

root@R7800:~# cd /opt/easyddup
root@R7800:/opt/easyddup# checknewversion.sh
Upgrading easyddup from version 0.9.2 to version 0.9.3
Getting latest easyddup package from dd-wrt forum.
Installing and running new easyddup version 0.9.3
root@R7800:/opt/easyddup# easyddup.sh

All dd-wrt upgrade builds available online for 2023

1) 08-21-2023-r53396 <--- current

Current build: 53396
Select a build to install (or Q): q
Quitting
root@R7800:/opt/easyddup#

...

I had already installed r53396 in the GUI this morning or yesterday. Download using web page worked fine before I deleted the security exception which I had already forgotten about ...

Thanks yoyoma2!
Sponsor
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 373

PostPosted: Wed Aug 23, 2023 22:52    Post subject: Reply with quote
Perfect. Thanks for the detailed feedback ArjenR49!
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 373

PostPosted: Tue Aug 29, 2023 14:38    Post subject: Reply with quote
The certificate on the server is valid again. Anyone who has EDDUP_DISABLE_HTTPS=Y in easyddup.ini should set it to N or delete/comment it out to start using https again.
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 666
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Fri Oct 20, 2023 10:41    Post subject: Reply with quote
SSH terminal output while using easyddup to upgrade my R7800 from previous build 53708 to 53714:

root@R7800:/opt/easyddup# easyddup.sh

All dd-wrt upgrade builds available online for 2023

1) 10-19-2023-r53708 c <--- current
2) 10-20-2023-r53714

Current build: 53708
Select a build to install (or Q): 2
Selected 10-20-2023-r53714

Files in build 10-20-2023-r53714 for Netgear R7800

1) dd-wrt-webupgrade.bin
2) factory-to-ddwrt.img

Select a firmware file to install (or Q): 1
Selected dd-wrt-webupgrade.bin
Build not in local cache or -f option, downloading...
Downloading http://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2023/10-20-2023-r53714/netgear-r7800/dd-wrt-webupgrade.bin ...

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 29.3M 100 29.3M 0 0 4320k 0 0:00:06 0:00:06 --:--:-- 4364k
Downloaded file OK.

WARNING THIS COULD BRICK YOUR ROUTER!!!

File to burn: ./fwcache/10-20-2023-r53714/netgear-r7800/dd-wrt-webupgrade.bin
Are you sure? Type YES to burn upgraded firmware: YES
Erase nvram y/n ? n
Save user settings restore point y/n ? y
Saving user settings restore point...
Burning ./fwcache/10-20-2023-r53714/netgear-r7800/dd-wrt-webupgrade.bin
WARNING: DO NOT INTERRUPT...
WAIT FOR BURN TO COMPLETE (at least 5 minutes)
Done burning
Rebooting...
./easyddup.sh: line 519: /sbin/reboot: I/O error
root@R7800:/opt/easyddup#
root@R7800:/opt/easyddup#

Situation now:
The router is running,
GUI renew results in error 404

Haven't yet looked at the script and its line 519, also not yet tried to reboot the R7800 via the still running SSH session. Saved the output as above and will then continue to find out what damage, if any.
The router has entware on a USB2 thumbdrive, which mounted fine last time I looked after the previous upgrade to build 53708, and was accessible via samba.
Glad I didn't just lose connection ....
Let's see what happens next ...

LATER:
Something fishy:
root@R7800:/opt/easyddup# ls -la /sbin/re*
-sh: ls: I/O error
root@R7800:/opt/easyddup#

root@R7800:/opt/easyddup# reboot
-sh: /sbin/reboot: I/O error
root@R7800:/opt/easyddup#

root@R7800:/opt/easyddup# cd /jffs
root@R7800:/jffs# ls -la
-sh: ls: I/O error
root@R7800:/jffs# cd /opt
root@R7800:/opt# ls -la
-sh: ls: I/O error
root@R7800:/opt#

root@R7800:/opt# cd
root@R7800:~# reboot
-sh: /sbin/reboot: I/O error
root@R7800:~# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/jffs/sbin:/jffs/bin:/jffs/usr/sbin:/jffs/usr/bin:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin:.
root@R7800:~# ls -la /bin
-sh: ls: I/O error
root@R7800:~#

So I couldn't reboot the router via the terminal.
Forgot to try and unmount the thumbdrive partitions. They were not working properly anyway.

I pulled the thumbdrive before switching the R7800 off. Both partitions were in need of repair, which I assume means that they were 'dirty' because of the removal without unmounting.

After repairing both partitions on my Linux workstation, I powered the R7800 on again with the thumbdrive inserted. It started up in build 53714.

I have a Pi server collecting the router's syslog and saw that after the flashing, the router indeed just appeared to continue as indeed it did.

It seems to be fine now.
The sudden I/O errors are worrying, but at the moment I have no idea how to approach the problem.
Before I leave this location at the end of next month it would be desirable to get the router running reliably again ...
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 373

PostPosted: Fri Oct 20, 2023 13:42    Post subject: Reply with quote
It seems the writing of the new firmware went fine. No idea why the root partition and others would suddenly give I/O errors. There's a file /tmp/flash.err that is generated by easyddup during the writing of the firmware to flash memory (/tmp/ doesn't persist after reboot however) but it's usually empty.

You could try to downgrade to one of the 10 most recent versions (cached ones you know worked) and re-upgrade to r53714 and see if it was just a peculiar thing about r53708 that you were on previously.

easyddup.sh -d -m 10

Some busybox commands are in RAM but reboot isn't so filesystem access is required. I used to have my dd-wrt in a different building and had it plugged into a basic APC PDU so if I couldn't login I could power cycle dd-wrt without physically going there.
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 666
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Fri Oct 20, 2023 16:18    Post subject: Reply with quote
yoyoma2 wrote:
Some busybox commands are in RAM but reboot isn't so filesystem access is required. I used to have my dd-wrt in a different building and had it plugged into a basic APC PDU so if I couldn't login I could power cycle dd-wrt without physically going there.


I guess your APC PDU power cycle is kin to what I attempted with a smart power plug.
I noticed one can define an OFF and an ON event and these will be executed even if the plug looses its WiFi and internet connection. It turned out that not all smart plugs are created equal and the one I used at first wouldn't reconnect once WiFi is available again.
I dropped the project for a while, but changed the smart plug for a different one of the same brand but from a different batch. I threw the unreliable one out.
Sometimes my router doesn't start up properly after a power disconnect, so all in all it's too unreliable. When I am away, I am at 1500 km from here, but this location has my off-site backup and in fact runs that show, because it is on a CG LAN and I cannot get in from the other location.

Re the flashing. Yes, it flashed fine, but the reboot command had become unavailable. A show stopper. However, as to why, I have no idea. I'll wait to see if it happens again.

There are things I could do, like resetting and entering all settings again, or I could assume that this router has gone bad (?) and replace it with a newer R7800 I have.
Currently I am dabbling in ADS-B but try to not 'work' (hobby) too late, so I take my chances with the router for now. It's working although QoS is nonexistant since a recent upgrade (or the CG LAN has gone bad).
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1958

PostPosted: Fri Oct 20, 2023 18:15    Post subject: Reply with quote
Would it be possible for easyddup to use the alternative automatic CLI flashing method that saves the file as /tmp/firmware.bin so it works without having to use the reboot command?
_________________
"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
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 666
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Fri Oct 20, 2023 18:37    Post subject: Reply with quote
Currently my R7800 has a shutdown script which unmounts /jffs and /opt and then checks and if needed repairs the partitions:

echo "$0: " $(/bin/date) >> /jffs/command_scripts/shutdown.log

# Make sure working directory isn't on a thumbdrive partition before unmounting
cd /

# Stop Entware (~Optware) ...
# all its init scripts are located in /opt/etc/init.d including symlinks
logger -t $0 "Stop Entware"
/opt/etc/init.d/rc.unslung stop

logger -t $0 "Stop mDNS & SAMBA service"
# before unmounting USB thumbdrive partitions
service mdns stop
service samba3 stop

# Unmount & check thumbdrive partitions
umount /jffs
logger -t $0 "'umount /jffs' - exit code: $?"
umount /opt
logger -t $0 "'umount /opt' - exit code: $?"
# 'Preen' partitions
e2fsck -p /dev/sda1
logger -t $0 "'e2fsck -p /dev/sda1' - exit code: $?"
e2fsck -p /dev/sda2
logger -t $0 "'e2fsck -p /dev/sda2' - exit code: $?"

The right moment to repair 'dirty' partition file systems (as caused by suddenly disconnecting power) would, of course, be during startup.

However, I haven't found out how to do that without breaking dd-wrt startup.

The partitions are mounted automatically by dd-wrt itself. The execution of the startup command script is delayed by a routine written by egc, which makes the script wait for the two partitions to be mounted before continuing script execution. That is because the startup script next copies files from /jffs to /tmp/root. (I sometimes edit the files, and do that in /jffs).
The actual mounting is not controlled by the startup commands script.

I would have to unmount the partitions in the course of the startup command script before I can run e2fsck on them, but I fear doing so would totally derail the dd-wrt startup process.

It is not really satisfactory to have the router not check and repair the partitions left 'dirty' from a power cut (power button or otherwise).
I am not always present to pull the thumbdrive and do the repair on my workstation. If the router would always start up reliably despite the partition fs's being 'dirty', there wouldn't be a problem, but it doesn't. Sometimes it hangs and then it will not obey any keep alive settings intended to save the day, either.

Do you perhaps have any fresh ideas?
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 666
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Sun Oct 22, 2023 13:59    Post subject: Reply with quote
Same error has now been described by others:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1291655#1291655
kernel-panic69
DD-WRT Guru


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

PostPosted: Sun Oct 22, 2023 14:12    Post subject: Reply with quote
This should be tested if the reboot is part of easyddup script(s):
Alozaros wrote:
Ive found the cure: Razz
this will immediately reboot the system...

echo b > /proc/sysrq-trigger

_________________
"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
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 373

PostPosted: Sun Oct 22, 2023 15:04    Post subject: Reply with quote
kernel-panic69 wrote:
This should be tested if the reboot is part of easyddup script(s):
Alozaros wrote:
Ive found the cure: Razz
this will immediately reboot the system...

echo b > /proc/sysrq-trigger

Thanks for all the suggestions. If someone can get into the state where /sbin/reboot gives an I/O error, what's the output of these commands so easyddup can detect it and fallback to Alozaros' command:

ls -l /sbin/reboot
/sbin/reboot ; echo $?

The /tmp/firmware.bin method might work but seems like a bigger change given the years of testing with the current method.
kernel-panic69
DD-WRT Guru


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

PostPosted: Sun Oct 22, 2023 18:17    Post subject: Reply with quote
Are you asking for post-flash (write filename linux, etc.) output? I have not done CLI flash on my 3200, but I can do some reading up on the specifics if an alpha at the current head drops for it and post results.
_________________
"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
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 373

PostPosted: Sun Oct 22, 2023 20:11    Post subject: Reply with quote
Yes I was asking for post flash so I could use the normal reboot command if it's working and that special echo command if it's not. I hope to figure out how to detect that reboot isn't working from the script.

Hmmm come to think of it the "Restoring basic settings..." feature also wouldn't work if restore-mynvram.sh can't be accessed in this state.
kernel-panic69
DD-WRT Guru


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

PostPosted: Sun Oct 22, 2023 20:39    Post subject: Reply with quote
Without reading too far back, seems that the issue may be related to user shutdown scripts and not normal CLI flashing procedure, or not. I'm waiting to see an alpha drop on the private test server to investigate on my end.
_________________
"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
kernel-panic69
DD-WRT Guru


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

PostPosted: Mon Oct 23, 2023 13:49    Post subject: Reply with quote
Sorry, alpha went beta and I didn't CLI flash to test. There is, however, this to consider as well:

ArjenR49 wrote:
Upgraded my R7800 from build 53714 to 53734 half an hour ago using easyddup.
Had to resort to the Linux Magic System to reboot:
echo b > /proc/sysrq-trigger

Rebooted using the GUI a few times after that. The Magic reboot had left one of the thumbdrive partitions 'dirty' judging from result of the e2fsck check in my shutdown command script (rsyslog).

If this is going to be the new routine, it should be helpful to precede the boot trick with:
echo s > /proc/sysrq-trigger
echo u > /proc/sysrq-trigger
for sync and unmount ...

_________________
"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 ... 18, 19, 20, 21  Next Display posts from previous:    Page 19 of 21
Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload 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