How to mount external network drive at boot

System Info:

$ cat /etc/os-release
PRETTY_NAME=“Open Source Media Center”
NAME=“OSMC”
VERSION=“January 2023”
VERSION_ID=“2023.01-1”
ID=osmc
ID_LIKE=debian

ANSI_COLOR=“1;31”
HOME_URL=“https://osmc.tv
SUPPORT_URL=“https://osmc.tv
BUG_REPORT_URL="https://osmc.tv

Hi

I have set up osmc on a Vero 4k+ from which I mount an exported directory from my mediavault NAS. However I have been unable to to get this mount to work at boot and was wondering if anyone knew how best to do this.

I can mount the drive manually by using the following command:

$ sudo mount -v -t cifs -o vers=3.0,user=username //ipaddress/transcendroot /mnt/transcend

And if I put the following in /etc/fstab:

//ipaddress/transcendroot /mnt/transcend cifs vers=3.0,user=username,pass=password,_netdev 0 0

I can mount using:

$ mount -a

However the mount does not happen when I reboot. My searches indicate that this is because the attempt to mount happens before the network is fully up and indeed I fixed the problem on my Rpi with standard raspian by running

$ sudo raspi-config

and selecting

System Options → Network at Boot → Select wait for network connection on boot

Does anyone know how I can do this on osmc ? It does not seem to have raspi-config.

You could try wait for network in MyOSMC → Network.

But I also can recommend to look at autofs in case FSTAB doesn’t work after that change.

You could try wait for network in MyOSMC → Network.
Doh! Didn’t think to actually look at the GUI - there is indeed a ‘Wait for Network’ option, which when enabled does allow fstab to work.

But I also can recommend to look at autofs
Ah yes I’d forgotten about autofs. I’ll also bank that as a potential solution.

Thank you very much for your help.