How to: Maintain router settings through a firmware update.

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
kallsop
DD-WRT User


Joined: 10 Apr 2008
Posts: 135

PostPosted: Fri Jul 22, 2016 15:30    Post subject: How to: Maintain router settings through a firmware update. Reply with quote
*** 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.



tfr2.zip
 Description:

Download
 Filename:  tfr2.zip
 Filesize:  1.28 KB
 Downloaded:  96 Time(s)

Sponsor
Display posts from previous:    Page 1 of 1
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