LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 06-30-2011, 03:43 PM   #1
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Rep: Reputation: Disabled
cifs mount not working


Hello

On my LFS/BLFS system I would like to mount a windows share. I followed the instructions here
http://mirror.vtx.ch/blfs/view/svn/b...a3-client.html
and here
http://mirror.vtx.ch/blfs/view/svn/server/samba3.html
precisely, i.e. the first two boxes plus /etc/samba/smb.conf according to scenario 1.

Still I get the error:

Code:
mount unknown filesystem type 'cifs'
(or, if I change cifs to smbfs:
Code:
mount unknown filesystem type 'smbfs'
)

I have LFS svn-20110620 (kernel 2.6.39.1).

Am I overlooking something?
 
Old 06-30-2011, 03:47 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

Let us know the command that you are trying to mount cifs share. You should be using either:

mount -t cifs //cifsserver/cifsshare /localsystem_mountpoint/

or

mount.cifs //cifsserver/cifsshare /localsystem_mountpoint/
 
Old 07-01-2011, 04:32 AM   #3
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Original Poster
Rep: Reputation: Disabled
Yes, both of these commands produce the error. Also putting the mount in /etc/fstab and doing "mount -a" does.
The commands I am using are correct, they do work on another machine (where samba is installed as debian package).
It's as if samba was not installed.
 
Old 07-01-2011, 02:09 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Reply

Did you recently installed a customer kernel on this system.

I had similar kind of issue with my USB not getting mounted. Same error as you are getting. On the forums they suggested to restart the system and that will resolve the issue but that didnt work for me.

So I installed the module manually using insmod /lib/module/kernel-build/kernel/fs/vfat/vfat.ko

In your case you can use cifs.ko instead and then reboot the system to see if it works.
 
Old 07-02-2011, 11:18 AM   #5
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Original Poster
Rep: Reputation: Disabled
You are right, a kernel module was missing. I rebuilt the kernel with
FILE SYSTEMS-->Network file systems: CIFS support enabled.

But now I get another error:

Code:
mount: wrong fs type, bad option, bad superblock, or other error
(for several other filesystems (e.g. nfs, cifs) you need a /sbin/mount.<type> helper program
So I installed

TCP Wrapper-7.6
Portmap-6.0
NFS Utilities-1.1.4

and I still get the same error!
 
Old 07-02-2011, 11:55 AM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Make sure you have nfs-common installed on the system.

Run fsck on the source partition from where you are trying to mount the cifs share.
 
Old 07-02-2011, 01:57 PM   #7
lich000king
Member
 
Registered: Jun 2011
Posts: 56

Original Poster
Rep: Reputation: Disabled
Ok, I have finally figured it out.

A working windows share looks like this (in fstab)
Code:
//serverIP/dir /mnt/dir cifs noserverino,ro,iocharset=utf8,password=,username= 0 0
Before I had
Code:
//serverIP/dir_a/dir_b
and
Code:
...,password= 0 0
(i.e. no "username"
which worked in voyageMPD, but not in LFS.

I could track this down by using dmesg | tail.
Why this username is needed all of a sudden, I don't know.
And why dir_a/dir_b is no longer working, I don't now, either, but I can work around it by making a symlink to the subdirectory.
Does anyone know how to mount subdirectories directly? There might be an entry in smb.cfg, but I could not track it down.

No I believe the three packages I installed would not have been necessary(edit: check). Maybe not even samba client would be needed(edit: unlikely), I'm not sure. I am going to try uninstalling these as far as possible and see what happens.
Since all were installed from source and the build directories deleted, I guess I will have to rebuild them all in order for make uninstall to work.

Thanks, T3RM1NVT0R, for your help!

Edit:
A remaining problem is the shares are not mounted at startup, probably because the network is not ready at this stage. Adding "mount -a" to /etc/rc.d/init.d/network after "done in the "start" section solves this.
I also had to include a shutdown script to unmount, otherwise it would freeze because the LFS shutdown script does not properly unmount this share. (E.g. add umount.cifs -f... to a shutdown script that is executed sufficiently early, like alsa if it is used)

Last edited by lich000king; 07-09-2011 at 07:32 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount -t cifs is not working on RHEL knockout_artist Linux - Newbie 3 12-04-2009 12:19 PM
manual mount cifs works but srcipt mount cifs has mount error (13): Permission denied CADIT Linux - Newbie 6 11-20-2009 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 07:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration