What's new
  • 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!

Hi @L&LD ,

This instruction guide is excellent. Thank you and to everyone else that assisted in putting this together. I by no means call myself an expert around this stuff but by all accounts know enough to be dangerous as many around here are and with an instruction set like this I can almost feel like a pro with how flawlessly the process goes.

My question for this thread is this; The instruction set is fantastic for a first time setup or if blowing everything away and starting fresh. When ready to update firmware to a minor release which doesnt have any NVRAM changes requiring a full manual setup, is there a quick (dirty flash) way to do this while entware is installed?

As you can imagine with many settings configured i am sure i am not the only one here who requires over 2 hours to do a full system rebuild manually.
 
Hi @L&LD ,

This instruction guide is excellent. Thank you and to everyone else that assisted in putting this together. I by no means call myself an expert around this stuff but by all accounts know enough to be dangerous as many around here are and with an instruction set like this I can almost feel like a pro with how flawlessly the process goes.

My question for this thread is this; The instruction set is fantastic for a first time setup or if blowing everything away and starting fresh. When ready to update firmware to a minor release which doesnt have any NVRAM changes requiring a full manual setup, is there a quick (dirty flash) way to do this while entware is installed?

As you can imagine with many settings configured i am sure i am not the only one here who requires over 2 hours to do a full system rebuild manually.

Thank you and you're welcome! :)

There are two ways to approach this.

The first is to try the dirty flash firmware upgrade and if all goes well, I simply reboot the router at about 1o to 15 minutes after the router boots up with the latest firmware, and then again an hour or so after that. The reason for the first reboot is to check that everything comes back up properly after a reboot (and waiting a good 10 minutes) and the second reboot is to allow the router to fully set itself up internally with the new firmware and then make sure to make those new settings stick (a GUI initiated reboot does this, a hard reboot (pull the power plug or use the power button) doesn't. :)

If trying the above doesn't work, then I would safely remove the USB drive, reboot the router, flash the new firmware (it should take at this time) and then re-insert the USB drive at around the 10 to 15-minute mark and reboot as outlined above (and again at the hour mark after that). Assuming there were no issues here, other than the USB drive needing to be removed to free up a little more RAM, then with both approaches noted we're done. :)

When things go sour though? And both of those approaches don't produce good results? Then if a quick search of the forums and a few attempts at fixing any obvious issues doesn't work? The fastest method for me to a good/known state is to follow the amtm Step-by-Step guide and if needed, the M&M Config guide too.

Note that it does not require anywhere close to 2 hours to do a full M&M Config + the amtm Step-by-Step either. A solid half hour (maybe after a few times practicing) is all that is needed. :)
 
Interesting. My working hypothesis was that the router would go haywire due to it re-installing Optware as part of the firmware update causing a potential conflict my config and Entware pointing to the USB drive. If that is not the case then that lets my mind rest a little easier.

Im thinking steps as so:
1. Backup settings.cfg
2. Backup JFFS
3. Eject USB
4. Load new firmware
5. Reboot and wait 15 mins
6. Insert USB
7. Reboot and see how she goes.

Agreed. Basic M&M config is fairly quick for me too. Its all my port forwarding, static IP reservations, QoS rules etc etc that blow my time out to manually key in. I'm sure there is CLI way to do it quicker but haven't investigated that too much yet.

When I get a chance i'll see how it all fairs and might scrub up some better instructions to add to the thread to assist others.

Many thanks.
 
Interesting. My working hypothesis was that the router would go haywire due to it re-installing Optware as part of the firmware update causing a potential conflict my config and Entware pointing to the USB drive. If that is not the case then that lets my mind rest a little easier.

Im thinking steps as so:
1. Backup settings.cfg
2. Backup JFFS
3. Eject USB
4. Load new firmware
5. Reboot and wait 15 mins
6. Insert USB
7. Reboot and see how she goes.

Agreed. Basic M&M config is fairly quick for me too. Its all my port forwarding, static IP reservations, QoS rules etc etc that blow my time out to manually key in. I'm sure there is CLI way to do it quicker but haven't investigated that too much yet.

When I get a chance i'll see how it all fairs and might scrub up some better instructions to add to the thread to assist others.

Many thanks.

Optware is not installed anywhere on the router, afaik. Entware has replaced it for a very long time now. :)

Entware is not updated when new firmware is installed either. You should be updating it via amtm (and specifically via Diversion, if you have Diversion installed, with the ep, 6, 6, menu option).

The scripts so far are so fast, and effortless to install that I don't make backups for them. It is usually advantageous to simply install the latest version for true, trouble-free operation. :)

And note that step 1. to back up the router config settings file is only useful if you need to flash back to the same firmware version that was used to create the back up with. So, make sure you are saving that firmware file too, at least, until the new firmware proves stable for you. ;)
 
Thanks @martinr that will save me heaps of time. I'll SCP a file in at upgrade time.

@L&LD thanks. I read some time back that some of the TrendMicro and inbuilt media server stuff used Optware. Must have read wrong or read back when it was a thing.
 
... . I'm sure there is CLI way to do it quicker but haven't investigated that too much yet.

Xentrk has written a script, Dhcpstaticlist.sh that should make it much easier:

https://github.com/Xentrk/Asuswrt-Merlin-Linux-Shell-Scripts/blob/master/README.md

https://www.snbforums.com/threads/r...384-11-is-available.56501/page-37#post-491898


dhcpstaticlist.sh is a helpful utility script to manage DHCP static leases. The script displays a menu with the following functions:

  1. Save dhcp_staticlist nvram values to /opt/tmp/dhcp_staticlist.txt. This will allow you to restore the values after performing a factory reset.
  2. Restore dhcp_staticlist nvram values from /opt/tmp/dhcp_staticlist.txt.
  3. .........”


 
Last edited:
Xentrk has written a script, Dhcpstaticlist.sh that should make it much easier:

https://github.com/Xentrk/Asuswrt-Merlin-Linux-Shell-Scripts/blob/master/README.md

https://www.snbforums.com/threads/r...384-11-is-available.56501/page-37#post-491898


dhcpstaticlist.sh is a helpful utility script to manage DHCP static leases. The script displays a menu with the following functions:

  1. Save dhcp_staticlist nvram values to /opt/tmp/dhcp_staticlist.txt. This will allow you to restore the values after performing a factory reset.
  2. Restore dhcp_staticlist nvram values from /opt/tmp/dhcp_staticlist.txt.
  3. .........”

@martinr this is excellent. @Xentrk great job. I should have been more actively asking questions on the forum rather than just reading all these years. Thank you both!

While on the subject, is there a similar script for port forwarding assignments?
 
Last edited:
This is the Second Best guide ever... Only bested by M&M Config.
 
@martinr this is excellent. @Xentrk great job. I should have been more actively asking questions on the forum rather than just reading all these years. Thank you both!

While on the subject, is there a similar script for port forwarding assignments?
^^^^ That script is AWESOME! Where has it been? My biggest fear with a wipe upgrade is I have 100+ DHCP entries and the last time I switched routers it took me hours to copy them into the new router. I think putting them into the control file is the best route. I'm just not enough of a linux guru to do it without assistance. If this is ever added to amtm, that would be simply killer. TY TY!
 
^^^^ That script is AWESOME! Where has it been? My biggest fear with a wipe upgrade is I have 100+ DHCP entries and the last time I switched routers it took me hours to copy them into the new router. I think putting them into the control file is the best route. I'm just not enough of a linux guru to do it without assistance. If this is ever added to amtm, that would be simply killer. TY TY!

@gattaca it is a lot less scary than it looks. Follow the first link sent by MartinR which will take you to Xentrk's Github page and run the Curl command for that script in Putty to install it. Then select which option you want to run. When ready to do the update, perform your reset, re-run the curl command (fresh install of script) and then run the restore command from the terminal menu.

All Amtm does is provide a front end to run that same curl command in the background to install/uninstall scripts as well as bring up their menus which can be done by typing into Putty their script terminal name eg "Firewall" to bring up Skynet or "amtm" to bring up Amtm etc.
 
I had Diversion and Skynet installed via amtm to my RT-AC86U running Asuswrt-Merlin 384.10_2, and started having some issues with Xbox achievements (already mentioned in different threads).

In trying to fix those issues, I ended up messing around with hosted whitelists/blacklists, and a gigantic third-party blacklist (with literally millions of domains) nearly broke my router. The scripts crashed, SSH disconnected, everything slowed to a crawl. The two cores were alternating running at 100%, while only 20-30 MB of RAM were free. It was a mess.

I managed to uninstall Diversion and reformat the USB drive using amtm. I also formatted the JFFS partition again at the next boot, to start clean. Edit: Forgot to add that I also updated the firmware to the latest stable release: 384.11_2. Only then I Installed amtm, following @L&LD's fantastic guide (for the second time), but forgot to create a swap file before installing Diversion.

I installed amtm, then Diversion. Remembered about the swap file, uninstalled Diversion, tried creating the swap file, but amtm wouldn't recognize the option. Installed Diversion again, and only after doing that, I was able to create the 2 GB swap file using amtm.

Is that okay? I installed Skynet, scMerlin and disk check afterwards.
 
I had Diversion and Skynet installed via amtm to my RT-AC86U running Asuswrt-Merlin 384.10_2, and started having some issues with Xbox achievements (already mentioned in different threads).

