1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

amtm step-by-step install guide - L&LD

Discussion in 'Asuswrt-Merlin' started by L&LD, Apr 21, 2019.

  1. El Mariachi

    El Mariachi Occasional Visitor

    Joined:
    May 19, 2019
    Messages:
    11
    Location:
    Australia
    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.
     
  2. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    10,271
    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. :)
     
    Clark Griswald, martinr and #TY like this.
  3. El Mariachi

    El Mariachi Occasional Visitor

    Joined:
    May 19, 2019
    Messages:
    11
    Location:
    Australia
    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.
     
    L&LD likes this.
  4. martinr

    martinr Part of the Furniture

    Joined:
    Nov 27, 2014
    Messages:
    2,281
    Location:
    Manchester, United Kingdom
    El Mariachi and L&LD like this.
  5. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    10,271
    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. ;)
     
    El Mariachi and martinr like this.
  6. El Mariachi

    El Mariachi Occasional Visitor

    Joined:
    May 19, 2019
    Messages:
    11
    Location:
    Australia
    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.
     
    martinr and L&LD like this.
  7. martinr

    martinr Part of the Furniture

    Joined:
    Nov 27, 2014
    Messages:
    2,281
    Location:
    Manchester, United Kingdom
    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: May 21, 2019
    L&LD, QuikSilver and El Mariachi like this.
  8. El Mariachi

    El Mariachi Occasional Visitor

    Joined:
    May 19, 2019
    Messages:
    11
    Location:
    Australia
    @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: May 21, 2019
    gattaca and martinr like this.
  9. Swistheater

    Swistheater Very Senior Member

    Joined:
    Jul 8, 2017
    Messages:
    1,243
    Location:
    Florida
    This is the Second Best guide ever... Only bested by M&M Config.
     
    L&LD and martinr like this.
  10. gattaca

    gattaca Regular Contributor

    Joined:
    Feb 18, 2012
    Messages:
    186
    ^^^^ 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!
     
    L&LD likes this.
  11. El Mariachi

    El Mariachi Occasional Visitor

    Joined:
    May 19, 2019
    Messages:
    11
    Location:
    Australia
    @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.
     
    martinr and thelonelycoder like this.
  12. EeK

    EeK Regular Contributor

    Joined:
    May 22, 2016
    Messages:
    71
    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.
     
  13. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    10,271
    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)?
     
  14. EeK

    EeK Regular Contributor

    Joined:
    May 22, 2016
    Messages:
    71
    Everything seems to be working properly. How do I check if the swap file is being used?
     
  15. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    10,271
    In the router's GUI, click on Tools and scroll down to the Memory section. It should be the last item; Swap. ;)
     
    EeK likes this.
  16. Elmer

    Elmer Regular Contributor

    Joined:
    Jun 27, 2017
    Messages:
    115
    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.
     
    qsyang, Clark Griswald and L&LD like this.
  17. EeK

    EeK Regular Contributor

    Joined:
    May 22, 2016
    Messages:
    71
    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
     
    L&LD likes this.
  18. 58chev

    58chev Regular Contributor

    Joined:
    Mar 14, 2018
    Messages:
    90
    Location:
    Etobicoke, Canada
    @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?
     
  19. bluzfanmr1

    bluzfanmr1 Regular Contributor

    Joined:
    Mar 18, 2018
    Messages:
    72
    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
     
    EeK, no_name and L&LD like this.
  20. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    10,271
    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. :)