kallsop DD-WRT User
Joined: 10 Apr 2008 Posts: 135
|
Posted: Fri Jul 22, 2016 15:30 Post subject: How to: Maintain router settings through a firmware update. |
|
*** At your own risk. It worked for me. ***
What this is: a method to first read nvram settings on the router and create a script which will restore those settings. Then nvram erase. Then update the router firmware. Then nvram erase. Then run the created script to restore nvram. Then reboot the router.
Credit to Brianwuz for the initial scripts, which I modified to make work.
This assumes that files will be written/read to/from the router via ftp, so there needs to be an ftp server, and the tfr2.sh script will need modifying to the ftp user, password, IP address. I used Filezilla Server on my PC for the ftp server, created an account 'router' with password 'router' at LAN address 192.168.0.101. The files in the attached zip are put into the PC home directory of the ftp user account.
In a router telnet or ssh session with user 'root', do:
Code: |
ftpget -u router -p router 192.168.0.101 tfr2.sh tfr2.sh
ftpget -u router -p router 192.168.0.101 vars_to_skip vars_to_skip
chmod +x tfr2.sh
sh tfr2.sh
|
Look on the ftp server for the 3 files created: all.sh, dangerous.sh, essential.sh. Open in an editor and do a sanity check on them.
Then the router can nvram erase, update firmware, nvram erase. Then start telnet or ssh session and run one of the 3 scripts per your preference e.g.
Code: |
ftpget -u router -p router 192.168.0.101 essential.sh essential.sh
chmod +x essential.sh
sh essential.sh
|
Reboot the router. Done. YMMV.
Description: |
|
Download |
Filename: |
tfr2.zip |
Filesize: |
1.28 KB |
Downloaded: |
96 Time(s) |
|
|