3

I just got an asus dsl-ac68u modem/router and I noticed it has ssh access. I set this up and I can ssh in with root permissions, but it doesn't seem to have a package manager installed. Being used to Debian, just to test, I tried:

# apt-get install vim

but got the following response:

-sh: apt-get: not found

how can I figure out if there is a package manager installed? i thought about trying to find out the distro that is running, but I can't even figure that out:

# cat /proc/version
Linux version 2.6.36.4brcmarm (sam@SW5-Server-50) (gcc version 4.5.3 (Buildroot 2012.02) ) #10 SMP PREEMPT Tue Jul 14 16:24:32 CST 2015
# uname -a
Linux (none) 2.6.36.4brcmarm #10 SMP PREEMPT Tue Jul 14 16:24:32 CST 2015 armv7l GNU/Linux
# ls /etc/*elease*
ls: /etc/*elease*: No such file or directory
# ls /etc/*ersion*
ls: /etc/*ersion*: No such file or directory

It seems to be some customized version of Linux, and not any particular distro. how can I install apt on such a device?

3 Answers 3

5

Only within a chroot using debootstrap, if the architecture is supported. Don't mess up the real filesystem. I believe this approach has been popular on certain NAS devices, e.g. http://www.rooot.net/en/geek-stuff/synology/39-chroot-debian-synology-debootstrap.html

The router will almost certainly not be designed to alter the filesystem (treated as ROM). Hence the lack of package manager. This means your chroot will have to be in tmpfs or a mounted usb device.

tmpfs will obviously not survive reboots :). And won't be big enough to reliably run debian. You'll have to use a usb storage device.

You may wish to participate in openwrt development for your device.

Looking at the specs there's enough ram to have some fun with, and the processor looks good too so a Debian chroot on usb might just be an option. However remember that in this case you will be limited by the original kernel+modules, which may not be intended for your desired uses.

5

As you can find out on WikiDevi or Asus's website, this router runs AsusWRT. AsusWRT is a derivative of Tomato which is itself one of the descendants of HyperWRT, a Linux distribution for low-end network appliances such as routers.

With only 8MB of flash, you aren't going to be able to install extra software there. However, there is a USB port where you can plug in storage media, and run code from there.

With the original Asus image, you can install additional programs through Optware. Optware comes with the package manager ipkg.

You may also be interested in the community firmware asuswrt-merlin.

I don't recommend attempting to install Debian packages as the device is pretty limited (only 64MB of RAM). Get a package source that targets smaller devices, even if it means learning a new package manager.

1
  • 1
    If you want to use ipkg you will need /opt/ to all be setup. This can be achieved by enabling the Download Manager on the USB drive. This will then create all the necessary symlinks Commented May 9, 2016 at 20:57
0

From https://github.com/RMerl/asuswrt-merlin/wiki/Entware

Entware is a modern alternative to Optware. Originally designed for OpenWRT, it is also usable by other firmware platforms such as DD-WRT or Tomato. You can also set this up on your Asuswrt-Merlin based router.

....

The easy way Starting with v3.0.0.4.270.25 a new script has been introduced to facilitate Entware installation. After installing a USB drive (Do Not Install DownloadMaster), just type in terminal:

entware-setup.sh

Then, you can

opkg list
opkg install software_name
opkg remove software_name

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .