What's new

amtm amtm 3.2.x - 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!

Hello, When i SSH into my router i get this error message:

ASUSWRT-Merlin RT-AC87U 384.13_10 Sun Jun 28 17:57:25 UTC 2020
-sh: /opt/etc/profile: line 1: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������: File name too long

Anybody know what i should do/change?

(AMTM 3.2.0)

Things i changed recently:

Updated AMTM
Added a swap file (2 Gb on external usb)
Installed:
Skynet
Yazfi
ntp / sc / spd -merlin
Entware
Disk check script
Led control

PS: it's entware that gives this error. But i can't uninstall it (right?)
 
Last edited:
Do you have any early spoilers that you are willing to disclose of at this time? It is hard to imagine what is in store not being able to see your progress.
Absolutely love how simple amtm is to use and all the functionality it provides!
I don't know I need (or want) until after the "new" stuff arrives, so I can appreciate the wait.
 
Hello, When i SSH into my router i get this error message:

ASUSWRT-Merlin RT-AC87U 384.13_10 Sun Jun 28 17:57:25 UTC 2020
-sh: /opt/etc/profile: line 1: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������: File name too long

Anybody know what i should do/change?

(AMTM 3.2.0)

Things i changed recently:

Updated AMTM
Added a swap file (2 Gb on external usb)
Installed:
Skynet
Yazfi
ntp / sc / spd -merlin
Entware
Disk check script
Led control

PS: it's entware that gives this error. But i can't uninstall it (right?)
Seems that you have a corrupted file. You can view the file by command:

Code:
less /opt/etc/profile

This is my /opt/etc/profile.

Code:
#!/bin/sh

# Please note it's not a system-wide settings, it's only for a current
# terminal session. Point your f\w (if necessery) to execute /opt/etc/profile
# at console logon.

is_substring(){
    case "$2" in
        *$1*) return 0;;
        *) return 1;;
    esac
}

# Set CHECK_OPT_PATH to 1 to check /opt/bin and /opt/sbin in PATH
CHECK_OPT_PATH=0
if [ $CHECK_OPT_PATH = 1 ]; then
    is_substring "/opt/bin" $PATH
    [ $? == 1 ] && export PATH=/opt/bin:$PATH
    is_substring "/opt/sbin" $PATH
    [ $? == 1 ] && export PATH=/opt/sbin:$PATH
else
    export PATH=/opt/bin:/opt/sbin:$PATH
fi
export TERMINFO=/opt/share/terminfo
export TERM=xterm
export TMP=/opt/tmp
export TEMP=/opt/tmp
unset LD_PRELOAD
unset LD_LIBRARY_PATH
alias mc="mc -c"

# You may define localization
#export LANG='ru_RU.UTF-8'
#export LC_ALL='ru_RU.UTF-8'
export LANG='en_US.UTF-8'
export LC_ALL='en_US.UTF-8'
 
For the swap file is the maximum size still 2 gb?
I've always used a 1 Gb USB stick with a 256 Mb swap, never seen the router use the full swap space. I guess it varies depending how may processes your running.

Code:
             total       used       free     shared    buffers     cached
Mem:        255684     212520      43164          0       4292      59740
-/+ buffers/cache:     148488     107196
Swap:       262140      18860     243280
 
I've always used a 1 Gb USB stick with a 256 Mb swap, never seen the router use the full swap space. I guess it varies depending how may processes your running.

Code:
             total       used       free     shared    buffers     cached
Mem:        255684     212520      43164          0       4292      59740
-/+ buffers/cache:     148488     107196
Swap:       262140      18860     243280
Under serious load, I have seen the router swap up to between 256 and 512 mb range (pretty router demanding processes), but nothing really past that. You would see the most swap use once the initial start of the resource demanding load peaks, then it eventually it would ween off as more resource space became free. I would always recommend at least 1gb for that little extra forgiveness, but always remember the swap is to supplement and not to supplant. I always go for 2gb because I buy bigger memory storage. Having a 1gb stick is very limited as far as space is concerned.
 
I have pushed a hotfix for amtm, there is no version change.

