Posted: Thu Jan 20, 2022 0:28 Post subject: Re: easyddup a simple upgrade/downgrade utility
Thanks, this is really useful!
WARNING: This is a beta version (updating firmware by any method has some risks).
Former Kong users know ddup. Here is easyddup, written from scratch, for BrainSlayer builds.
o Menu driven firmware download
o Secure https firmware download
o Automatic hardware identification (usually: see -r option)
o Caching of previous downloads
o Option to erase nvram or not
o Preserve basic settings (LAN and username/password)
o Possibity to save & automatically restore user settings
o Possibity to get email notifications of new builds
o Supports FAT and ext USB storage
o In place installation even if subnet not 192.168.1.x
o Store some basic settings in an ini file
o Multi-part setting for faster curl downloads
HELP NEEDED: The file nvram-dd-wrt.ini lists the user settings variables that are stored in the restore point. When you find settings that you regularly enter manually that are missing let me know and I'll add them or better yet make the changes and I'll integrate them. There will be a lot missing at first...
Uses a modified version of this no longer maintained project. That project seemed to be quite a time saver as discussed here. The included QuickStart.txt file is from that project.
Used multipart curl download script from here and the progress reporting from here.
Got the basic idea and 50% of the easyddup name from Kong's ddup but no code.
Easy ddd-wrt update Utility
easyddup.sh Version 0.9
Options: -h this help msg
-c Return count of available versions (does nothing)
-d Downgrade (default is to upgrade)
-f Force download even if build is cached
-m maxcount Search at most maxcount versions ahead/behind current
-n No firmware will be written but everything else is done
-p cache Path to local build cache (default ./fwcache)
-q Quiet (use with -c to check for updates silently)
-r rev Specify revision folder suffix (BRICK DANGER!!!)
-R rev Opposite of -r, revision suffix to strip
-w wipe individual cache items or -W to wipe all
-y xxxx Use year xxxx (default is current year)
mkdir -p /path/to/where/easyddup/subdirectory/is/wanted
cp /my/downloads/easyddup.tgz .
tar zxvf easyddup.tgz
The easyddup subdirectory is created and contains the required files.
You should already have a BrainSlayer build installed. (can sort of work from Kong).
You need USB storage so beginners might want to read this guide.
To restore user settings:
After initial reboot, enable USB support and run nvram-restore-latest.sh or the restore script with the date/time of your choice. Reboot and your settings are back.
o You can answer q to any prompt to quit
o Read the warning about passwords in QuickStart.txt
o Turning on multi-part curl may speed up downloads considerably
Posted: Sun May 15, 2022 17:18 Post subject: easyddup
willing to try this, but want to make sure my settings are intact after.
1. does it automatically restore the settings?
2. does it save and restore my wiregaurd setup?
3. will it upgrade from 32bit version and choose a 64bit version as one router I have is a an ap/client bridge and using a 32bit version.
I have saved off my oet nvram settings just in case and hope that is all I need to reload if it all goes wrong.
1. easyddup will ask if you want to erase nvram. If you say no, then your settings are maintained. Don't say yes unless nvram-save is confirmed to save/restore all the settings you care about (see below).
2. easyddup uses nvram-savediscussed here to save some settings to a script. You have to run that generated script to restore those settings. The wireguard settings variables are not in the provided sample nvram-dd-wrt.ini.sample yet but they could be added.
3. You can use the easyddup -n argument to go through the motions to see which build is downloaded but no upgrade will be performed.
Note: nvram-save can be run independently of easyddup to add missing variables to nvram-dd-wrt.ini.
1) create a dd-wrt backup
2) run nvram-save
3) change/delete some/all settings
4) run the new restore script
5) check for missing GUI settings
6) Add missing variables to nvram-dd-wrt.ini and goto 2
7) If you give up or have problems restore backup from 1
Try running easyddup.sh -n to see if you can get the version you want (with -n nothing is done so you can play with it harmlessly). If the automatic hardware detection doesn't guide you to the version you want (64bit), look at easyddup.ini.sample for the lines below where you can force a specific folder in your easyddup.ini from this list.
If you confirm that you can delete the tunnel from the GUI and later run the nvram-restore script and things work after reboot, I'll add your [Setup - Tunnels] section to the nvram-dd-wrt.ini.sample file.
Hi if I choose option (2) netgear-r8000-webflash.bin
it says it going to burn "factory-to-dd-wrt.chk" is that normal should it not be the bin?
Current build: 47381
Select a build to install (or Q): 49
Files in build 07-09-2022-r49467 for Netgear R8000
1) factory-to-dd-wrt.chk c
Select a firmware file to install (or Q): 2
Using locally cached file.
WARNING THIS COULD BRICK YOUR ROUTER!!!
File to burn: ./fwcache/07-09-2022-r49467/netgear-r8000/factory-to-dd-wrt.chk
Erase nvram y/n ? n
Save user settings restore point y/n ? y
Saving user settings restore point...
WARNING: DO NOT INTERRUPT...
WAIT FOR BURN TO COMPLETE (at least 5 minutes)
Skipping firmware burn.
I haven't received any reports of routers bricked by easyddup yet. The easyddup line that writes the firmware was heavily inspired from kong's ddup and thus has many years of proven reliability.
You'll find many experts around here like to login and upgrade from the command line. Some recommend specific browsers with absolutely no extensions installed if you go the browser route.
As for erasing NVRAM (resets and loses settings) it depends how old of a build you are coming from. If it's fairly recent, say N when easyddup asks you if you'd like to erase NVRAM.
The settings variables saved/restored by easyddup's nvram-save utility have not been updated in a while so it's likely not all settings will come back. You will however have a human readable full backup of your NVRAM.