What's new

Mega-cmd

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

vrapp

Senior Member
Couple of years ago according to this thread it was possible to configure the router to upload from USB drive to Mega cloud storage. Back then it was accomplished by entware package "meganz-sdk". Today meganz-sdk is no longer among entware packages; instead there's mega-cmd, which as I understand is offered by megnza.nz itself. I installed it on the router by entware, but it does not seems to work because of this error:

mega-cmd-server: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

This appears to be known problem, according to https://github.com/meganz/MEGAcmd/issues/109 ; the solutions seem to rotate around command "ldconfig". But when I logon to the router by SSH , "ldconfig is not found", and since I'm not a Linux person, maybe someone more proficient in it would advise how to fix this problem
 
Couple of years ago according to this thread it was possible to configure the router to upload from USB drive to Mega cloud storage. Back then it was accomplished by entware package "meganz-sdk". Today meganz-sdk is no longer among entware packages; instead there's mega-cmd, which as I understand is offered by megnza.nz itself. I installed it on the router by entware, but it does not seems to work because of this error:

mega-cmd-server: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

This appears to be known problem, according to https://github.com/meganz/MEGAcmd/issues/109 ; the solutions seem to rotate around command "ldconfig". But when I logon to the router by SSH , "ldconfig is not found", and since I'm not a Linux person, maybe someone more proficient in it would advise how to fix this problem
You may look at rclone, it is available via entware. And I believe it supports mega
 
rclone 1.63.1 works fine on my AX6000:
Code:
➜ rclone --version
rclone 1.63.1
- os/version: unknown
- os/kernel: 4.19.183 (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.20.7
- go/linking: static
- go/tags: noselfupdate
Note: I sync / back up files to OneDrive (not Mega).
 
admin@HOMELAN:/tmp/mnt/sda1/entware/bin# opkg install rclone
Installing rclone (1.63.1-1) to root...
Downloading https://bin.entware.net/armv7sf-k2.6/rclone_1.63.1-1_armv7-2.6.ipk
Configuring rclone.
admin@HOMELAN:/tmp/mnt/sda1/entware/bin# rclone config
Illegal instruction
admin@HOMELAN:/tmp/mnt/sda1/entware/bin# rclone
Illegal instruction
Wonder if you dont have a issue with your entware install? just installed rclone on a new AX86U pro and it works fine.
 
Mine is AC68U. Could it be that "illegal instruction" means it's for another processor?
 
Last edited:
I posted this problem with rclone on rclone forum, and someone replied:

I'm not a Linux person, so maybe someone would post instructions how to install it, or updated the package in entware. The instructions on https://rclone.org/downloads/ use sudo, but if I understand correctly, sudo is not one of the commands on the router's Linux.
 
Last edited:
sudo is unnecessary on the router as you already have superuser privileges there.

I fetched their install.sh and wouldn't mess with it for a minute. Most of it doesn't even pertain.

Highlight the following code snippet (derived from their install.sh) and copy it into your clipboard. Then ssh into your router and paste it into the prompt, then hit "enter" if necessary. The last line appearing before the new prompt (it'll be the only line not preceded by a ">") will be the "linux" zip file you need to download. unzip it and scp it over to your router, or if using a thumb drive or such, copy it to that. All you need is the executable on the router. I don't rightly know how you'd want to keep your resulting ~/.config/rclone/rclone.conf between reboots - haven't investigated that aspect. Maybe just substitute the executable into the entware package after it's installed?

Code:
case `uname -m` in
  x86_64|amd64)
    echo 'amd64'
    ;;
  i?86|x86)
    echo '386'
    ;;
  aarch64|arm64)
    echo 'arm64'
    ;;
  armv7*)
    echo 'arm-v7'
    ;;
  armv6*)
    echo 'arm-v6'
    ;;
  arm*)
    echo 'arm'
    ;;
  *)
    echo 'OS type not supported'
    ;;
esac
 
Mine is AC68U. Could it be that "illegal instruction" means it's for another processor?

Or a bad build - double check to ensure you're on the right source for entware as it's optimized for different SoC's...
 
I ran the script, and it returned arm-v7.
SSH to the router and ran rclone, ensured that it's not found, to eliminate the possibility of an old version.
In Windows I downloaded "ARMv7 - 32 Bit" for Linux from https://rclone.org/downloads/; extracted rclone and rclone.1 to the network drive, which is mounted USB storage at the router accessible as SAMBA in the home LAN.
In SSH on the router :

admin@HOMELAN:/tmp/mnt/sda1/entware/bin# rclone config
Illegal instruction
 
You don't need the rclone.1 file if you don't have a version of troff on the router. The README.txt file is the same information in plain text.

Inspired by your post I completely went through the process above on an XT8 which netted the same "arm-v7". I fetched the appropriate zip file, unzipped it on my computer and scp'd the executable over to the router's /tmp directory. ssh'd into the router I ran "/tmp/rclone config" and was "in" the interactive setup. That's as far as I went with it.

I'm thinking you've got some environment/configuration stuff via entware that's messing with things. The executable in question is statically linked so it has everything it needs within itself. ssh into the router, change your working directory to wherever the executable is, and enter "./rclone config" to see what happens for you. If, as I suspect it will, it functions correctly, you'll need to mine through the wrapping stuff entware is using as it's incompatible.
 
Downloaded and unzipped https://downloads.rclone.org/v1.65.0/rclone-v1.65.0-linux-arm-v7.zip into directory c:\amd

In Windows:

C:\Users\usera>pscp -scp c:\amd\rclone admin@192.168.1.1:/tmp/
admin@192.168.1.1's password:
rclone | 52864 kB | 4066.5 kB/s | ETA: 00:00:00 | 100%

In SSH on the router:
admin@HOMELAN:/tmp# /tmp/rclone config
-sh: /tmp/rclone: Permission denied
admin@HOMELAN:/tmp# chmod +x /tmp/rclone
admin@HOMELAN:/tmp# /tmp/rclone config
Illegal instruction
admin@HOMELAN:/tmp# ./rclone
Illegal instruction
 
That's odd, but seems definitive. Sorry I couldn't help any better.

This is the point I'd employ strace, but highly doubt it's been included in the firmware.
 
Downloaded and unzipped https://downloads.rclone.org/v1.65.0/rclone-v1.65.0-linux-arm-v7.zip into directory c:\amd

In Windows:

C:\Users\usera>pscp -scp c:\amd\rclone admin@192.168.1.1:/tmp/
admin@192.168.1.1's password:
rclone | 52864 kB | 4066.5 kB/s | ETA: 00:00:00 | 100%

In SSH on the router:
admin@HOMELAN:/tmp# /tmp/rclone config
-sh: /tmp/rclone: Permission denied
admin@HOMELAN:/tmp# chmod +x /tmp/rclone
admin@HOMELAN:/tmp# /tmp/rclone config
Illegal instruction
admin@HOMELAN:/tmp# ./rclone
Illegal instruction
Have you tried rclone-v1.65.0-linux-arm.zip? I don't think that the AC68U CPU supports v7
 

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