mapomme1108
Posts: 24
Joined: Wed Sep 25, 2013 2:46 pm

Auto mount NAS share at startup

Fri Sep 11, 2015 8:52 am

Hello,

I want to automount a folder of a NAS on my local network at startup.

The folder adress is : \\192.168.0.13\Multimedia\Musique
The mount point would be : \mnt\Musique

I know the admin username and password of the NAS

I have tried to add it to the /etc/fstab without succes

Thanks per advance for your help

User avatar
RaTTuS
Posts: 10532
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Auto mount NAS share at startup

Fri Sep 11, 2015 9:09 am

if after you log in
does a
sudo mount -a
mount it OK ?
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

mapomme1108
Posts: 24
Joined: Wed Sep 25, 2013 2:46 pm

Re: Auto mount NAS share at startup

Fri Sep 11, 2015 9:19 am

yes
sudo mount -a
does mount it OK

User avatar
RaTTuS
Posts: 10532
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Auto mount NAS share at startup

Fri Sep 11, 2015 9:23 am

you'll need to add a delay to the boot, as the USB subsystem is not available when that mount gets done by the system there are posts here somewhere about it
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

mapomme1108
Posts: 24
Joined: Wed Sep 25, 2013 2:46 pm

Re: Auto mount NAS share at startup

Sat Sep 12, 2015 8:42 am

I have added :
rootdelay=5
in /boot/cmdline.txt

and

sudo mount -a
in /etc/rc.local

and it works

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

Re: Auto mount NAS share at startup

Sun Sep 13, 2015 9:29 am

You can also just add the line “mount -a” to the end of /etc/rc.local, before the line “exit 0″. That just forces network shares to be mounted at the end of the boot sequence.

This problem was introduced with the last Raspbian release (May 2015). Hopefully it will be fixed in the next release.

manleypv
Posts: 11
Joined: Thu Oct 08, 2015 11:48 am

Re: Auto mount NAS share at startup

Fri Oct 09, 2015 1:56 am

Rubikwizard, this isn't working for me. I added

Code: Select all

sudo mount -a
and it hung up the boot process, as I found out immediately after in another post...

Anyway, added

Code: Select all

mount -a
to /etc/rc.local and it's not working. Still have to manually mount after reboot.

Thoughts?

User avatar
RaTTuS
Posts: 10532
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Auto mount NAS share at startup

Fri Oct 09, 2015 8:21 am

putting sudo in rc.local will have no effect as rc.local runs as root anyway
also this will not help in jessie as rc.local will be un out of sequence now
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Return to “Raspbian”