In trying to fix those issues, I ended up messing around with hosted whitelists/blacklists, and a gigantic third-party blacklist (with literally millions of domains) nearly broke my router. The scripts crashed, SSH disconnected, everything slowed to a crawl. The two cores were alternating running at 100%, while only 20-30 MB of RAM were free. It was a mess.

I managed to uninstall Diversion and reformat the USB drive using amtm. I also formatted the JFFS partition again at the next boot, to start clean. Edit: Forgot to add that I also updated the firmware to the latest stable release: 384.11_2. Only then I Installed amtm, following @L&LD's fantastic guide (for the second time), but forgot to create a swap file before installing Diversion.

I installed amtm, then Diversion. Remembered about the swap file, uninstalled Diversion, tried creating the swap file, but amtm wouldn't recognize the option. Installed Diversion again, and only after doing that, I was able to create the 2 GB swap file using amtm.

Is that okay? I installed Skynet, scMerlin and disk check afterwards.

It should be okay. After a reboot, does the router function properly? Is the swap file being used after a few minutes (or hours, depending on what you're using it for)?
 
It should be okay. After a reboot, does the router function properly? Is the swap file being used after a few minutes (or hours, depending on what you're using it for)?

Everything seems to be working properly. How do I check if the swap file is being used?
 
Everything seems to be working properly. How do I check if the swap file is being used?

In the router's GUI, click on Tools and scroll down to the Memory section. It should be the last item; Swap. ;)
 
  • Like
Reactions: EeK
I would really like to see this as a locked sticky. I came to Merlin firmware because it was a compromise between stock and DD-WRT where you can really screw yourself up (and I have in the past). I've never looked back since using Merlin and I'm on my second Asus router (68 to 88). But, I really didn't pay much attention to scripts because they consisted of many forum entries that would scroll away and I didn't really feel the need to follow them. Once AMTM popped up I have been on a script kick. Lovin' diversion, felt like I needed skynet, and the enhanced guestr wifi is awesome. Updates a re now a piece of cake. AMTM in my mind is an essential extension of Merlin, and it deserves a sticky (maybe with a pic). Just my 2 cents.
 
In the router's GUI, click on Tools and scroll down to the Memory section. It should be the last item; Swap. ;)

Ah, thanks! This is what it looks like (been running for a few hours since the last reboot):

Code:
Total     430.10 MB
Free     96.79 MB
Buffers     6.80 MB
Cache     41.98 MB
Swap     0.68 / 2048.00 MB
 
Prepare the USB Drive for the swap file, Entware, and scripts.

  • If your USB drive is used, make sure to save all files off of it first
  • Format it in your computer with the NTFS file format
  • Insert the USB drive into a router USB port
  • Use your PuTTY skills above to SSH into the router
  • Type '/jffs/scripts/amtm' without the quotes and hit Enter
  • Using amtm's 'fd' command, format the USB drive to Ext4 with journaling and
  • Make sure to also Label the drive too. The router will reboot.
    • Note: MIPS routers are limited to ext2 and ext3
  • Create a swap file using amtm's 'sw' command. I recommend the 2GB size
    • Be patient while this file is created. It will be worth it
@L&LD , Great write up. :cool:
I am starting to have issues and will now need to start from scratch. (can't remote in to it at this point) after making some DoT settings changes

I have a new USB 3.1 64Gb stick. Do I still "Click USB Mode option to use 'USB 2.0"
Using the "fd" command, do I format the full capacity of the stick? or 32Gb or 16Gb? Current USB is 8Gb
How do I know if I have MIPS or arm or aarch64? Have no clue - Router in my signature. o_O
Am I creating the swap file in the newly created Ext4(3) drive?
 
Everything seems to be working properly. How do I check if the swap file is being used?

Another option is to use the command
Code:
free

and you will see this:

Code:
             total       used       free     shared    buffers     cached
Mem:        255684     223284      32400          0      23180      53172
-/+ buffers/cache:     146932     108752
Swap:      2097148        604    2096544
 
@L&LD , Great write up. :cool:
I am starting to have issues and will now need to start from scratch. (can't remote in to it at this point) after making some DoT settings changes

I have a new USB 3.1 64Gb stick. Do I still "Click USB Mode option to use 'USB 2.0"
Using the "fd" command, do I format the full capacity of the stick? or 32Gb or 16Gb? Current USB is 8Gb
How do I know if I have MIPS or arm or aarch64? Have no clue - Router in my signature. o_O
Am I creating the swap file in the newly created Ext4(3) drive?

Thank you. :)

You may want to test if the USB 3.0 or 2.0 options affect your 2.4GHz band's throughput, but myself? I would just use USB 2.0 mode as all the scripts used so far do not need anything faster to work.

You have an arm based router. :)

Yes, the swap file is created on the new USB drive. Just follow the steps, they work. :)
 

Sign Up For SNBForums Daily Digest

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

Members online

Top