rubikwizard
Posts: 95
Joined: Tue Jan 10, 2012 10:37 pm
Location: West Yorkshire
Contact: Website

Automount a NAS drive on Jessie not working

Tue Sep 29, 2015 9:03 pm

Hi
I have added a line to /etc/fstab to link to my NAS drive.

Code: Select all

//192.168.0.11/pishare /home/pi/Documents/pishare cifs guest,uid=1000,gid=1000,iocharset=utf8 0 0
This works fine when I type in sudo mount -a from the terminal, but it does not automount at boot time (as with the last version of Wheezy, but it worked on previous versions of Wheezy).
When this broke on Wheezy I found a solution from these forums to add the following line to the end of /etc/rc.local (before the 'exit 0')

Code: Select all

mount -a
However this fix does not seem to work on my clean install of Jessie.
Any ideas how I can fix this? I really need to automount during the boot.

Many Thanks
Neil

iw1
Posts: 47
Joined: Mon Oct 13, 2014 8:10 am

Re: Automount a NAS drive on Jessie not working

Tue Sep 29, 2015 10:47 pm

I have the same problem which has arisen as above with the change to Jessie (clean install) and would also be grateful if someone could suggest a fix.

iw1
Posts: 47
Joined: Mon Oct 13, 2014 8:10 am

Re: Automount a NAS drive on Jessie not working

Fri Oct 02, 2015 9:27 am

A clue from another thread...
viewtopic.php?f=66&t=122145
It would appear that in Jessie obtaining an ip address from dhcp occurs fairly late in the sequence of events and when the automount script is run my pi doesn't have an ip address so the automount fails.
When I give my pi a static ip address the NAS is mounted during startup.
Having to do this seems a backwards step to me but then what do I know.

rubikwizard
Posts: 95
Joined: Tue Jan 10, 2012 10:37 pm
Location: West Yorkshire
Contact: Website

Re: Automount a NAS drive on Jessie not working

Fri Oct 02, 2015 4:39 pm

I already have a static IP for my pi, and it doesn't make any difference.

hippy
Posts: 6853
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Automount a NAS drive on Jessie not working

Fri Oct 02, 2015 5:19 pm

rubikwizard wrote:I already have a static IP for my pi, and it doesn't make any difference.
How have you specified your static IP address ? It may make a difference if done through /etc/network/intefaces or dhcpcd configuration. In the first case rc.local will pick up the static IP address, in the later it possibly may not ( IMO probably won't but haven't actually tried it ).

One work round suggested which worked for me is to add a "sleep 10" or similar to the start of rc.local. That will hopefully delay things until after dhcpcd has done its stuff if it is a lack of known IP address when rc.local runs problem.

iw1
Posts: 47
Joined: Mon Oct 13, 2014 8:10 am

Re: Automount a NAS drive on Jessie not working

Fri Oct 02, 2015 6:05 pm

How have you specified your static IP address ?
In my case I edited /etc/network/interfaces (using http://www.modmypi.com/blog/tutorial-ho ... ip-address to remind me what information I needed to include). The automount was successful this way without the need for 'sleep'. I've just tried setting the ip address with the dhcpcdui window on the desktop and the automount didn't work, as hippy expected. It is unsatisfactory though that dhcp doesn't set the ip address at a more appropriate time in the boot sequence.

Return to “Raspbian”