Remote Samba share will not mount at boot time
- I am running Fedora25 on an Intel NUC with a WiFi internet connection.
- I want to mount a remote Samba shared directory automatically during boot.
- The mount fails with "mount error(101): Network is unreachable" (see log below)
Here is my /etc/fstab entry:
//192.168.2.150/music /home/music/Music cifs ro,auto,username=music,credentials=/etc/.smbpasswd,_netdev 0 0
After boot, I can successfully mount the share like this:
sudo mount /home/music/Music
- I was able to mount an NFS share using Fedora24 with no problem
- When I tried mounting an NFS share using Fedora25, I got the same results as I did with the Samba share
- From the log, it appears that the network connection is not available even though the Network Manager Wait Online service says that it is.
Any advice on what to try next?
/var/log/messages
Mar 7 08:02:16 mediabox systemd: Started Network Manager Wait Online.
Mar 7 08:02:16 mediabox systemd: Reached target Network is Online.
Mar 7 08:02:16 mediabox systemd: Mounting /home/music/Music...
Mar 7 08:02:16 mediabox kernel: FS-Cache: Loaded
Mar 7 08:02:16 mediabox kernel: Key type dns_resolver registered
Mar 7 08:02:16 mediabox kernel: FS-Cache: Netfs 'cifs' registered for caching
Mar 7 08:02:16 mediabox kernel: Key type cifs.spnego registered
Mar 7 08:02:16 mediabox kernel: Key type cifs.idmap registered
Mar 7 08:02:16 mediabox mount: mount error(101): Network is unreachable
Mar 7 08:02:16 mediabox mount: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Mar 7 08:02:16 mediabox kernel: CIFS VFS: Error connecting to socket. Aborting operation.
Mar 7 08:02:16 mediabox kernel: CIFS VFS: cifs_mount failed w/return code = -101
Mar 7 08:02:16 mediabox systemd: home-music-Music.mount: Mount process exited, code=exited status=32
Mar 7 08:02:16 mediabox systemd: Failed to mount /home/music/Music.
Mar 7 08:02:16 mediabox systemd: Dependency failed for Remote File Systems.
Mar 7 08:02:16 mediabox systemd: remote-fs.target: Job remote-fs.target/start failed with result 'dependency'.
Mar 7 08:02:16 mediabox systemd: home-music-Music.mount: Unit entered failed state.
If you using wifi it is possible that network is not ready on boot, you could to connect to the share after user login.