I have tried everything in this forum. Does anyone really know or is it all trial and error?
It will mount using:
systemctl start mountpoint.mount
after the system is up and running. However, when using the .automount
in systemd
, it does not work.
I have tried using the server name & also by IP address, neither one works on boot. I even tried to modify systemd
config options as well, still not working. At first I thought it needed to have Name Server Support loaded (after nss-lookup.target
) still not working.
For what its worth its a CIFS share. It mounts automatically on other machines using fstab
(yes I tried that on this machine as well - not working). I want to use systemd
to automount. I could spend days reading the code for systemd
, but I don't think that's a good use of my time.
Someone tell me why this does not automount at boot. I am tired of just trying things constantly. Please don't tell me to TRY something else.
noauto + x-systemd.automount + _netdev
does not work in fstab
.
Running Ubuntu 20.10 does not mount on boot, however it does work with systemctl start mountpoint.mount
.
-------------------------- media-media.mount
[Unit]
Description=media share from media.home
Requires=network-online.target
After=network-online.target
StartLimitIntervalSec=5s
[Mount]
What=//media.home/media
Where=/media/media
Type=cifs
Options=rw,credentials=/home/xxx/.smbfile,vers=1.0,_netdev,nofail
TimeoutIdleSec=30
#Restart=on-failure
#RestartSec=15
[Install]
WantedBy=multi-user.target
----------------------------- media-media.automount
[Unit]
Requires=network-online.target nss-lookup.target
#After=network-online.target nss-lookup.target
#Wants=network-online.target nss-lookup.target
After=network-online.target
[Automount]
Where=/media/media
[Install]
WantedBy=remote-fs.target
---------------------------------------------