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 - the Asuswrt-Merlin Terminal Menu

Discussion in 'Asuswrt-Merlin' started by thelonelycoder, Nov 26, 2017.

  1. rgnldo

    rgnldo Very Senior Member

    Joined:
    Nov 12, 2018
    Messages:
    751
    Location:
    Brazil
    @thelonelycoder I provisionally installed Diversion. After uninstalling, the script that detects the installation of the entware, post-mount.div, has been removed. Is this reference for installing Entware?
    Without post-mount.div, amtm does not understand that the entware is installed. I made the correction with the backup I have.
     
  2. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,464
    Location:
    Switzerland
    Update amtm and/or Diversion, I use a different approach now.
     
  3. rgnldo

    rgnldo Very Senior Member

    Joined:
    Nov 12, 2018
    Messages:
    751
    Location:
    Brazil
    My entware installation is old. Without the post-mount.div file, amtm cannot detect the entware installation at startup.

    --- update ---
    I organized a provisional solution.
     
    Last edited: Mar 8, 2020
  4. fastcx

    fastcx Occasional Visitor

    Joined:
    Aug 31, 2015
    Messages:
    25
    I found mine under /jffs/configs, for those who can't find it under /usr/sbin. Coming from before .15 firmware, without factory reset/jffs format.
     
    dave14305 likes this.
  5. dave14305

    dave14305 Part of the Furniture

    Joined:
    May 19, 2018
    Messages:
    2,405
    Location:
    USA
    You are correct, based on how I wrote it. :oops: I meant that amtm would be found automatically under /usr/sbin. /jffs/configs/profile.add is the right path.
     
  6. jrmtz85

    jrmtz85 Regular Contributor

    Joined:
    Jul 15, 2015
    Messages:
    81
    Hi there! Getting an ax88u to setup as my main aimesh router, and converting my 86u to a node. Got a Samsung Fit USB drive to install amtm/diversion/skynet, but was wondering if there was a preference for USB ports on the 88x? Is there interference or anything like that in one but not the other? I think this was an issue with USB3 on the 86u.

    Thanks!
     
  7. sn2018

    sn2018 Occasional Visitor

    Joined:
    Feb 19, 2018
    Messages:
    24
    Newbie questions... I have installed several scripts using AMTM. What is the proper way to back up the USB stick? Do I copy everything on the USB stick to another stick? What about the disk label? Do it from another machine?
     
  8. martinr

    martinr Part of the Furniture

    Joined:
    Nov 27, 2014
    Messages:
    2,420
    Location:
    Manchester, United Kingdom
    I did it recently. You can have a read starting with Butterfly Bones’ quoted post here:

    https://www.snbforums.com/threads/r...urity-enhancements.16798/page-309#post-552023

    but read on for the posts following. The first time I did it I ran into problems with permissions. The second time, permissions also popped up but were taken care of. And I had no further problems copying to, and swapping over to, an SSD. Butterfly Bones later did have some problems. So perhaps his method wasn’t the best way.

    I’m interested to see what answers you get. But unless you are comfortable dealing with Linux permissions, you might well be better off simply installing from scratch onto that backup drive rather than copying across. Time-wise, it’s probably a good deal quicker. I certainly would do it that way if I ever had to again, but lets see what others, more knowledgeable, say.
     
    Last edited: Mar 11, 2020
    Butterfly Bones and L&LD like this.
  9. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    11,437
    @sn2018 not that I am more knowledgable, but I never use a backup to a 'new' anything in any case. Except maybe screenshots of setup pages. :)

    I would set up a new USB drive from scratch, via amtm. Anything else is a possible gamble that I am not willing to bet on (I want to produce something that I know I can walk away from for my customers and not have to do a return visit for a 'dumb' mistake on my part). :)
     
    joe scian, a5m, CaptainSTX and 3 others like this.
  10. Markster

    Markster Regular Contributor

    Joined:
    Jan 29, 2019
    Messages:
    146
    Location:
    Canada
    I am wondering if amtm menu framework allows to integrate my own extension. If so any help or links would be appreciated.
     
  11. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,464
    Location:
    Switzerland
    Learn how to read the code, then it's simple. amtm has a very straight forward way of detecting and auto-enabling scripts.
     
  12. Looker

    Looker New Around Here

    Joined:
    May 25, 2016
    Messages:
    5
    Hi, sorry for the newbie questions, but I am interested in learning more about amtm and the other scripts it gives access to. I have searched, but cannot answer my questions.

    1) Can someone direct me to an introduction for accessing amtm in Asuswrt-Merlin 384.15? I understand I will need to use some kind of terminal?

    2) Also, I have a SanDisk 256GB Ultra Fit USB 3.1 Flash Drive. I want to connect it to my RT-AC86U for experimenting with stuff. What file system should it be formatted to?

    Thanks!
     
  13. Jeffrey Young

    Jeffrey Young Occasional Visitor

    Joined:
    Dec 22, 2019
    Messages:
    30
    Location:
    Canada
    I have a script set up to run at midnight that copies my entire USB key and JFFS drives to my NAS using rync.
     
  14. maghuro

    maghuro Regular Contributor

    Joined:
    Feb 19, 2020
    Messages:
    144
    Location:
    Portugal
    Share with us!
     
    QuikSilver likes this.
  15. Jeffrey Young

    Jeffrey Young Occasional Visitor

    Joined:
    Dec 22, 2019
    Messages:
    30
    Location:
    Canada
    You will need to install rsync (make sure you have entware installed as well.

    From a ssh shell run

    Code:
    opkg install rsync
    I then have this script in /jffs/scripts. Called ImageUSB

    Code:
    #!/bin/sh
    
    if [ ! -d /tmp/mnt/WDCloud ]
    then
        mkdir /tmp/mnt/WDCloud
        chmod 777 /tmp/mnt/WDCloud
    fi
    
    mount -t cifs \\\\192.168.0.14\\Router /tmp/mnt/WDCloud -o "username=router,password=password"
    sleep 10
    if [ -n "`mount | grep /tmp/mnt/WDCloud`" ]; then
        rsync -r -q -u -s --exclude 'myswap.swp' /tmp/mnt/Router/* /tmp/mnt/WDCloud/USBKey/
        rsync -r -q -u -s /jffs/* /tmp/mnt/WDCloud/jffs/
        umount /tmp/mnt/WDCloud
    fi
    Lastly, in your /jffs/scripts/init-start script, add

    Code:
    cru a SyncUsbToNas "0 3 * * * /jffs/scripts/ImageUSB"
    You will need to modify things for your environment as well as having the proper account on your NAS or where ever you are sending the backup. I had said that the script runs at midnight, but looking at the cron job add line, it runs at 3 am everyday.
     
  16. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    11,437
    1) From the link in my signature below. Just remember that you don't need to install amtm in RMerlin 384.15_0 or higher. ;)

    amtm Step-by-Step
    https://www.snbforums.com/threads/amtm-step-by-step-install-guide-l-ld.56237/#post-483421


    2)
    From the same link posted above, using amtm to format the drive, Ext4 w/journaling and create a 2GB swap file before installing Diversion which will also (properly) install Entware and pixelserv-tls too. Now, explore as you wish (even if you disable Diversion while doing so).

    HTH. :)
     
    QuikSilver, Looker, a5m and 4 others like this.
  17. SomeWhereOverTheRainBow

    SomeWhereOverTheRainBow Very Senior Member

    Joined:
    Jun 4, 2019
    Messages:
    783
    ah the ol' @L&LD guides for success.
     
    QuikSilver, kernol, Looker and 3 others like this.
  18. Looker

    Looker New Around Here

    Joined:
    May 25, 2016
    Messages:
    5
    Thanks! That is exactly what I was looking for. Will play with this soon! Wow...
     
    L&LD likes this.
  19. visortgw

    visortgw Senior Member

    Joined:
    Jun 18, 2015
    Messages:
    371
    Thanks for the excellent idea! In looking at your ImageUSB script, I believe that I was able to simplify it significantly. Here is the updated script:
    Code:
    #!/bin/sh
    
    rsync -a --exclude 'myswap.swp' --password-file=rsync_pass /tmp/mnt/USBLABEL/ [email protected]::NetBackup/USBLABEL/
    rsync -a                        --password-file=rsync_pass /jffs/             [email protected]::NetBackup/jffs/
    No mounts are needed...
    1. USBLABEL is USB drive label/mount point.
    2. USERNAME is NAS username for rsync.
    3. Password for USERNAME is placed in /jffs/scripts/rsync_pass with chmod 600.
     
    Last edited: Mar 29, 2020 at 11:19 PM
  20. maghuro

    maghuro Regular Contributor

    Joined:
    Feb 19, 2020
    Messages:
    144
    Location:
    Portugal
    @ERROR: auth failed on module home
    rsync error: error starting client-server protocol (code 5) at main.c(1657) [sender=3.1.3]
    @