LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Mounting CIFS file systems at boot with Slackware 12.0 (https://www.linuxquestions.org/questions/slackware-14/mounting-cifs-file-systems-at-boot-with-slackware-12-0-a-590516/)

allend 10-09-2007 08:27 AM

Mounting CIFS file systems at boot with Slackware 12.0
 
I have been converting the mounts on my Samba servers from smbfs file systems to cifs file systems as the smbfs file system is now deprecated. The smbfs file systems could be automatically mounted at boot time, but after conversion to cifs they are not automatically mounted at boot. After boot a simple "mount -a" fixes things.

To get the cifs file systems to be automatically recognised at boot, I have found that I need to add this code to /etc/rc.d/rc.inet2 after the code to mount remote SMB filesystems.

Code:

# Mount remote (CIFS) filesystems:
if cat /etc/fstab | grep -v '^#' | grep -w cifs 1> /dev/null 2> /dev/null ; then
  echo "Mounting remote (CIFS) file systems:  /sbin/mount -a -t cifs"
  /sbin/mount -a -t cifs
  # Show the mounted volumes:
  /sbin/mount -v -t cifs
fi


indienick 10-09-2007 08:30 AM

Did you have a particular question about SMB/CIFS shares, or were you just sharing your solution with us? :)

MS3FGX 10-09-2007 08:31 AM

I'm guessing there is no question here, just a comment about CIFS not being automatically mounted by default in Slackware.

indienick 10-09-2007 08:34 AM

Fair enough.
Is this a problem with other distributions, by any chance? I can't test it out right now (as I'm at work), but also the fact that my SMBFS shares at home have never given me any issues, so why mess with stability (aside from the obvious entertainment that could ensue:))?

I didn't know smbfs was deprecated, though.

allend 10-09-2007 08:57 AM

Sorry,
I should have it made it clear that this was just a comment.

indienick 10-09-2007 09:25 AM

It's all good. :D
Perhaps you should submit this to the Linux Answers section?

Alien Bob 10-09-2007 03:32 PM

Quote:

Originally Posted by allend (Post 2918340)
I have been converting the mounts on my Samba servers from smbfs file systems to cifs file systems as the smbfs file system is now deprecated. The smbfs file systems could be automatically mounted at boot time, but after conversion to cifs they are not automatically mounted at boot. After boot a simple "mount -a" fixes things.

To get the cifs file systems to be automatically recognised at boot, I have found that I need to add this code to /etc/rc.d/rc.inet2 after the code to mount remote SMB filesystems.

Code:

# Mount remote (CIFS) filesystems:
if cat /etc/fstab | grep -v '^#' | grep -w cifs 1> /dev/null 2> /dev/null ; then
  echo "Mounting remote (CIFS) file systems:  /sbin/mount -a -t cifs"
  /sbin/mount -a -t cifs
  # Show the mounted volumes:
  /sbin/mount -v -t cifs
fi


This has been fixed in slackware-current which is still not publicly available (no idea when it will though, and don't ask).

Eric


All times are GMT -5. The time now is 07:47 AM.