What's new
New: ARM Routers with a kernel version 3.2 or higher install Entware version armv7sf-k3.2
No change: ARM routers with older kernels install Entware version armv7sf-k2.6

This change only applies for new Entware installations through amtm.
Diversion's own Entware installer still installs armv7sf-k2.6 until an update is posted.

How to update

Use uu to force update amtm to this latest version

Further reading for those interested:
Thanks to @dave14305 for giving me a hint in this thread.
 
I have pushed a hotfix for amtm, there is no version change.

What's new
New: ARM Routers with a kernel version 3.2 or higher install Entware version armv7sf-k3.2
No change: ARM routers with older kernels install Entware version armv7sf-k2.6

This change only applies for new Entware installations through amtm.
Diversion's own Entware installer still installs armv7sf-k2.6 until an update is posted.

How to update
Use uu to force update amtm to this latest version

Further reading for those interested:
Thanks to @dave14305 for giving me a hint in this thread.
Thanks @thelonelycoder , update went well.
After updating amtm, I needed to uninstall the existing entware. I also uninstalled the 3 addons (ntpmerlin, scmerlin and connmon).
Did a reboot then setup swap/entware again.
Great job, wireguard-go now shows up and I have installed it. Still learning how to configure wireguard so I haven't run it yet.

BTW, entware shows 2 versions of wireguard-go - wireguard-go and wireguard-go-nohf.

I know the "nohf" is for arm cpus that don't support hard float.
Anyone know if the BCM SOC on the AX58U supports hard float?
 
I have pushed a hotfix for amtm, there is no version change.

What's new
New: ARM Routers with a kernel version 3.2 or higher install Entware version armv7sf-k3.2
No change: ARM routers with older kernels install Entware version armv7sf-k2.6

This change only applies for new Entware installations through amtm.
Diversion's own Entware installer still installs armv7sf-k2.6 until an update is posted.

How to update
Use uu to force update amtm to this latest version

Further reading for those interested:
Thanks to @dave14305 for giving me a hint in this thread.
Thanks for the update. If I'm not mistaken the latest release is 3.10 not 3.20? I've reinstalled twice now after updating but I'm only getting 3.10 on my AC-86U.
 
Thanks for the update. If I'm not mistaken the latest release is 3.10 not 3.20? I've reinstalled twice now after updating but I'm only getting 3.10 on my AC-86U.
The RT-AC86U runs on aarch64 architecture, you have chosen to install the 64bit Entware version. All is fine.
 
Couple odd behaviours I stumbled on with AMTM today.

My router reboot cron got broken somehow and router was behaving erratically after being up for about a month (doesn't seem - famous last words - to be compromised but that's a different story...) External disk had unmounted and router had a lot of stuck processes. Before I discovered this and rebooted, I ran AMTM to use utilities and found 2 things that don't really seem right in terms of expected behaviors?

1. When AMTM started up first time, it didn't see the swap file, and immediately 'helpfully' told me it was deleting references to it from post-mount. Ummm. Thanks. But really would have been nice if NO please don't do that. When I finally got into swap utility (see #2 below) and then tried to recreate swap I got messages about multiple swap files etc. etc. Would have been nice if instead of deleting the swap reference it just reported "something is effed with your swap" or at least "do you want to delete it" etc. because really it should have left everything alone since on reboot once the disk mounted again everything would be fine. In otherwords the possibility of a temporarily dropped mount should be taken into account before hard-editing the post-mount script.

2. Similiarly - with internet connection down, AMTM will not process the "i" command. Seems from the messages this is either because NTP is not sync'd or perhaps because Entware module returns an error. See screenshot below. Expected behavior would be to see an error, but to continue to list the other menu options (like be able to use swap utility even if there's no internet connection).
 

Attachments

  • AMTM.i.fail.png
    AMTM.i.fail.png
    131.3 KB · Views: 131
