Mounting CIFS file systems at boot with Slackware 12.0
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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
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 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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.