What's new

RT-86U - USB 2.0 port not mounting at boot.

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

Yes, I supposed so. Infact I'm with Entware installed and Diversion running.
How can I install it ?
 
From memory....
Code:
# opkg install sysstat
# /opt/etc/init.d/S99sysstat start
Then verify that it is working by issuing this command:
Code:
# sar -d 2 5
Assuming that works you need to setup the data collection. You need to add these two lines to one of your existing startup scripts. I suggest that you find out which script is starting Entware (rc.unslung start) and then add them just after that.
Code:
cru a sa1 "*/10 * * * * /opt/lib/sysstat/sa1 600 1 -S DISK"
cru a sa2 "59 23 * * * /opt/lib/sysstat/sa2 -A"

N.B. You do see the irony of installing diagnostic tools onto the device that is failing. :D

EDIT: Entware's sa2 command is currently broken so the cru entry for 23:59 does nothing. Even if you fix the sa2 script you might want to remove that cru command anyway as by default it deletes data files more than 8 days old.
 
Last edited:
OK Thanks.
For the moment it's enough for my skill.
I'll be back when all is installed and working :)
 
Well rats. This has now happened again to me. This is the third time in six months. My 86U seems to have rebooted itself two days ago and the thumb drive didn't mount. When next I travel from this safe country with universal health care to the septic swamp 4000 miles away where this router is, I'll troubleshoot. Fortunately the OpenVPN comes up fine.

I feel confident, as before, that unplugging and replugging the thumb drive will cure all.
 
Very similar behaviour. In my case unplugging and replugging the drive did not cure and the key was not anymore usable.
Now I have installed sysstat and hopefully with the help of sar we can start and debug my issue.
I still need to set cron for data collection but right now I have not yet seen anything strange.

Code:
ASUSWRT-Merlin RT-AC86U 384.17_0 Sun Apr 26 02:28:53 UTC 2020
miazza@RT-AC86U-3150:/tmp/home/root# sar -d 2 5
Linux 4.1.27 (RT-AC86U-3150)    06/17/20        _aarch64_       (2 CPU)

15:12:25          DEV       tps    rkB/s     wkB/s     dkB/s  areq-sz    aqu-sz     await    %util
15:12:27       dev8-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:12:27      dev8-16      0.50      0.00     29.70      0.00    60.00      0.21    430.00    21.29

15:12:27          DEV       tps    rkB/s     wkB/s     dkB/s  areq-sz    aqu-sz     await    %util
15:12:29       dev8-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:12:29      dev8-16      1.00      0.00     11.94      0.00    12.00      0.00      5.00      0.50

15:12:29          DEV       tps    rkB/s     wkB/s     dkB/s  areq-sz    aqu-sz    await     %util
15:12:31       dev8-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:12:31      dev8-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00

15:12:31          DEV      tps     rkB/s     wkB/s    dkB/s   areq-sz    aqu-sz    await     %util
15:12:33       dev8-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:12:33      dev8-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00

15:12:33          DEV       tps    rkB/s     wkB/s     dkB/s  areq-sz    aqu-sz     await    %util
15:12:35       dev8-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:12:35      dev8-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00

Average:          DEV       tps    rkB/s     wkB/s     dkB/s  areq-sz    aqu-sz     await    %util
Average:      dev8-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:      dev8-16      0.30      0.00      8.34      0.00     28.00      0.04    146.67      4.37
 
it seems sdb is very often accessed.

Code:
miazza@RT-AC86U-3150:/tmp/home/root# iostat -y 5 sdb
Linux 4.1.27 (RT-AC86U-3150)    06/18/20        _aarch64_       (2 CPU)


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          35.46    0.00   39.51    0.12    0.00   24.91

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.40         0.00         3.18         0.00          0         16          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          37.83    0.00   38.58    0.12    0.00   23.47

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.40         0.00         3.98         0.00          0         20          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          38.24    0.00   40.28    0.00    0.00   21.48

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.60         0.00         4.78         0.00          0         24          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          40.00    0.00   38.53    0.12    0.00   21.35

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.40         0.00         5.58         0.00          0         28          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          38.91    0.00   44.83    0.00    0.00   16.26

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.40         0.00         3.98         0.00          0         20          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          36.56    0.00   43.25    0.00    0.00   20.19

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.99         0.00         5.57         0.00          0         28          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          35.79    0.00   41.40    0.12    0.00   22.69

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.40         0.00         3.98         0.00          0         20          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          33.97    0.00   45.62    0.12    0.00   20.29

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.40         0.00         3.98         0.00          0         20          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          41.68    0.00   36.67    0.00    0.00   21.65

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.40         0.00         3.19         0.00          0         16          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          33.25    0.00   42.62    0.00    0.00   24.13

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.40         0.00         3.19         0.00          0         16          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          37.81    0.00   47.35    0.12    0.00   14.72

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.60         0.00         7.17         0.00          0         36          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          34.39    0.00   43.86    0.00    0.00   21.75

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.40         0.00         3.98         0.00          0         20          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          38.28    0.00   41.27    0.00    0.00   20.45

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               1.00         0.00         6.37         0.00          0         32          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          38.17    0.00   40.12    0.12    0.00   21.59

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.40         0.00         3.98         0.00          0         20          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          39.06    0.00   42.81    0.12    0.00   18.02

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.40         0.00         3.98         0.00          0         20          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          37.70    0.00   37.82    0.12    0.00   24.35

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.40         0.00         3.98         0.00          0         20          0


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          39.66    0.00   44.72    0.00    0.00   15.62

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sdb               0.80         0.00         6.36         0.00          0         32          0
 
