System not mounting network drive on boot

With Linux there’s always many roads that lead to the same destination - that includes shares.

The mount appears to be a personal mount - the credentials are stored in your home.

The easiest method - no fstab - no mount units - just a script utilizing gio mount.

Create the script from the topic above and edit the variables section then run it.

# MODIFY THESE VARIABLES
# your samba server's hostname or IP address
HOST="my-server"

# the share name on the server
SHARENAME="my-share"

# symlink name
LINKNAME="$SHARENAME"

# symlink is placed in this folder
SYMLINKS="$HOME/SMBLinks"

# credentials
USERNAME=
WORKGROUP=
PASSWD=

# /END MODIFY

When you get more confident with Linux - you can create a user service for it. Also explained in the topic linked.

Mounting using fstab can be frustrating and over the years it has given me headache more than once.

Especially when you mount network shares using fstab. With systemd you never know in which order anything becomes available because everything initializes in parallel using threading.

This causes shares to become arbitrarily unavailable more often than most will admit.

Over the years, I found the only reliable method on systemd is to use mount units.

Once setup they just work - no mounting on boot - but mounting on access - umount when idle for a configurable time.

1 Like