Help to Install Linix USB server on GL.iNet GL-AR300M16

My router: GL-AR300M-b2c-NOR

Router info:

cat /proc/version:

Linux version 4.14.241 (glinet@glinet) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11257-5090152ae3)) #0 Thu Jul 29 19:50:28 2021

/proc/cpuinfo:

 
system type             : Qualcomm Atheros QCA9533 ver 2 rev 0
machine                 : GL.iNet GL-AR300M (NOR)
processor               : 0
cpu model               : MIPS 24Kc V7.4
BogoMIPS                : 432.53
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16
Options implemented     : tlb 4kex 4k_cache prefetch mcheck ejtag llsc dc_aliases perf_cntr_intr_bit nan_legacy nan_2008 perf
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

I’m trying to install a Linux USB server
https://www.virtualhere.com/

and I’m getting this error:

root@GL-AR300M:~# curl https://raw.githubusercontent.com/virtualhere/script/main/install_server | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1112  100  1112    0     0   3005      0 --:--:-- --:--:-- --:--:--  3021
Downloading 'https://www.virtualhere.com/sites/default/files/usbserver/vhusbdmips'
Connecting to 143.198.145.150:443
Writing to 'vhusbdmips'
vhusbdmips           100% |*******************************|   398k  0:00:00 ETA
Download completed (408120 bytes)
mv: can't rename 'vhusbdmips': No such file or directory
Error, only systemd is supported

Tell me, what am I doing wrong and how can I install a USB server?

.......
wget https://www.virtualhere.com/sites/default/files/usbserver/$FILENAME
chmod +x $FILENAME
mv $FILENAME /usr/local/sbin
.................

you need to tweak the installation script, which is an easy job! After the script downloads the file, it moves it to the path: /usr/local/sbin. However this path does not exist on your router:

# find / -name sbin
/overlay/upper/sbin
/overlay/upper/usr/sbin
/rom/sbin
/rom/usr/sbin
/sbin
/usr/sbin

The script then tries to write a systemd file, but GL’s Openwrt does not have it! So it will fail again. You can however follow this guide to write your own simple startup service: [OpenWrt Wiki] procd init scripts

It is better to read the script steps one by one and then executing it on the shell by yourself.

1 Like