BartleNuts
BartleNuts

Reputation: 1

Automount a NAS to Raspberry Pi Running Raspbian on Reboot

I am trying to get my NAS to automount on reboot. I have a pi3b running Raspbian. Goal is to use it a a plex server, with my files on my NAS. I have googled and found many different answers, yet none seem to work for me... The closest I have gotten is with the following:

 sudo mount -t cifs -o username=username,password=password '//xxx.xxx.xxx.xxx/Multimedia' SkyNet/Multimedia

Using the above, I can manually mount my network drive, but obviously, gets removed on reboot. I cannot figure out how to change this to add it to the file system table (every walkthrough says to add a line to the end of fstab:

'sudo nano /etc/fstab'

then add the code at the end, the one below was suggested, but didn't work...)

xxx.xxx.xxx.xxx/Multimedia SkyNet/Multimedia cifs username=username,password=password 0 0

This is what was suggested, but doesn't reconnect on reboot. What am I missing?

Thanks so much, I'm sure it's been asked a bajillion times, but none of the walkthroughs I've tried have worked, super frustrating...

Edit/Update: This line:

xxx.xxx.xxx.xxx/Multimedia SkyNet/Multimedia cifs username=username,password=password 0 0

works in the file system table when I manually run with

sudo mount -a

but doesn't mount when I reboot... Why does it not run this line on a reboot?

Upvotes: 0

Views: 1107

Answers (1)

Manuel
Manuel

Reputation: 1

I think, the system can't find your mount point. when you execute the command with sudo, you are already in /home. so I suggest you need to change your mountpoint to full path /home/SkyNet/Multimedia

your /etc/fstab entry needs to look like:

//xxx.xxx.xxx.xxx/Multimedia /SkyNet/Multimedia cifs username=username,password=password 0 0

you also need to check "dmesg". In my case the problem was, the network adapter still had no IP-address, so mounting a network storage is not possible without access.

at Raspberry Pi-Forum they explained how to add a wait until network connection is established

Upvotes: 0

Related Questions