What's new

NVRAM [Release] NVRAM Save/Restore Utility

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
o.k

I ran on the ac88u:

1. ./nvram-save.sh -b
2. ./nvram-save.sh -m
3. ./nvram-hnd-migr.sh

restore on the ac86u:

see the screenshot
 

Attachments

  • fail.jpg
    fail.jpg
    55.5 KB · Views: 258
@here1310 your image is too small/blurry to read. Can you crop it closer to the window instead of the whole screen instead?
 
sorry:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2020.03.18 17:14:37 =~=~=~=~=~=~=~=~=~=~=~=
login as:
Authenticating with public key "xxxxxxxxx"
Passphrase for key "xxxxxxxx":
ASUSWRT-Merlin RT-AC86U 384.16_beta1 Sat Mar 14 17:52:58 UTC 2020
xxxxx@RT-AC86U-3BA8:/tmp/home/root# cd /mnt/sda1/nsru
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru# ls
[1;34mbackup[0m [1;32mnvram-hnd-migr.sh[0m [1;32mnvram-user-sample.sh[0m
[1;32mclear-maclist.sh[0m [0;0mnvram-merlin.ini[0m [0;0mnvram-util.log[0m
[1;32mjffs-restore.sh[0m [1;32mnvram-restore.sh[0m [1;32mrestore-hnd-migr.sh[0m
[0;0mlink[0m [0;0mnvram-sample.ini[0m [1;32msave-mynvram.sh[0m
[1;32mnvram-excp-merlin.sh[0m [1;32mnvram-save.sh[0m
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru#
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru# ls[J
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru# cd /mnt/sda1/nsru[J
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru# sh nvram-restore.sh[J
[31mLast nvram save/restore (nvram-restore-202003181544_RT-AC88U-MIGR.sh)
WARNING: Last nvram-save MAC address (MIGR)
does not match current router MAC (3BA8)!
This may be valid if you are migrating settings from one router to another
If you wish to use a different restore file, answer N and specify the
restore file id the command line in the form
yyyymmddhhmm-mmmm
[0mDo you want to proceed [Y/N]? y
nvram-restore.sh NVRAM Restore Utility - Version 30.3.0
[94mNVRAM Restore File Directory: [97m/tmp/mnt/sda1/nsru/backup
[97m 1 : [94mnvram-restore-202003181544_RT-AC88U-MIGR.sh[96m Ver=384.16_beta1 nvram-merlin.ini
[97m
Restore last NVRAM save ? ([1m[93mnvram-restore-202003181544_RT-AC88U-MIGR.sh[97m)
{ n[{-n}] [ del ] | Y } (or press ENTER to ABORT) > y
[0m
Performing a migration restore from a migration nvram-save
cp: can't stat '/tmp/mnt/sdb1/nsru/nvram-merlin.ini': No such file or directory
[93mnvram-restore: NVRAM User Restore Utility - Version 30.3.0 POSIX code updates.
nvram-restore: NVRAM User Restore Utility - Version 30.3.0 Martineau Hacked for v384.xx+!!
nvram-restore: Using standard NVRAM variable file: nvram-merlin.ini Version=30.3.0
nvram-restore: Restoring RT-AC88U settings from firmware 384.16_beta1 202003181544_RT-AC88U-MIGR
[91m[5m
Restore Router Model MISMATCH - ABORTing[0m[92mnvram-restore.sh 202003181544_RT-AC88U-MIGR Sat May 5 07:10:20 CEST 2018 384.16_beta1 #Version=30.3.0 0 minutes and 0 seconds elapsed
[0m
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru#
 
sorry:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2020.03.18 17:14:37 =~=~=~=~=~=~=~=~=~=~=~=
login as:
Authenticating with public key "xxxxxxxxx"
Passphrase for key "xxxxxxxx":
ASUSWRT-Merlin RT-AC86U 384.16_beta1 Sat Mar 14 17:52:58 UTC 2020
xxxxx@RT-AC86U-3BA8:/tmp/home/root# cd /mnt/sda1/nsru
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru# ls
[1;34mbackup[0m [1;32mnvram-hnd-migr.sh[0m [1;32mnvram-user-sample.sh[0m
[1;32mclear-maclist.sh[0m [0;0mnvram-merlin.ini[0m [0;0mnvram-util.log[0m
[1;32mjffs-restore.sh[0m [1;32mnvram-restore.sh[0m [1;32mrestore-hnd-migr.sh[0m
[0;0mlink[0m [0;0mnvram-sample.ini[0m [1;32msave-mynvram.sh[0m
[1;32mnvram-excp-merlin.sh[0m [1;32mnvram-save.sh[0m
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru#
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru# ls[J
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru# cd /mnt/sda1/nsru[J
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru# sh nvram-restore.sh[J
[31mLast nvram save/restore (nvram-restore-202003181544_RT-AC88U-MIGR.sh)
WARNING: Last nvram-save MAC address (MIGR)
does not match current router MAC (3BA8)!
This may be valid if you are migrating settings from one router to another
If you wish to use a different restore file, answer N and specify the
restore file id the command line in the form
yyyymmddhhmm-mmmm
[0mDo you want to proceed [Y/N]? y
nvram-restore.sh NVRAM Restore Utility - Version 30.3.0
[94mNVRAM Restore File Directory: [97m/tmp/mnt/sda1/nsru/backup
[97m 1 : [94mnvram-restore-202003181544_RT-AC88U-MIGR.sh[96m Ver=384.16_beta1 nvram-merlin.ini
[97m
Restore last NVRAM save ? ([1m[93mnvram-restore-202003181544_RT-AC88U-MIGR.sh[97m)
{ n[{-n}] [ del ] | Y } (or press ENTER to ABORT) > y
[0m
Performing a migration restore from a migration nvram-save
cp: can't stat '/tmp/mnt/sdb1/nsru/nvram-merlin.ini': No such file or directory
[93mnvram-restore: NVRAM User Restore Utility - Version 30.3.0 POSIX code updates.
nvram-restore: NVRAM User Restore Utility - Version 30.3.0 Martineau Hacked for v384.xx+!!
nvram-restore: Using standard NVRAM variable file: nvram-merlin.ini Version=30.3.0
nvram-restore: Restoring RT-AC88U settings from firmware 384.16_beta1 202003181544_RT-AC88U-MIGR
[91m[5m
Restore Router Model MISMATCH - ABORTing[0m[92mnvram-restore.sh 202003181544_RT-AC88U-MIGR Sat May 5 07:10:20 CEST 2018 384.16_beta1 #Version=30.3.0 0 minutes and 0 seconds elapsed
[0m
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru#
I will look into the issue this evening.
 
sorry:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2020.03.18 17:14:37 =~=~=~=~=~=~=~=~=~=~=~=
login as:
Authenticating with public key "xxxxxxxxx"
Passphrase for key "xxxxxxxx":
ASUSWRT-Merlin RT-AC86U 384.16_beta1 Sat Mar 14 17:52:58 UTC 2020
xxxxx@RT-AC86U-3BA8:/tmp/home/root# cd /mnt/sda1/nsru
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru# ls
[1;34mbackup[0m [1;32mnvram-hnd-migr.sh[0m [1;32mnvram-user-sample.sh[0m
[1;32mclear-maclist.sh[0m [0;0mnvram-merlin.ini[0m [0;0mnvram-util.log[0m
[1;32mjffs-restore.sh[0m [1;32mnvram-restore.sh[0m [1;32mrestore-hnd-migr.sh[0m
[0;0mlink[0m [0;0mnvram-sample.ini[0m [1;32msave-mynvram.sh[0m
[1;32mnvram-excp-merlin.sh[0m [1;32mnvram-save.sh[0m
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru#
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru# ls[J
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru# cd /mnt/sda1/nsru[J
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru# sh nvram-restore.sh[J
[31mLast nvram save/restore (nvram-restore-202003181544_RT-AC88U-MIGR.sh)
WARNING: Last nvram-save MAC address (MIGR)
does not match current router MAC (3BA8)!
This may be valid if you are migrating settings from one router to another
If you wish to use a different restore file, answer N and specify the
restore file id the command line in the form
yyyymmddhhmm-mmmm
[0mDo you want to proceed [Y/N]? y
nvram-restore.sh NVRAM Restore Utility - Version 30.3.0
[94mNVRAM Restore File Directory: [97m/tmp/mnt/sda1/nsru/backup
[97m 1 : [94mnvram-restore-202003181544_RT-AC88U-MIGR.sh[96m Ver=384.16_beta1 nvram-merlin.ini
[97m
Restore last NVRAM save ? ([1m[93mnvram-restore-202003181544_RT-AC88U-MIGR.sh[97m)
{ n[{-n}] [ del ] | Y } (or press ENTER to ABORT) > y
[0m
Performing a migration restore from a migration nvram-save
cp: can't stat '/tmp/mnt/sdb1/nsru/nvram-merlin.ini': No such file or directory
[93mnvram-restore: NVRAM User Restore Utility - Version 30.3.0 POSIX code updates.
nvram-restore: NVRAM User Restore Utility - Version 30.3.0 Martineau Hacked for v384.xx+!!
nvram-restore: Using standard NVRAM variable file: nvram-merlin.ini Version=30.3.0
nvram-restore: Restoring RT-AC88U settings from firmware 384.16_beta1 202003181544_RT-AC88U-MIGR
[91m[5m
Restore Router Model MISMATCH - ABORTing[0m[92mnvram-restore.sh 202003181544_RT-AC88U-MIGR Sat May 5 07:10:20 CEST 2018 384.16_beta1 #Version=30.3.0 0 minutes and 0 seconds elapsed
[0m
xxxxx@RT-AC86U-3BA8:/tmp/mnt/sda1/nsru#
I patched nvram-save.sh to skip the router model comparison when in migration mode.

The other error you report has to do with lines 6 to 8 in the nvram-restore-yyyymmddhhmm_MODEL-MAC.sh script generated by the nvram-save.sh script.
Code:
cp: can't stat '/tmp/mnt/sdb1/nsru/nvram-merlin.ini': No such file or directory

After you run nvram-save.sh, edit the file. It will have a name using the format: nvram-restore-202002221913_RT-AC88U-8248.sh. Here is an example of how lines 6 to 8 looks:
Code:
if [ ! -f /tmp/mnt/ASUS/nsru/backup/nvram-ini-202003191846_RT-AC88U-MIGR.txt ]; then
  cp -af /tmp/mnt/ASUS/nsru/nvram-merlin.ini /tmp/mnt/ASUS/nsru/backup/nvram-ini-202003191846_RT-AC88U-MIGR.txt
fi
Note how the physical file system e.g. sda1, sda2, sda3 are not referenced. For some reason, it appears to be referenced in the nvram-restore file that got generated when you ran the script. :confused:

Following is how I change to the directories on the USB drive. No need to reference the file system name.

Code:
cd /mnt
wizard@RT-AC88U-8248:/tmp/mnt# ls
AC88U  ASUS   utils

The /mnt directory location is a symbolic link to the /tmp/mnt directory:
Code:
# ls -al | grep mnt
lrwxrwxrwx    1 wizard   root             7 Mar 15 02:14 mnt -> tmp/mnt
I did update the /tmp/mnt reference in the code to /mnt in case that was causing you issues.

You are using the physical mount point of sda1 in the cd command:
Code:
# cd /mnt/sda1/nsru
I wonder if that is causing an issue?

Use the df command to get physical mount locations:
Code:
 #df | grep /mnt
/dev/sda3              2516424   2185964    202632  92% /tmp/mnt/AC88U
/dev/sda2              2538796    143424   2266408   6% /tmp/mnt/utils
/dev/sda1              2538764    163684   2246116   7% /tmp/mnt/ASUS

See if you can navigate to the partitions on the USB w/o specifying the physical file system name. The file system names can change each time you plug in the USB. So, using the file system reference should be avoided if possible.
 
Last edited:
RT-AX88U, running 384.15
just installed your script the first time

i wanted to backup my settings before updating to the latest beta. Maybe i didnt read the instructions correct, or just did a mistake, but after calling ./nvram-save.sh (what i think makes a backup) your script restored firmware firmware 384.16_beta1 ??
(Restoring RT-AC88U settings from firmware 384.16_beta1 202003191846_RT-AC88U-MIGR)

Now the router is reachable under a different ip, but i cant login. The default admin:admin nether my normal password are working.
I tryed to reset it with the Firmware Restoration tool, wich runs fine. But after a reboot, the router is still on the 192.168.22.1 and no username:password are working.

so atm i'm looked out from my router and have no idea how to take back control?!
 

Attachments

  • Anmerkung 2020-03-19 172456.jpg
    Anmerkung 2020-03-19 172456.jpg
    67.3 KB · Views: 155
SORRY, my warning is coming too late ...
The script nvram-save.sh is faulty / check right after my ac88u has also failed completely, thanks to BACKUP he is alive again ...
Thanks anyway to Xentrk ... we still find the error ..
best regards...
 
corrgan2222, I hope you also have a backup ??

Configure hardreset and new using backup.cfg and jffs-backup ...
 
It was the first time i used the script, so i dont have a backup! I just wanted to create one.
And i cant login because no login is working, ether webui or ssh.

So i'm completly looked out atm.
@Xentrk what is the default username : password you use in RT-AC88U settings the script restored??
 
@corgan2222 if your user name and password was longer than 16 characters, you may want to try using only the first 16 characters of each to try to log in. :)
 
Were all those characters alphanumeric? No special characters, punctuation, or smiley faces?
 
Xentrk took place
nvram-restore.sh uploaded a nvram-restore-xxxxxxxx_RT-AC88U-xxxx.sh script as nvram-restore.sh for the update,

The router's IP is 192.168.22.1

password / etc unknown, probably its credentials ...
 
#!/bin/sh
# generated script to restore user nvram settings
#VERSION=30.3.0
scr_name="nvram-restore"
if [ ! -f /tmp/mnt/ASUS/nsru/backup/nvram-ini-202003191846_RT-AC88U-MIGR.txt ]; then
cp -af /tmp/mnt/ASUS/nsru/nvram-merlin.ini /tmp/mnt/ASUS/nsru/backup/nvram-ini-202003191846_RT-AC88U-MIGR.txt
fi
 
this is the beginning content of the new nvram-save.sh ..
upload_2020-3-19_19-52-52.png
 
@ corgan2222,

You haven't made a backup in the GUI ??
upload_2020-3-19_19-55-28.png
 
maybe you should first deal with this (GUI) before you start with scripts etc. ...

A lot is in development and in work!
The team around Merlin is extremely good, but everyone who uses this should be aware that there can be mistakes every now and then!
This is not a business environment / tested several times before release etc ...

You have to be aware of this ...
 
sorry, I am German and I put a lot of effort into English ...
upload_2020-3-19_20-6-39.png
 
@ corgan2222,

You haven't made a backup in the GUI ??
View attachment 22040

if have this Settings_RT-AX88U.CFG backup, which is useless if i cant login.
And yes, i understand that there can be bugs and something can go wrong. I develop also for this system.
Even if dont have a backup from the settings and have to setup everything agein, i dont mind. This can happend. I dont blame anybody.

But atm i can't use the router at all! Its bricked because i cant login without the correct username and password AND the hard reset with the recovery tool seems to be not working.
 
Status
Not open for further replies.

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top