What's new

amtm amtm - the Asuswrt-Merlin Terminal Menu

  • 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!

Pretty much the end goal is to provide access to tools that have completely interactive menu's to make it easy as possible for users. As you mentioned this includes having install/uninstall/update functions as a baseline, I'd probably suggest against requiring users to manually edit any files either so configuration is easy as possible. POSIX compliance is also a plus where possible.

I got that ready (and more) in the next update pipeline. I'll send you a message when I'm done.

As for posix, I may have to take a look at my grep and curl arguments within the script, but is that really a requirement if it's running on RMerlin firmware anyway??
 
As for posix, I may have to take a look at my grep and curl arguments within the script, but is that really a requirement if it's running on RMerlin firmware anyway??

That's more of a style guide for the sake of readability / collaboration. Makes finding errors in the future much easier as you can implement checks into Github with services like TravisCI/Codacy or even into atom with linter.
 
I got that ready (and more) in the next update pipeline. I'll send you a message when I'm done.

As for posix, I may have to take a look at my grep and curl arguments within the script, but is that really a requirement if it's running on RMerlin firmware anyway??
Include me in that message. amtm 1.8 is in the pipeline, I need to know when you're ready.
 
Thinking of doing a factory reset on the next Merlin update, including reinstalling scripts. Last time I solo-installed diversion, then AMTM, then skynet, and recently stubby. Is there a recommended install order (assuming AMTM install first) for the packages nowadays?
 
Thinking of doing a factory reset on the next Merlin update, including reinstalling scripts. Last time I solo-installed diversion, then AMTM, then skynet, and recently stubby. Is there a recommended install order (assuming AMTM install first) for the packages nowadays?
Diversion first, it installs Entware. Then the order of the other scripts don't matter.
 
Proposal for default USB disk layout for those who do not know better
- EXT4 (EXT3 if not supported)
- Journaling on
- Entware partition /dev/sda1 and filesystem /tmp/mnt/ent is three times router RAM
- Samba partition /dev/sda2 and filesystem /tmp/mnt/smb is rest of USB drive
- Change defaults for filesystem check thresholds from 20 mounts and six months to 1 mount and 1 day (tune2fs -c 1 -i 1d /dev/sda1)
- Swap file 1:1 with router RAM

I speculate that this layout would substantially reduce problems that users are having with USB drives. Typical thumb drives are too large for a graceful reboot with file system check of a full drive Entware filesystem. I get the impression that a method to control the boot to accomodate the long check is not available to developers. And even if it was, the delay would not be acceptable to users. The first file system check does not happen until the twentieth mount. When it does, it is a bewildering mess that can be deferred for another twenty mounts but not permanently fixed. Changing the file system check to happen almost every time will alert you to the problem right away. But with the Entware file system sized so small, it will not be a problem.
 
Last edited:
Would it not be a good idea to more or less automate that kind of proposal into a script run from AMTM?
Yes and I am assigning it to you :p
I did not use amtm Format disk, so I am not sure what it does now.
I used MiniTool Partition Wizard and would have appreciated knowing then what I know now.
 
Last edited:
Hey guys,

Today I ran into an odd problem...after connecting via SSH to the Router the command "amtm" does not start the amtm menu anymore.

The USB drive and all scripts are properly installed, I just don't know how to start amtm menu now via OSX Terminal while being connected to the Router.
 
Hey guys,

Today I ran into an odd problem...after connecting via SSH to the Router the command "amtm" does not start the amtm menu anymore.

The USB drive and all scripts are properly installed, I just don't know how to start amtm menu now via OSX Terminal while being connected to the Router.

Looks like you don't have Entware installed anymore or haven't run amtm after installing it.

Anyways you can manually run amtm by writing this in the terminal and hit enter:

/jffs/scripts/amtm
 
Thanks a lot! That did make amtm start, however I did not uninstall anything, confused why entware all of a sudden is not running anymore. Also, I just realized that when I start amtm the sytstem tool line "sw check Swap file" is red for some reason and says swap file path is wrong. Any idea what causes that?

Edit: Just saw that the name of the USB drive changed from "USB-Drive" to "sda1".
Bit confused now....does any of the scripts (amtm, Diversion, Skynet or Stubby) change the name of the USB drive?
 
Probably something make the swap file corrupt or not loaded properly. Try rebooting the router.
 
Thanks a lot! That did make amtm start, however I did not uninstall anything, confused why entware all of a sudden is not running anymore. Also, I just realized that when I start amtm the sytstem tool line "sw check Swap file" is red for some reason and says swap file path is wrong. Any idea what causes that?

Edit: Just saw that the name of the USB drive changed from "USB-Drive" to "sda1".
Bit confused now....does any of the scripts (amtm, Diversion, Skynet or Stubby) change the name of the USB drive?
You need to add a usb drive name.
 
I did have one, but for some reason it automatically changed to sda1.

I think I clicked in the router menu on the USB drive and the drive name and there all of a sudden sda1 appeared. Not sure if the router menu just changed it.
 
I did have one, but for some reason it automatically changed to sda1.
I got the same result. Google how to rename a usb drive in linux, it's easy I just don't remember the command.
 
I got the same result. Google how to rename a usb drive in linux, it's easy I just don't remember the command.
I'm guessing that the USB Entware filesystem is not even mounted.
What is the output of "df -k"?
 
I'm guessing that the USB Entware filesystem is not even mounted.
What is the output of "df -k"?

Code:
Filesystem           1K-blocks      Used Available Use% Mounted on
ubi:rootfs_ubifs         79016     65904     13112  83% /
devtmpfs                220096         0    220096   0% /dev
tmpfs                   220208       996    219212   0% /var
mtd:bootfs                4480      3356      1124  75% /bootfs
mtd:data                  8192       624      7568   8% /data
tmpfs                   220208       944    219264   0% /tmp
/dev/mtdblock8           49152      1540     47612   3% /jffs
/dev/sda1             30702664    609108  28527252   2% /tmp/mnt/sda1

I know absolutely that "sda1" was earlier named "USB-Drive".

All I did was checking the connected USB drive within the router setup and I clicked on the USB drive icon and changed to the tab "Format" w/o actually formatting it. But there the USB drive name "sda1" appeared. Seems like for some reason the router just changed the name of the connected USB drive...

Oh, and I mounted the USB drive in OSX via CMD+K...maybe that changed the drive name for some reason?
 
Last edited:
Code:
Filesystem           1K-blocks      Used Available Use% Mounted on
ubi:rootfs_ubifs         79016     65904     13112  83% /
devtmpfs                220096         0    220096   0% /dev
tmpfs                   220208       996    219212   0% /var
mtd:bootfs                4480      3356      1124  75% /bootfs
mtd:data                  8192       624      7568   8% /data
tmpfs                   220208       944    219264   0% /tmp
/dev/mtdblock8           49152      1540     47612   3% /jffs
/dev/sda1             30702664    609108  28527252   2% /tmp/mnt/sda1

I know absolutely that "sda1" was earlier named "USB-Drive".
Something IS mounted which I do not understand.
However, my opinion is that your Entware filesystem is too big. I know because the same thing happened to me. There is no permanent solution. But the problem will only manifest itself every twentieth mount. Until then, the filesystem will not actually be checked.
But for now the task is to get the old filesystem back. My guess:
1) /bin/umount /tmp/mnt/sda1
2) /usr/sbin/e2fsck -f -p /dev/sda1
3) /bin/mount /dev/sda1 /tmp/mnt/USB-Drive
 
Thanks EmeraldDeer, but when I run "/bin/umount /tmp/mnt/sda1" it says cannot unmount resource busy.

Ok, just realized that Stubby also won't start and says USB not found. Starting to get confused.

When I set up the USB drive yesterday I correctly formatted it to ext3 and gave it the file name "USB-Drive". For some odd reason it changed to "sda1" today.
 
1) Make sure you are not in a directory on the drive. "cd" will take you out.
2) Kill stubby and whatever else is running from the drive
3) /bin/umount -f /tmp/mnt/sda1
4) /usr/sbin/e2fsck -f -p /dev/sda1
5) /bin/mount /dev/sda1 /tmp/mnt/USB-Drive
Hopefully the filesystem was just mounted wrong.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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