1. When AMTM started up first time, it didn't see the swap file, and immediately 'helpfully' told me it was deleting references to it from post-mount. Ummm. Thanks. But really would have been nice if NO please don't do that. When I finally got into swap utility (see #2 below) and then tried to recreate swap I got messages about multiple swap files etc. etc. Would have been nice if instead of deleting the swap reference it just reported "something is effed with your swap" or at least "do you want to delete it" etc. because really it should have left everything alone since on reboot once the disk mounted again everything would be fine. In otherwords the possibility of a temporarily dropped mount should be taken into account before hard-editing the post-mount script.
That behavior is coded with the best interests of the users in mind. If no swap file is present, the reference in post-mount is removed. On the other hand, if a swap file is found on one or multiple of your attached devices it either adds it to post-mount or warns you when multiple files are found.

This is done automatically.

2. Similiarly - with internet connection down, AMTM will not process the "i" command. Seems from the messages this is either because NTP is not sync'd or perhaps because Entware module returns an error. See screenshot below. Expected behavior would be to see an error, but to continue to list the other menu options (like be able to use swap utility even if there's no internet connection).
That is expected behavior, while you pressed i, the attached device was somehow recovered and mounted (not an action by amtm). Therefore it wanted to download the missing Entware file it deleted previously.

amtm auto-deletes unneeded and also auto-retrieves or missing files. That's the beauty of amtm, it discovers what's installed and loads the necessary modules.
With no internet connection, the auto-download feature will fail as you can see.

Check your attached device by enabling dc in amtm, then reboot the router to let it run during startup.
 
That behavior is coded with the best interests of the users in mind. If no swap file is present, the reference in post-mount is removed. On the other hand, if a swap file is found on one or multiple of your attached devices it either adds it to post-mount or warns you when multiple files are found.

This is done automatically.


That is expected behavior, while you pressed i, the attached device was somehow recovered and mounted (not an action by amtm). Therefore it wanted to download the missing Entware file it deleted previously.

amtm auto-deletes unneeded and also auto-retrieves or missing files. That's the beauty of amtm, it discovers what's installed and loads the necessary modules.
With no internet connection, the auto-download feature will fail as you can see.

Check your attached device by enabling dc in amtm, then reboot the router to let it run during startup.
OK. So we disagree about 1. I know it is "done automatically", very obviously that's exaclty what I said it did - but i'm saying that as a not-the-developer-person user, this is not what I would expect the behavior to be - to at least have a prompt that says "confirm this" is what I would expect. Again. Having a temporary dropped mount is a VERY common possibility, you really should consider not "fixing" something that isn't a permanent error but is a temporary condition by allowing the user to indicate so. Everywhere else you have nice confirmation promtps so its weird you do this automatically without a chance to say "nope - please leave it, it'll be fine when I reboot".

You're missing the point entirely on 2. OF course it can't get the module with internet donw. But with internet down it would not process the "i" command and continue on to show the other command options. the label for "i" is "Show all available tools". When it hit an error on not being able to get Entware, it failed out the bottom and did not "Show all available tools". Not being able to get Entware should not affect whether I can see the other tools.
 
You can disagree (quietly, or respectfully) about anything.

But, when you're talking about a work of passion for a single person who has poured his soul into his script, you're offside. Particularly after he's stated his reasons.

Either use the tool(s) he has offered or don't. Don't belittle him though for what he has offered to the world, for free.

If you can do better (as you obviously think you can), code it as you want it then.

We've lost too many developers from negative comments and entitled attitudes, already.
 
OK. So we disagree about 1. I know it is "done automatically", very obviously that's exaclty what I said it did - but i'm saying that as a not-the-developer-person user, this is not what I would expect the behavior to be - to at least have a prompt that says "confirm this" is what I would expect. Again. Having a temporary dropped mount is a VERY common possibility, you really should consider not "fixing" something that isn't a permanent error but is a temporary condition by allowing the user to indicate so. Everywhere else you have nice confirmation promtps so its weird you do this automatically without a chance to say "nope - please leave it, it'll be fine when I reboot".
I'm OK with disagreeing on this point and I can live with it.
You're missing the point entirely on 2. OF course it can't get the module with internet donw. But with internet down it would not process the "i" command and continue on to show the other command options. the label for "i" is "Show all available tools". When it hit an error on not being able to get Entware, it failed out the bottom and did not "Show all available tools". Not being able to get Entware should not affect whether I can see the other tools.
I am not missing the point, not at all. It's just that as the developer, I know intimately how amtm works.
You see, every time the amtm screen is rebuilt - for instance when i is entered - it checks the presence for each script to be able to display what is installed or not. If a module is missing it will try to download it, no matter the option you select.

