Mounting smbfs At Boot Time

2008-06-18 Thread Tim Daneliuk
I have this in my /etc/fstab:

  [EMAIL PROTECTED]/SHARE /localmountsmbfs   rw  0  
 0

This very nicely mounts an smbfs filesystem at boot time.  HOWEVER, if SRV
happens to not be up at the time FreeBSD boots, FBSD will halt and prompt
to go into single user mode thinking that there is a catastrophic problem.
I want the mount to occur if possible, and to be retried later if not
possible at boot time.  But I want this to occur automatically without
my having to poke at the machine manually to see to it.  

'noauto' was a tempting solution, but it seems not to work the way I'd expect.
I added it to the entry, manually unmounted /localmount, and then did
a 'mount -a'.  The smbmount did not come back.

Ideas anyone?

-- 

Tim Daneliuk [EMAIL PROTECTED]
PGP Key: http://www.tundraware.com/PGP/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: mounting smbfs at boot time

2002-11-07 Thread Andre Albsmeier
On Tue, 05-Nov-2002 at 11:10:59 -0800, Rotaru Razvan wrote:
> Hello,
> 
> well when I said ~/.nsmbrc i meant also /root/.nsmbrc. Still i doesn't
> work for me, but then again my method with the daemon-like startup
> script in /usr/local/etc/rc.d is unusual. /usr/local/etc/nsmb.conf
> doesn't even work work even with a normal mount_smbfs command with -N.

I don't have the machine handy at the moment (I am on holidays) but
IIRC, this is what I do:

1. I have the filesystems in /etc/fstab:

   //user@machine/apps/smbfs/appssmbfs   noauto,rw 0 0

2. I have the appropriate entries in /etc/nsmb.conf (NOT in /usr/local)

3. I have a script in /usr/local/etc/rc.d which mainly does this

   /sbin/mount -o -N,-R3,-cl /smbfs/apps

It is a bit more complicated here since I have to traverse a firewall
and my script also tests the availability of the servers. It also
scans /etc/fstab to automatically mount every smbfs in there.

However, IMO, the ideal solution would be to teach amd about smbfs
but I don't know enough about amd :-( Maybe one day I will have
time to dig into this...

-Andre

> 
> Can you tell me how do you mount your shares at boot time? or at least
> can i see your /etc/fstab file ?
> 
> Regards,
> Razvan
> 
> --- Andrew Brampton <[EMAIL PROTECTED]> wrote:
> > I'm a freeBSD newbie, but I found a solution to your problem, I
> > appear to
> > have a /root/.nsmbrc file with passwords in which are used to mount
> > my
> > shares at boot time. But if you can't use this file then try
> > /usr/local/etc/nsmb.conf which is a default of some kind.
> > 
> > Hope this helps :)
> > Andrew
> > - Original Message -
> > From: "Rotaru Razvan" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, November 05, 2002 5:36 PM
> > Subject: mounting smbfs at boot time
> > 
> > 
> > > Hello,
> > >
> > > Well here is what i want to ask:
> > > I want to mount a smbfs at boot time. Editing /etc/fstab won't do
> > > because filesystems are mounted before network initalisation. The
> > > noauto option doesn't help (it doesn't mount at boottime, neither
> > on
> > > 'mount -a' ; by the way why should anyone enter a filesystem in
> > fstab
> > > with the noauto option?!?! doesn't make any sense).
> > > Next thing i tried is to make a daemon-like startup script (in
> > > /usr/local/etc/rc.d ) that actually doesn't start any daemon, but
> > > mounts my partition when called with 'start' parameter and unmounts
> > > when called with 'stop' parameter. The problem is i have to call in
> > > this script a mount_smbfs command with the -N option (it should not
> > ask
> > > for my smb password on boot time). Well with this option
> > mount_smbfs
> > > looks in ~/.nsmbrc for a password. Apparently on boot time (when
> > > initializing local services) the deamon startup scripta do not run
> > as
> > > root (i doubt they run as any user that has a home directory) so
> > there
> > > is no way of supplying this .nmbrc file to mount_smbfs.
> > >
> > > Well for now am i out of ideas. Maybe you have a more simple
> > solution.
> > > Thanks anyway for the attention.
> > > Razvan
> > >
> > >
> > > __
> > > Do you Yahoo!?
> > > HotJobs - Search new jobs daily now
> > > http://hotjobs.yahoo.com/
> > >
> > > To Unsubscribe: send mail to [EMAIL PROTECTED]
> > > with "unsubscribe freebsd-questions" in the body of the message
> > >
> > 
> 
> 
> __
> Do you Yahoo!?
> HotJobs - Search new jobs daily now
> http://hotjobs.yahoo.com/
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-questions" in the body of the message

-- 
Win98: useless extension to a minor patch release for 32-bit extensions and
   a graphical shell for a 16-bit patch to an 8-bit operating system
   originally coded for a 4-bit microprocessor, written by a 2-bit
   company that can't stand for 1 bit of competition.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: mounting smbfs at boot time

2002-11-05 Thread Rotaru Razvan
Hello,

well when I said ~/.nsmbrc i meant also /root/.nsmbrc. Still i doesn't
work for me, but then again my method with the daemon-like startup
script in /usr/local/etc/rc.d is unusual. /usr/local/etc/nsmb.conf
doesn't even work work even with a normal mount_smbfs command with -N.

Can you tell me how do you mount your shares at boot time? or at least
can i see your /etc/fstab file ?

Regards,
Razvan

--- Andrew Brampton <[EMAIL PROTECTED]> wrote:
> I'm a freeBSD newbie, but I found a solution to your problem, I
> appear to
> have a /root/.nsmbrc file with passwords in which are used to mount
> my
> shares at boot time. But if you can't use this file then try
> /usr/local/etc/nsmb.conf which is a default of some kind.
> 
> Hope this helps :)
> Andrew
> - Original Message -
> From: "Rotaru Razvan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 05, 2002 5:36 PM
> Subject: mounting smbfs at boot time
> 
> 
> > Hello,
> >
> > Well here is what i want to ask:
> > I want to mount a smbfs at boot time. Editing /etc/fstab won't do
> > because filesystems are mounted before network initalisation. The
> > noauto option doesn't help (it doesn't mount at boottime, neither
> on
> > 'mount -a' ; by the way why should anyone enter a filesystem in
> fstab
> > with the noauto option?!?! doesn't make any sense).
> > Next thing i tried is to make a daemon-like startup script (in
> > /usr/local/etc/rc.d ) that actually doesn't start any daemon, but
> > mounts my partition when called with 'start' parameter and unmounts
> > when called with 'stop' parameter. The problem is i have to call in
> > this script a mount_smbfs command with the -N option (it should not
> ask
> > for my smb password on boot time). Well with this option
> mount_smbfs
> > looks in ~/.nsmbrc for a password. Apparently on boot time (when
> > initializing local services) the deamon startup scripta do not run
> as
> > root (i doubt they run as any user that has a home directory) so
> there
> > is no way of supplying this .nmbrc file to mount_smbfs.
> >
> > Well for now am i out of ideas. Maybe you have a more simple
> solution.
> > Thanks anyway for the attention.
> > Razvan
> >
> >
> > __
> > Do you Yahoo!?
> > HotJobs - Search new jobs daily now
> > http://hotjobs.yahoo.com/
> >
> > To Unsubscribe: send mail to [EMAIL PROTECTED]
> > with "unsubscribe freebsd-questions" in the body of the message
> >
> 


__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



mounting smbfs at boot time

2002-11-05 Thread Rotaru Razvan
Hello,

Well here is what i want to ask:
I want to mount a smbfs at boot time. Editing /etc/fstab won't do
because filesystems are mounted before network initalisation. The
noauto option doesn't help (it doesn't mount at boottime, neither on
'mount -a' ; by the way why should anyone enter a filesystem in fstab
with the noauto option?!?! doesn't make any sense).
Next thing i tried is to make a daemon-like startup script (in
/usr/local/etc/rc.d ) that actually doesn't start any daemon, but
mounts my partition when called with 'start' parameter and unmounts
when called with 'stop' parameter. The problem is i have to call in
this script a mount_smbfs command with the -N option (it should not ask
for my smb password on boot time). Well with this option mount_smbfs
looks in ~/.nsmbrc for a password. Apparently on boot time (when
initializing local services) the deamon startup scripta do not run as
root (i doubt they run as any user that has a home directory) so there
is no way of supplying this .nmbrc file to mount_smbfs.

Well for now am i out of ideas. Maybe you have a more simple solution.
Thanks anyway for the attention.
Razvan


__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message