You are not logged in.

#1 2008-08-21 16:09:36

adamruss
Member
Registered: 2008-01-17
Posts: 143

how to mount samba share only when connected - at boot?

this is my line from fstab:

//MEDIA-CENTER/public /media/Server cifs username=****,password=****,noauto,iocharset=utf8,file_mode=0777,dir_mode=0777

like this, it does not mount on boot, if i remove the noauto option and then it mount's on boot, but when i am with the laptop elsewhere, when that share is not connected, it gives me a nasty error on boot.

is there an option for fstab to auto mount on boot only when connected? like "ignore error"?

Offline

#2 2008-08-21 19:03:38

chochem
Member
From: Denmark
Registered: 2008-03-02
Posts: 176
Website

Re: how to mount samba share only when connected - at boot?

You could of course convert from using fstab to using the smbnetfs daemon. Of course the 'official' setup will (add daemon to rc.conf) will still give you an error* so you might wish to run it in rc.local or even later, depending on some network test?

* Disclaimer: I only got a headache trying to get the /etc/rc.d/script to work properly so I've resorted to running the daemon manually.

Last edited by chochem (2008-08-21 19:04:19)

Offline

#3 2008-08-21 21:01:24

adamruss
Member
Registered: 2008-01-17
Posts: 143

Re: how to mount samba share only when connected - at boot?

adding the option nofail did the trick for me

Offline

#4 2008-09-13 11:33:23

Anarion.h
Member
From: S:34º36'36" O:58º24'51"
Registered: 2008-09-05
Posts: 16

Re: how to mount samba share only when connected - at boot?

You can also try using autofs


0666: read and write for everyone!

Offline

Board footer

Powered by FluxBB