That's just the way amtm works, it has no configuration file to tell it what scripts are installed. It simply checks every time the screen is reloaded.

I see no reason to change any of its behavior, amtm has been around for a long time. Unless I made a grave mistake, of course.
 
You can disagree (quietly, or respectfully) about anything.

I think you’re massively overreacting to what should be a reasonable discussion about the functionality. I would have to check and see in this case but I frequently make voluntary donations to public developers etc.
 
That's just the way amtm works, it has no configuration file to tell it what scripts are installed. It simply checks every time the screen is reloaded.

I see no reason to change any of its behavior, amtm has been around for a long time. Unless I made a grave mistake, of course.
Again I’m not sure if you’re getting what I’m saying. With full and well due respect.


I have no problem with it trying to download all the modules.
But after not finding entware why doesn’t it go on to show for instance the SW option if it fails at entware? Or to show the red menu options for other uninstalled moduels?

That’s what I’m getting at. It failed entware so it doesn’t show any uninstalled modules or the swap option.
 
Again I’m not sure if you’re getting what I’m saying. With full and well due respect.
Please read what I said. It's how amtm works, that's why it wants to download the deleted entware module.
And it would work just fine if only the router had an active internet connection so amtm could do its thing. After all, what are routers for? Certainly not a paperweight.
 
No matter what USB disk I try my AC-86U just seems to drop USB connection. It can sometimes last 10 days before it does it.
If I re-insert the USB it detects it again.
If I reboot the router it detects it again.

I have enabled dcl and this is my log:

Code:
(original check, when I first installed the scripts on my new USB)
Wed Sep 22 14:23:27 EDT 2021 Probing 'ext4' on device /dev/sda1
Running disk check v3.0, with command 'e2fsck -p' on /dev/sda1
teamnew: clean, 718/967232 files, 638150/3868668 blocks
Wed Sep 22 14:23:28 EDT 2021 Disk check done on /dev/sda1

(This check must have been done when I found the USB was no longer detected by the router, unplugged it and plugged it back in)
Wed Sep 29 13:41:41 EDT 2021 Probing 'ext4' on device /dev/sda1
Running disk check v3.0, with command 'e2fsck -p' on /dev/sda1
teamnew: recovering journal
teamnew: Clearing orphaned inode 260468 (uid=65534, gid=0, mode=0100640, size=8504450)
teamnew: clean, 1184/967232 files, 638801/3868668 blocks
Wed Sep 29 13:41:52 EDT 2021 Disk check done on /dev/sda1

(This check was done on a reboot)
Wed Sep 29 13:43:35 EDT 2021 Probing 'ext4' on device /dev/sda1
Running disk check v3.0, with command 'e2fsck -p' on /dev/sda1
teamnew: clean, 1185/967232 files, 638801/3868668 blocks
Wed Sep 29 13:43:35 EDT 2021 Disk check done on /dev/sda1

I had thought this was solved by purchasing a new USB disk but I had this problem also with my older USBs. Since I had it I did a full factory reset of firmware and set everything up by scratch. My installed utilities:
Code:
 1  open     Diversion                 v4.2.0
2  open     Skynet                    v7.2.6
3  open     FlexQoS                   v1.2.5

7  open     unbound Manager            v3.22

ep manage   Entware packages

dc manage   Disk check script   dcl show log
fd run      Format disk         fdl show log
sw manage   Swap file /mnt/teamnew 2.0G

I have tried both ports, USB 3 port in USB 2 mode, and USB 2 port. Both have the same issue. I can't see how this can be a problem with the USB disks themselves since I've now tried 5 different brands, including some brand new Team Group 16gbs.

Anyone else with these issues? Is my AC86U borked?
 

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