What's new

Entware Problem mounting opt / installing entware

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

What is the output of "echo $PATH" ?
Bash:
/opt/bin:/opt/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/home/Admin:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin


What is the output of "cat /etc/profile" ?
Bash:
export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/home/$USER:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin"
export PS1='\u@\h:\w\$ '
export LD_LIBRARY_PATH=/lib:/usr/lib:/lib/aarch64

alias l='ls -lFA'
alias ll='ls -lF'

ldd() {
        LD_TRACE_LOADED_OBJECTS=1 $*;
}

[ -n "${TMOUT+x}" ] || export TMOUT="$(nvram get shell_timeout 2>/dev/null)"

enable=`nvram get enable_core_dump`
if [ ! -z $enable ]; then
        mount ubi:rootfs_ubifs / -t ubifs -o remount,rw
        ulimit -c unlimited
        echo 1 > /proc/sys/kernel/core_uses_pid
        echo "/tmp/core-%e-%g-%p-%s-%t-%u" > /proc/sys/kernel/core_pattern
        echo 2 > /proc/sys/fs/suid_dumpable
fi
[ -f /jffs/etc/profile ] && . /jffs/etc/profile
[ -f /opt/etc/profile ] && . /opt/etc/profile


Does running the following command makes you able to use just opkg command afterwards ?
Code:
export PATH=/opt/bin:/opt/sbin:$PATH

Running export path didn't help
 
Running export path didn't help
Everything looks fine to me, assuming /opt/bin/opkg exists it should be working.
What about calling it with the full path, does it still doesn't work?
Maybe data gets corrupted by the filesystem check ? (you can disable it with "nvram set stop_fsck 1 && nvram commit")
Getting out of ideas here
 
Everything looks fine to me, assuming /opt/bin/opkg exists it should be working.
What about calling it with the full path, does it still doesn't work?
Maybe data gets corrupted by the filesystem check ? (you can disable it with "nvram set stop_fsck 1 && nvram commit")
Getting out of ideas here
Sorry I think I made a mistake, it just seems like it still doesn't mount it properly:
1699537861658.png
 
So it's TUF AX3000 v2 not just AX3000, I believe it is supported in GNUton's Merlin fork by the way.

So, did the workaround work or not?
 
Does this return anything:
Code:
nvram show | grep apps_

Code:
apps_analysis=0
apps_depend_action=
apps_depend_action_target=
apps_depend_do=
apps_dev=
apps_download_file=
apps_download_percent=
apps_install_folder=asusware.arm
apps_ipkg_old=0
apps_ipkg_server=http://nw-dlcdnet.asus.com/asusware/arm_new/stable
apps_local_space=/rom
apps_mounted_path=
apps_new_arm=1
apps_state_action=
apps_state_autofix=1
apps_state_autorun=4
apps_state_cancel=
apps_state_enable=
apps_state_error=
apps_state_install=
apps_state_remove=
apps_state_stop=
apps_state_switch=
apps_state_update=
apps_state_upgrade=
apps_swap_enable=0
apps_swap_file=.swap
apps_swap_size=33000
apps_swap_threshold=
apps_wget_timeout=30

Sadly they only support V1
Ahh, you're right, I see it's just very much requested.
 
nvram show | grep apps_
Here is my output:
Code:
apps_analysis=0
apps_depend_action=
apps_depend_action_target=
apps_depend_do=
apps_dev=sda1
apps_download_file=
apps_download_percent=
apps_install_folder=asusware.arm
apps_ipkg_old=0
apps_ipkg_server=http://nw-dlcdnet.asus.com/asusware/arm_new/stable
apps_local_space=/rom
apps_mounted_path=/tmp/mnt/opt_drive
apps_new_arm=1
apps_state_action=
apps_state_autofix=1
apps_state_autorun=
apps_state_cancel=
apps_state_enable=
apps_state_error=
apps_state_install=
apps_state_remove=
apps_state_stop=
apps_state_switch=
apps_state_update=2
apps_state_upgrade=
apps_swap_enable=0
apps_swap_file=.swap
apps_swap_size=33000
apps_swap_threshold=
apps_wget_timeout=30
size: 68089 bytes (128519 left)
 
Yeah it seems like workaround won't work, apps_state_autorun should be set to 4 by the router when successfully mounted the asusware folder, apps_state_update is 2 - so it ran but at that point the autorun one should be 3...

You're probably missing a trigger that makes it all work, installing Download Master sets that "flag" (or whatever that is that's required) but since you can't install it I have no idea how to set it.
 
Yeah it seems like workaround won't work, apps_state_autorun should be set to 4 by the router when successfully mounted the asusware folder, apps_state_update is 2 - so it ran but at that point the autorun one should be 3...

You're probably missing a trigger that makes it all work, installing Download Master sets that "flag" (or whatever that is that's required) but since you can't install it I have no idea how to set it.
OK!, some good news.
I have manged to locate another thumb drive I had laying around which I used for Ventoy and when I plugged it in instead I got the download master icon.
So I formatted the drive to ext2, installed Download Master and redid your guide.
After that I installed Entware and after a reboot I had the opkg running but I encountered another problem, when I tried to install tailscale I got the following error:
Code:
Unknown package 'tailscale'.
Collected errors:
 * make_directory: Cannot create directory `/opt/var': Read-only file system.
 * make_directory: Cannot create directory `/opt/var': Read-only file system.
 * opkg_install_cmd: Cannot install package tailscale.

So it seems to mount the drive but as read only, am I getting this right?
 
* make_directory: Cannot create directory `/opt/var': Read-only file system.
Did you use official Entware install instructions here? They do not work because /opt/var doesn't exist and /opt is a directory on readonly root.
This is why the only working method of mounting is to
Code:
mount --bind /tmp/mnt/sda/entware /opt
 
Did you use official Entware install instructions here? They do not work because /opt/var doesn't exist and /opt is a directory on readonly root.
This is why the only working method of mounting is to
Code:
mount --bind /tmp/mnt/sda/entware /opt
[/QUOTE]
isn't that the point of the startup.sh script, you asked me to debug it so we know for sure that it is being called and does have "mount --bind":
Code:
RGET_PATH="/tmp/mnt/entware_drive"

if mount | grep -q "on /opt "; then # asusware might be mounted here, get rid of it
   sleep 10 # asusware will make /opt mount busy for few secs, wait a bit... increase this as needed
   umount /opt
fi

[ ! -f "$TARGET_PATH/entware/etc/init.d/rc.unslung" ] && { logger -s "Entware folder not found on $TARGET_PATH"; exit 1; }
mount --bind "$TARGET_PATH/entware" /opt && logger -s "Mounted $TARGET_PATH/entware on /opt"
/opt/etc/init.d/rc.unslung start

BTW, where is the log file that has the script output located?
 
isn't that the point of the startup.sh script, you asked me to debug it so we know for sure that it is being called and does have "mount --bind":
Code:
RGET_PATH="/tmp/mnt/entware_drive"

if mount | grep -q "on /opt "; then # asusware might be mounted here, get rid of it
   sleep 10 # asusware will make /opt mount busy for few secs, wait a bit... increase this as needed
   umount /opt
fi

[ ! -f "$TARGET_PATH/entware/etc/init.d/rc.unslung" ] && { logger -s "Entware folder not found on $TARGET_PATH"; exit 1; }
mount --bind "$TARGET_PATH/entware" /opt && logger -s "Mounted $TARGET_PATH/entware on /opt"
/opt/etc/init.d/rc.unslung start

BTW, where is the log file that has the script output located?
The script is truncated at the start and won't run, not sure if copy error just in the post or on the router, my guess is it's on the router since letter A enables input in vi so everything after that letter went into the file and you didn't notice.
The log goes to the syslog, readable in the webui.
 
Last edited:
The script is truncated at the start and won't run.
The log goes to the syslog, readable in the webui.
Yeah I actually played around with it and just edited so it would be like the Entware installation guide:
Code:
sleep 5
mount --bind /tmp/mnt/entware_drive/entware /opt

and that seems to do the trick!

But I also encountered another problem, when I tried to run Tailscale i got the following:
Code:
Failed to connect to local Tailscale daemon for /localapi/v0/profiles/; not running? Error: dial unix /opt/var/run/tailscale/tailscaled.sock: connect: no such file or directory

Since I don't have experience with non Debian systems, I don't know how to start the service - systemctl deosn't exist..
Is there any equivalent for systemd? (I don't even know what asuswrt is based on)
 
But I also encountered another problem, when I tried to run Tailscale i got the following:
Code:
Failed to connect to local Tailscale daemon for /localapi/v0/profiles/; not running? Error: dial unix /opt/var/run/tailscale/tailscaled.sock: connect: no such file or directory

Since I don't have experience with non Debian systems, I don't know how to start the service - systemctl deosn't exist..
Is there any equivalent for systemd? (I don't even know what asuswrt is based on)
Right after installation the daemon isn't started by opkg, use this to start it: "/opt/etc/init.d/S06tailscaled start"
 
Am assuming

is a symlink to
Code:
/opt/etc/init.d/tailscaled

If so may as well use it direct and save some typing.
There is only S06tailscaled, it's like this for the startup ordering.
 
Right after installation the daemon isn't started by opkg, use this to start it: "/opt/etc/init.d/S06tailscaled start"
It does start the daemon but when I ping one of my devices it just dies after I stop the ping ( hit CTRL + C):
Code:
Admin@TUF-AX3000_V2-5848:/tmp/home/root# /opt/etc/init.d/S06tailscaled start
 Starting tailscaled...              done.
Admin@TUF-AX3000_V2-5848:/tmp/home/root# /opt/etc/init.d/S06tailscaled check
 Checking tailscaled...              alive.
Admin@TUF-AX3000_V2-5848:/tmp/home/root# ping 100.104.179.149
PING 100.104.179.149 (100.104.179.149): 56 data bytes
64 bytes from 100.104.179.149: seq=0 ttl=128 time=727.683 ms
64 bytes from 100.104.179.149: seq=1 ttl=128 time=2.664 ms
64 bytes from 100.104.179.149: seq=2 ttl=128 time=2.044 ms
64 bytes from 100.104.179.149: seq=3 ttl=128 time=1.659 ms
^C
--- 100.104.179.149 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 1.659/183.512/727.683 ms

Admin@TUF-AX3000_V2-5848:/tmp/home/root# /opt/etc/init.d/S06tailscaled check
 Checking tailscaled...              dead.
Admin@TUF-AX3000_V2-5848:/tmp/home/root#
At first I thought it might be from a MagicDNS collision, but the same thing happened when I disabled MagicDNS..

Thank God for that! systemd is rather an abomination...
Why do you think that?, seems to do the job for me.
 
The /etc/init.d stuff is left over from what was commonly used prior to systemd, which itself greatly extends and convolutes the init functionality.
 
It does start the daemon but when I ping one of my devices it just dies after I stop the ping ( hit CTRL + C):
Code:
Admin@TUF-AX3000_V2-5848:/tmp/home/root# /opt/etc/init.d/S06tailscaled start
 Starting tailscaled...              done.
Admin@TUF-AX3000_V2-5848:/tmp/home/root# /opt/etc/init.d/S06tailscaled check
 Checking tailscaled...              alive.
Admin@TUF-AX3000_V2-5848:/tmp/home/root# ping 100.104.179.149
PING 100.104.179.149 (100.104.179.149): 56 data bytes
64 bytes from 100.104.179.149: seq=0 ttl=128 time=727.683 ms
64 bytes from 100.104.179.149: seq=1 ttl=128 time=2.664 ms
64 bytes from 100.104.179.149: seq=2 ttl=128 time=2.044 ms
64 bytes from 100.104.179.149: seq=3 ttl=128 time=1.659 ms
^C
--- 100.104.179.149 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 1.659/183.512/727.683 ms

Admin@TUF-AX3000_V2-5848:/tmp/home/root# /opt/etc/init.d/S06tailscaled check
 Checking tailscaled...              dead.
Admin@TUF-AX3000_V2-5848:/tmp/home/root#
At first I thought it might be from a MagicDNS collision, but the same thing happened when I disabled MagicDNS..


Why do you think that?, seems to do the job for me.
Check tailscaled logs? Make sure to not run "--no-logs-no-support" option, check the S06tailscaled file if it has it.
I am pretty sure you will need custom iptables rules if you want it to be an exit node.
 
Last edited:

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