Ok I have tried some of the ways listed on here in earlier post but I couldn’t get them to work. I am just trying to mount a Samba share during boot up. I got the mount.cifs command working fine and can mount it once I am logged in.
Here s the command I’m using…
I have added it to boot.local but that starts before the network is connected, and I have added it to fstab but nothing happens there.
I have also added the sleep 30 to the smbfs file to delay it.
Any other ideas?
Have you tried a mount in fstab re-mounted after boot time by a cron job? I had to use that once. Here’s the reference: FAQ: Tricks for a Slow Network
That is about re-mounting fstab entries after they fail at boot time, but the CLI version you propose to use will work equally well via a cron job.
>
> Ok I have tried some of the ways listed on here in earlier post but I
> couldn’t get them to work. I am just trying to mount a Samba share
> during boot up. I got the mount.cifs command working fine and can mount
> it once I am logged in.
> Here s the command I’m using…
>> mount.cifs //192.168.2.3/media /home/<dir>/<dir> -o
>> user=<user>,password=<password>
>
> I have added it to boot.local but that starts before the network is
> connected, and I have added it to fstab but nothing happens there.
> I have also added the sleep 30 to the smbfs file to delay it.
> Any other ideas?
>
>
Robace;
You probably need to use a cronTab. There are two ways around this:
Enter a mount entry in fstab and then set a cronTab
Thanks for the reply’s. I tried the suggestions and still no dice. Cronjobs are new to me so maybe I’m missing something. I’ll mess with it some more before calling it moot.
Just curious has anyone been able to mount a Samba share during boot in OpenSUSE 11.1?
I can do it in openSUSE 11.1 by mounting with a line in fstab but only if I delay the cifs mount by 20 seconds with a root cron job.
Details:
server address is: //dell103/dellshare
permissions: share is available for guest access via smb:/ . Thus it requires no password and this is reflected in the options in the mount.
mount point is: /home/john/test
line in fstab is:
I’m almost certain I could bypass the line in fstab (because it doesn’t work for practical purposes) and use this alternative instead:
@reboot sleep 20;mount.cifs //dell103/dellshare /home/john/test - o password=
I recommend this because fstab is there to mount things at boot. It’s not doing that job for cifs. It’s simply efficient to bypass it and go straight to the CLI.
You made me go digging. There’s a daemon called smbfs. It should be running. But it’s not. Here’s an example of it working. I ask it for it’s status:
suse111:~ # rcsmbfs status
Checking for mounted SMB/ CIFS File Systems
//dell103/dellshare on /home/john/test type cifs
So you see that it plays a role in importing cifs file systems.
Well there’s a bug in openSUSE since some years now. Smbfs is supposed to be started if you install the package samba-client. The bug is that it doesn’t start. You can start it permanently in Yast –> system services runlevels. Locate and turn on smbfs.
Now try the mount in fstab without any cron jobs, just with the option _netdev (which tells fstab to pause for the network device). Mine now mount at boot time nicely.