I have got a windows network shared folder on my Lan that I can mount manually on my manjaro pc,
But when I reboot the folder doesn’t mount even thow I have made a fstab entry for it.
When I do a - mount -a - it mounts just fine whitout errors.
here is my fstab entry;
//192.168.1.xxx/ACSnet /home/jack/DACS-backup cifs username=xxx,password=xxx,sec=ntlmssp,rw,noperm,file_mode=0777,dir_mode=0777,uid=1000 0 0
Why does my fstab line not mount?
found out that network interface was not up when fstab gets called on, so created a systemd service file.
called ; ```
with following content;
ExecStart=/usr/sbin/ip link set %i up
then these commands;
-systemctl enable interface-up@enp2s0 interface-up@enp2s0
now windows share mounts ok after reboot.
You shouldn’t even need to create a new service file, you can add
_netdev to ensure systemd knows it is network dependant, and
noauto,x-systemd.automount to mount on access - easier
do you mean to add these options to my fstab line?
//192.168.1.xxx/ACSnet /home/jack/DACS-backup cifs username=xxx,password=xxx,_netdev,noauto,x-systemd.automount,sec=ntlmssp,rw,noperm,file_mode=0777,dir_mode=0777,uid=1000 0 0
Yes, should work like that - I’ve never had any issues using those options. For some more info on fstab mount options the Arch Wiki has a really useful page.
One other thing I would recommend, especially if your computer is shared with other users, would be to put your user credentials in a credentials file in your /root/ folder with permission
600. The format of the file is as follows:
You can then add
credentials=/root/[filename] instead of your username and password in your fstab entry.