There seems to be constant writing to sdb although the volume is quite small. I'd guess that's a log file from some add-on script. sar -d is more informative because it gives you information about queue size, wait time and utilisation. But you really need to setup data collection so that you can view its behaviour over 24 hours or more because that disk activity wasn't present in your previous post.

Your CPU usage is also constantly between 75% and 85% so you might want to look at that also.
 
Assuming that works you need to setup the data collection. You need to add these two lines to one of your existing startup scripts. I suggest that you find out which script is starting Entware (rc.unslung start) and then add them just after that.
Code:
cru a sa1 "*/10 * * * * /opt/lib/sysstat/sa1 600 1 -S DISK"
cru a sa2 "59 23 * * * /opt/lib/sysstat/sa2 -A"

I think I need some assistance for this.

BTW now after reboot this I have 98% cpu idle and less writing on sdb.

Code:
miazza@RT-AC86U-3150:/tmp/mnt/Entware/entware/etc/init.d# ls
S80pixelserv-tls  rc.func           rc.unslung
S99sysstat        rc.func.div
 
Last edited:
You'll have to find the script that starts Entware. I can't tell you where that is because my setup is non-standard. Look in files like /jffs/scripts/post-mount. You're looking for this line:
Code:
/opt/etc/init.d/rc.unslung start
Maybe @thelonelycoder will tell us what script Entware is started from.

Once you have found the script you need to add two cru statement immediately after that line so that section now looks like this:
Code:
/opt/etc/init.d/rc.unslung start
cru a sa1 "*/10 * * * * /opt/lib/sysstat/sa1 600 1 -S DISK"
cru a sa2 "59 23 * * * /opt/lib/sysstat/sa2 -A"

Reboot the router and confirm that it has worked by looking for those two lines in the output of "cru l".
Code:
# cru l
< various other stuff here >
*/10 * * * * /opt/lib/sysstat/sa1 600 1 -S DISK #sa1#
59 23 * * * /opt/lib/sysstat/sa2 -A #sa2#
EDIT: Entware's sa2 command is currently broken so the cru entry for 23:59 does nothing. Even if you fix the sa2 script you might want to remove that cru command anyway as by default it deletes data files more than 8 days old.
 
Last edited:
/jffs/addons/diversion/mount-entware.div
 
/jffs/addons/diversion/mount-entware.div
Thanks. That is significantly different than my setup.

What script would you use if you didn't have Diversion installed I wonder. Maybe someone with a "normal" setup can suggest a better place to add those cru lines so they get executed after Entware is initialised.
 
This is what I have with /jffs/addons/diversion/mount-entware.div

Code:
#!/bin/sh
#bof

# Diversion is free to use under the GNU General Public License version 3 (GPL-                                                                                                                                                             >
# https://opensource.org/licenses/GPL-3.0

# Proudly coded by thelonelycoder
# Copyright (c) 2016-2066 thelonelycoder - All Rights Reserved
# https://www.snbforums.com/members/thelonelycoder.25480/
# https://diversion.ch

# Script Version 4.1.12

mount_entware(){
        if [ -f "${opkgFile%/opkg}/diversion" ]; then
                logger -t Diversion "Starting Entware and Diversion services on                                                                                                                                                             >
                ln -nsf "${opkgFile%/bin/opkg}" /tmp/opt
                /opt/etc/init.d/rc.unslung start $0
                service restart_dnsmasq
                sh /opt/share/diversion/file/ash-history.div
        else
                logger -t Entware "Starting Entware services, Diversion not fou                                                                                                                                                             >
                ln -nsf "${opkgFile%/bin/opkg}" /tmp/opt
                /opt/etc/init.d/rc.unslung start $0
        fi
}

opkgFile=$(/usr/bin/find $1/entware/bin/opkg 2> /dev/null)
if [ "$opkgFile" ] && [ ! -d /opt/bin ]; then
        mount_entware $1
elif [ "$opkgFile" ] && [ -d /opt/bin ]; then
        logger -t Diversion "Not starting Entware services on $1, Entware is al                                                                                                                                                             >
else
        opkgUnknown=$(/usr/bin/find $1/entware*/bin/opkg 2> /dev/null)
        if [ "$opkgUnknown" ]; then
                mv "${opkgUnknown%/bin/opkg}" "${opkgUnknown%/entware*/bin/opkg                                                                                                                                                             >
                logger -t Diversion "(Alert) Entware folder ${opkgUnknown%/bin/                                                                                                                                                             >
                opkgFile=$(/usr/bin/find $1/entware/bin/opkg 2> /dev/null)
                mount_entware $1
        else
                logger -t Diversion "(Notice) $1 does not contain Entware, skip                                                                                                                                                             >
        fi
fi
#eof

Where is the right point where to add cru ?
 
Where is the right point where to add cru ?
Given that this script is dependent on Diversion and any changes to it are likely to be overwritten if Diversion is updated or reinstalled I suggest a different approach. Just add the cru lines to the end of your existing /jffs/scripts/services-start script.
 
Given that this script is dependent on Diversion and any changes to it are likely to be overwritten if Diversion is updated or reinstalled I suggest a different approach. Just add the cru lines to the end of your existing /jffs/scripts/services-start script.
Yes, I was just going to suggest that. Alternatively, it could be added to post-mount right after the line that calls mount-entware; here's mine:
Code:
#!/bin/sh
swapon /tmp/mnt/Cruzer/myswap.swp # Skynet
rm -f /tmp/mnt/Cruzer/entware/var/log/messages
cru a tls-report "59 23 * * * /jffs/scripts/tls-alert.sh" # added by tlsupdate-installer
cru a logrotate "5 0 * * * /opt/sbin/logrotate /opt/etc/logrotate.conf >> /opt/tmp/logrotate.daily 2>&1" # added by scribe
. /jffs/addons/diversion/mount-entware.div # Added by Diversion
/jffs/addons/unbound/unbound_stats.sh startup # Unbound_Stats.sh
Then I don't think it gets touched.
 
So you mean in post-mount like this:
Code:
#!/bin/sh
swapon /tmp/mnt/Entware/myswap.swp # Added by amtm
. /jffs/addons/diversion/mount-entware.div # Added by Diversion
cru a sa1 "*/10 * * * * /opt/lib/sysstat/sa1 600 1 -S DISK"
cru a sa2 "59 23 * * * /opt/lib/sysstat/sa2 -A"
 
So you mean in post-mount like this:
Code:
#!/bin/sh
swapon /tmp/mnt/Entware/myswap.swp # Added by amtm
. /jffs/addons/diversion/mount-entware.div # Added by Diversion
cru a sa1 "*/10 * * * * /opt/lib/sysstat/sa1 600 1 -S DISK"
cru a sa2 "59 23 * * * /opt/lib/sysstat/sa2 -A"
Yes. Now reboot the router and check it with
Code:
cru l
 
OK.
It seems cron is now set correctly.
Code:
ASUSWRT-Merlin RT-AC86U 384.17_0 Sun Apr 26 02:28:53 UTC 2020
miazza@RT-AC86U-3150:/tmp/home/root# cru l
*/2 * * * * /etc/openvpn/server1/vpns-watchdog1.sh #CheckVPNServer1#
*/2 * * * * /etc/openvpn/server2/vpns-watchdog2.sh #CheckVPNServer2#
00 2 * * Mon sh /opt/share/diversion/file/update-bl.div reset #Diversion_UpdateBL#
20 5 * * * sh /opt/share/diversion/file/rotate-logs.div #Diversion_RotateLogs#
20 17 * * * diversion count_ads count #Diversion_CountAds#
* * * * * sh /opt/share/diversion/file/yt-blocking.div #Diversion_YTblocking#
*/10 * * * * /opt/lib/sysstat/sa1 600 1 -S DISK #sa1#
59 23 * * * /opt/lib/sysstat/sa2 -A #sa2#
37 7 */7 * * service restart_letsencrypt #LetsEncrypt#


I suppose now I have to let this run for 24h and ... what's next ? I mean where do I see the collected data now ?
 

Similar 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