HELLO_wORLD
Very Senior Member
I already mentioned all of that, but since it is buried in the middle of the thread about the recurring factory reset problems, I open this thread dedicated only to the utility.
I made a little script called nvram-utils.
To install:
Usage:
That’s it. I threw that quickly without much testing. It is basic and to help people having the settings reset at reboot or restore from web GUI problem.
Thanks to @kamoj who helped with the boot fix.
To install the boot fix (init.d and rc.d) to restore saved settings from backup at early boot stage.
PS : tinyurl link `https://tinyurl.com/nvram-utils` is sending here: `https://raw.githubusercontent.com/bolemo/nvram_utils/master/nvram_utils`
If you don’t want to use tinyurl, use this instead of point 3 of install procedure:
Code: wget -O- https://raw.githubusercontent.com/bolemo/nvram_utils/master/nvram_utils >nvram-utils && chmod +x nvram-utils
I made a little script called nvram-utils.
To install:
- Connect to the router with ssh or telnet
- Go to the directory you want to install the script, for example /opt/scripts (or /bolemo/scripts if you hare using my blocklist script) :
Code: cd /opt/scripts
If directory does not exist use:
Code: mkdir -p /opt/scripts; cd /opt/scripts - Copy and paste the following code:
Code: wget https://tinyurl.com/nvram-utils && chmod +x nvram-utils
Usage:
- /opt/scripts/nvram-utils backup
- To backup the current settings to be able to restore with the boot fix.
- If you have an external drive labeled ‘optware’, it will save a copy to it with a timestamp in /mnt/optware/nvram_backups/ in binary and text formats.
- /opt/scripts/nvram-utils bootfix install
- To install the boot fix (init.d and rc.d) to restore saved settings from backup at early boot stage.
- Recommended only if you have the problem of non persistant nvram (loosing your settings at reboot or restore).
- Once installed, the bootfix WILL PREVENT THE ABILITY TO DO A FACTORY RESET as the backup settings will always be restored at boot time. To prevent that, you need to access the root file system (telnet or ssh) and either:
- remove /nvram_backup (rm /nvram_backup and confirm), or
- uninstall the boot fix (see next command)
- Note that if you have no telnet/ssh access, it is possible to make a little autorun script on a usb thumb drive to do that.
- /opt/scripts/nvram-utils bootfix uninstall
- To uninstall the boot fix
That’s it. I threw that quickly without much testing. It is basic and to help people having the settings reset at reboot or restore from web GUI problem.
Thanks to @kamoj who helped with the boot fix.
To install the boot fix (init.d and rc.d) to restore saved settings from backup at early boot stage.
PS : tinyurl link `https://tinyurl.com/nvram-utils` is sending here: `https://raw.githubusercontent.com/bolemo/nvram_utils/master/nvram_utils`
If you don’t want to use tinyurl, use this instead of point 3 of install procedure:
Code: wget -O- https://raw.githubusercontent.com/bolemo/nvram_utils/master/nvram_utils >nvram-utils && chmod +x nvram-utils
Last edited: