Jump to content

USB drives sometimes not mounted at boot


nihilista

Recommended Posts

I'm using latest armbian with kernel 4.3.3 and got some problem:

I have some usb-drives that should be mounted at boot via fstab. But sometimes they are not mounted at boot, after restart they mount normally. Never had problems with same fstab, only with kernel 4.3.3 it sometimes failed to mount. Seen same behaviour with bananian with 4.3-kernel, so maybe it has to do something with this kernel?

Maybe some usb modules didn't load before mounting fstab? But i'm linux noob, so i dont know what i can do...

Some suggestions?

 

Link to comment
Share on other sites

Using BananaPro and yes, it has good power supply. Drives are connected with powered hub, using that configuration for long time and never got problems. As i said, i got this only with 4.3.x kernel (bananian and armbian), now i switched back to my sdcard with bananian (4.1.5 kernel) and all mounting fine. All systems are on different partitions on sata ssd, just need to switch sdcard to boot other system ;-)

Sata SSD mounted normally under 4.3.3 kernel. Btw, will test bit more, maybe 3 usb-powered drives and dvb stick is too much for this kernel while others work ;-)

Link to comment
Share on other sites

Tested bit more, installed 4.4 rc6 kernel and at first boot all external drives are mounted. But then i rebooted my bananian (on other ssd partition), after a few days i tried armbian again and no usb drives mounted, had to mount them manually with mount -a. Rebooted once more again, and all drives are present, rebooted another time, all mounted, made a shutdown -h, restarted, nothing mounted.....

Any suggestions for that? Never had that problem with 3.x kernel, 4.1.x or 4.2 kernel.

Link to comment
Share on other sites

OK, seems that no one has an idea, so i checked kernel log and found out (if i understand the log entries) that sometimes usb devices are detected AFTER mount process finishes, and sometimes you see detecting devices BEFORE then EXT4-fs entries shows mounting all drives as i t has to be.....

I copied this lines for both examples and attached it here.

log.txt

 

 

What can i do to tell armbian to wait with mounting till all usb drives loaded?

Thx

Link to comment
Share on other sites

There were some changes regarding USB drivers that could cause the behaviour you are observing (sunxi platform USB driver was compiled as a module), but now it's reverted back (to built-in), so I suggest waiting for a new kernel release or compiling new kernel by yourself to check if this fixed or not.

 

I am learning by doing, but its really hard to check out what starts all those services and hardware on boottime (systemd/init/udev/sysvinit/... ? there my knowledge is far from usable ;-)).

But i found the mountall.sh script and googled a bit, maybe it could be a workaround to tell mountall script to wait  some seconds?

If thats possible, normally it should work as it seems mounting all drives configured  in fstab happens only a little bit too early, so on some reboots it works and some not...

Link to comment
Share on other sites

 

I have the same issue. Banana pro, 2 hdd with external power, kernel 4.3.3.
I added "rootdelay=10" in the boot.cmd and it seems that minimizes the problem but does not go away when I remove the power to the board.

 

Maybe rootdelay=10 don't do the trick, i think mounting all drives is done a bit later in the boot process.

But i tested another little workaround, look in /etc/rcS.d for S08checkfs.sh and edit this file as follows:

#! /bin/sh
### BEGIN INIT INFO
# Provides:          checkfs
# Required-Start:    checkroot
# Required-Stop:
# Should-Start:
# Default-Start:     S
# Default-Stop:
# X-Interactive:     true
# Short-Description: Check all filesystems.
### END INIT INFO

# Include /usr/bin in path to find on_ac_power if /usr/ is on the root
# partition.
PATH=/sbin:/bin:/usr/bin
FSCK_LOGFILE=/var/log/fsck/checkfs
[ "$FSCKFIX" ] || FSCKFIX=no
. /lib/init/vars.sh

. /lib/lsb/init-functions
. /lib/init/mount-functions.sh
. /lib/init/swap-functions.sh
sleep 5  

"sleep 5" seems to do the trick for me as mountall script should wait for finishing that, so it has 5 seconds more time. Maybe i'm wrong, but i found that tipp in another forum, but it wasn't specially for armbian.

But i did a few reboots and it seems to work, all drives mounted fine with every try till now. I will test more with powering off banana, maybe test it too and report as it works for you.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines