Mounting Network Drive with FSTAB [SOLVED]
Posted: Sun Sep 29, 2019 8:38 am
I am having a problem mounting a network drive via fstab. I have tried adding both of the following in the fstab file (but not both at the same time):
//192.168.0.10/USB_Storage /mnt/sharedfolder/ cifs guest 0 0
//192.168.0.10/USB_Storage /mnt/sharedfolder/ cifs username=pi,password={mypipassword} 0 0
Neither of these options results in the drive being mounted on reboot. However, I can run mount and it works with either one:
pi@raspberrypi:~ $ sudo mount -a
pi@raspberrypi:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 27G 3.6G 22G 15% /
devtmpfs 334M 0 334M 0% /dev
tmpfs 463M 8.0K 463M 1% /dev/shm
tmpfs 463M 6.4M 456M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 463M 0 463M 0% /sys/fs/cgroup
/dev/mmcblk0p6 253M 40M 213M 16% /boot
tmpfs 93M 0 93M 0% /run/user/1000
//192.168.0.10/USB_Storage 932G 19G 913G 3% /mnt/sharedfolder
pi@raspberrypi:~ $
I also set the boot option of not booting until a network connection was established, but that also had no affect. So what have I gotten wrong here?
//192.168.0.10/USB_Storage /mnt/sharedfolder/ cifs guest 0 0
//192.168.0.10/USB_Storage /mnt/sharedfolder/ cifs username=pi,password={mypipassword} 0 0
Neither of these options results in the drive being mounted on reboot. However, I can run mount and it works with either one:
pi@raspberrypi:~ $ sudo mount -a
pi@raspberrypi:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 27G 3.6G 22G 15% /
devtmpfs 334M 0 334M 0% /dev
tmpfs 463M 8.0K 463M 1% /dev/shm
tmpfs 463M 6.4M 456M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 463M 0 463M 0% /sys/fs/cgroup
/dev/mmcblk0p6 253M 40M 213M 16% /boot
tmpfs 93M 0 93M 0% /run/user/1000
//192.168.0.10/USB_Storage 932G 19G 913G 3% /mnt/sharedfolder
pi@raspberrypi:~ $
I also set the boot option of not booting until a network connection was established, but that also had no affect. So what have I gotten wrong here?