easyddup a simple upgrade/downgrade utility

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


Joined: 17 Jun 2006
Posts: 889

PostPosted: Mon Sep 26, 2022 10:17    Post subject: Reply with quote
The latest firmware for my router, Asus AC68U, is not found by easyddup.
Had to use the 'normal' CLI procedure i.e curl -O etc

_________________
Netgear R7000 on Build 55109
Asus AC-AC68U rev. C1 (AP) on Build 55109
Asus AC-68U rev. A1 on Build 54604
Asus AC-68U rev. A1 on Build 53339
Sponsor
IONK
DD-WRT Guru


Joined: 19 Aug 2011
Posts: 951

PostPosted: Mon Sep 26, 2022 10:24    Post subject: Reply with quote
wabe wrote:
The latest firmware for my router, Asus AC68U, is not found by easyddup.
Had to use the 'normal' CLI procedure i.e curl -O etc
What's the output of "nvram get DD_BOARD"?
_________________
▫ RSS feed for DD-WRT releases (2024): https://rsseverything.com/feed/7d36ab68-7733-46c3-bd8a-9c54c5cef08c.xml
easyddup - A simple upgrade/downgrade utility by yoyoma2 --- as featured in 📌 Reference Links, stickies retired back to forum (Moderator's Pick 🌟)
wabe
DD-WRT Guru


Joined: 17 Jun 2006
Posts: 889

PostPosted: Mon Sep 26, 2022 13:26    Post subject: Reply with quote
IONK wrote:
wabe wrote:
The latest firmware for my router, Asus AC68U, is not found by easyddup.
Had to use the 'normal' CLI procedure i.e curl -O etc
What's the output of "nvram get DD_BOARD"?

I’ll check later but the most recent build wasn’t picked up on my R7000 either. Have worked flawless until now

_________________
Netgear R7000 on Build 55109
Asus AC-AC68U rev. C1 (AP) on Build 55109
Asus AC-68U rev. A1 on Build 54604
Asus AC-68U rev. A1 on Build 53339
IONK
DD-WRT Guru


Joined: 19 Aug 2011
Posts: 951

PostPosted: Mon Sep 26, 2022 13:28    Post subject: Reply with quote
wabe wrote:
IONK wrote:
wabe wrote:
The latest firmware for my router, Asus AC68U, is not found by easyddup.
Had to use the 'normal' CLI procedure i.e curl -O etc
What's the output of "nvram get DD_BOARD"?

I’ll check later but the most recent build wasn’t picked up on my R7000 either. Have worked flawless until now
What's the output when you run easyddup on your R7000?
_________________
▫ RSS feed for DD-WRT releases (2024): https://rsseverything.com/feed/7d36ab68-7733-46c3-bd8a-9c54c5cef08c.xml
easyddup - A simple upgrade/downgrade utility by yoyoma2 --- as featured in 📌 Reference Links, stickies retired back to forum (Moderator's Pick 🌟)
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 371

PostPosted: Mon Sep 26, 2022 14:31    Post subject: Reply with quote
I posted on the "General Questions" forum that the "Other Downloads" link is missing the newest builds.

Make sure you use an easyddup version dated December 10th 2021 or newer. After that, "Other Downloads" is used as the secondary download location and this problem wouldn't show up. The newest easyddup can even be setup to auto-update itself.

Thanks for the bug report.
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5660

PostPosted: Tue Sep 27, 2022 17:21    Post subject: Reply with quote
Other Downloads is static and all files link directly to download1.dd-wrt.com so best to source directly HTTPS or FTP.
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1899

PostPosted: Tue Sep 27, 2022 18:11    Post subject: Reply with quote
This is why I removed the other downloads from main website logic from things in development for webUI. It's unreliable and requires human intervention.
_________________
"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: Mon Oct 24, 2022 0:04    Post subject: Reply with quote
What would the segmentation fault at the end be about? The /opt partition is on a thumbstick and it is writeable.

root@R7800:/opt/easyddup# ./nvram-save.sh

nvram-save.sh: NVRAM User Save Utility - Version 26.3
nvram-save.sh: Saving settings from firmware 50595
nvram-save.sh: Using standard NVRAM variable file: nvram-dd-wrt.ini Version=26.3
nvram-save.sh: Running in Backup Mode

Saving [Setup - Basic Setup]
Saving [Setup - DDNS]
Saving [Wireless - Basic Settings]
Saving [Wireless - Wireless Security]
Saving [Services - Services]
Saving [Services - VPN]
Saving [Services - USB]
Saving [Services - NAS]
Saving [Services - Adblocking]
Saving [Access Restrictions - WAN Access]
Saving [NAT / QoS - Port Forwarding]
Saving [NAT / QoS - QoS]
Saving [Administration - Management]
Saving [Administration - Keep Alive]
Saving [Administration - Commands]
Segmentation fault
root@R7800:/opt/easyddup#

My current installation of easyddup doesn't do a backup of /jffs.
It has worked before as I had three old jffs backups on the stick made by easyddup.
I've just copied the unpacked files to the easyddup directory and changed nothing.

Oh, I have to prefix the script names with ./ to run them in an sh session. I am used to it, but wonder why the prefix is missing from the commands in the instructions.
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 371

PostPosted: Mon Oct 24, 2022 4:51    Post subject: Reply with quote
Append -x to the first line of nvram-save.sh so it looks like:
Code:
#!/bin/sh -x

It will run in debug mode which is hard to read but should tell us which command is causing the segmentation fault.

On dd-wrt I add a dot to the path at boot so scripts in the current directory run without the ./ prefix. Some say this isn't a great idea: here.
Code:
# cat .profile
export PATH=$PATH:.

You can store the .profile file on the thumbdrive and copy it to /tmp/root in Administration->Commands->Startup
Code:
cp /your/thumbdrive/path/.profile /tmp/root
ArjenR49
DD-WRT Guru


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

PostPosted: Mon Oct 24, 2022 8:07    Post subject: Reply with quote
yoyoma2 wrote:
Append -x to the first line of nvram-save.sh so it looks like:
Code:
#!/bin/sh -x

It will run in debug mode which is hard to read but should tell us which command is causing the segmentation fault.


last lines of the debug output:

...
eval mount -o noatime \\$Device\$i \\$MountPoint\$i || eval logger -t --- \"ERROR Mounting \\$Device\$i\"
fi
done
logger -t --- \"End of \$0 script.\"'
Segmentation fault
root@R7800:/opt/easyddup#

Immediately above the line with 'Segmentation fault' I recognize the last lines of my startup script.

The nvram-restore* scripot written ends in:

echo "Restoring [Administration - Keep Alive]"
($op || grep -q "schedule_enable" $tmpfile) && $(nvram set schedule_enable="0") || echo -e "\tSkipping schedule_enable"
($op || grep -q "schedule_hour_time" $tmpfile) && $(nvram set schedule_hour_time="1") || echo -e "\tSkipping schedule_hour_time"
($op || grep -q "schedule_time" $tmpfile) && $(nvram set schedule_time="3600") || echo -e "\tSkipping schedule_time"
($op || grep -q "schedule_hours" $tmpfile) && $(nvram set schedule_hours="0") || echo -e "\tSkipping schedule_hours"
($op || grep -q "schedule_minutes" $tmpfile) && $(nvram set schedule_minutes="0") || echo -e "\tSkipping schedule_minutes"
($op || grep -q "schedule_weekdays" $tmpfile) && $(nvram set schedule_weekdays="00") || echo -e "\tSkipping schedule_weekdays"

echo "Restoring [Administration - Commands]"

It looks to me the nvram-save script crashed when it was supposed to read and write the dd-wrt command scripts.
This is based on my understanding/assumptions of how nvram-save works. The code is hard to follow.
the-joker
DD-WRT Developer/Maintainer


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

PostPosted: Mon Oct 24, 2022 9:10    Post subject: Reply with quote
Its easier to run the script with debug bash|sh -x <scriptname> You also have set -x or set +x and further you have -v which can be done as bash|sh -xv <scriptname>

e.g. reference https://linuxconfig.org/how-to-debug-bash-scripts

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


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

PostPosted: Mon Oct 24, 2022 12:58    Post subject: Reply with quote
Thanks. However, the output with -xv was the same as with just -x.
Execution stops right after the fault.
No extra information to be seen. There are an awful lot of output lines and i cannot even find the start, where the command was entered. The terminal buffer isn't full, at the top there's old output.

I've used set -x and set +x before around a portion of a shell script with rsync to have the whole script not stop/crash when some files have gone missing, but go on to the next rsync commands, despite possible errors in the earlier step.

The segmentation fault apparently cannot be ignored despite the -x.
I hope the maker has an idea where in the nvram-save.sh script it happens from looking at where the output in nvram-restore.sh ends.
the-joker
DD-WRT Developer/Maintainer


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

PostPosted: Mon Oct 24, 2022 13:13    Post subject: Reply with quote
You can in addition pipe the -x output to file and attach that to the reply instead of pasting what you think is needed to debug. any obvious entries that are private info you should just replace with something harmless. But generally the whole lot is better than just a segment.
_________________
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)
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 371

PostPosted: Mon Oct 24, 2022 13:41    Post subject: Reply with quote
ArjenR49 wrote:
It looks to me the nvram-save script crashed when it was supposed to read and write the dd-wrt command scripts.
Agreed. Try commenting out with # individually variables rc_startup and rc_shutdown in file nvram-dd-wrt.ini to see who's the culprit (probably rc_startup).

I use a single line /opt/bin/myStartup.sh in rc_startup and that script file hides all my hacks and tweaks and gets backed up through my regular scheduled backups. It also saves nvram space.

My guess is a recent tweak in your dd-wrt startup commands has uncovered a bug/limitation in nvram-save.sh. I'm not the author of nvram-save.sh as stated in the OP but if you narrow down what command in rc_startup causes the failure I could try to fix it.

BTW easyddup run's on busybox's ash and installing bash isn't required. That actually complicated the menu code as ash doesn't have arrays like bash.

Thanks for the detailed bug report.
ArjenR49
DD-WRT Guru


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

PostPosted: Mon Oct 24, 2022 14:53    Post subject: Reply with quote
Couldn't leave without a quick try since everything was ready for testing.
The culprit is the startup script.
It's pretty long.

I will try and narrow down the offending lines later. It changes often ...

Thank you so much for your help.
I have noticed before dd-wrt has ash. It has quite different syntax in some cases.
Today I used bash after theJoker suggested it, but it was already installed (optware/Entware likely).
Goto page Previous  1, 2, 3 ... 15, 16, 17 ... 19, 20, 21  Next Display posts from previous:    Page 16 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