# Smbfs installation

## planar

Guys,

I want to install smbfs package so that I can mount windows shares from by gentoo box so I tried to emerge it but it was masked. I could succesfully unmask it but after all I got the following message:

```
gentoo etc # emerge smbfs

Calculating dependencies... done!

!!! Error: the sys-libs/glibc package conflicts with another package;

!!!        the two packages cannot be installed on the same system together.

!!!        Please use 'emerge --pretend' to determine blockers.

```

So I ran emerge with preted argument and got this:

```
gentoo etc # emerge --pretend smbfs

These are the packages that would be merged, in order:

Calculating dependencies... done!

[blocks B     ] sys-libs/glibc (is blocking dev-libs/libiconv-1.11)

[blocks B     ] sys-apps/man-pages (is blocking dev-libs/libiconv-1.11)

[ebuild  N    ] dev-libs/libiconv-1.11  USE="-build"

[ebuild  N    ] sys-devel/pmake-1.98

[ebuild  N    ] virtual/pmake-0

[ebuild  N    ] net-fs/smbfs-1.4.5
```

According to the output I can not install smbfs until I remove sys-libs/glib and sys-apps/man-pages packages. As far as I know these packages are part of my op sys.

Is it safe to remove these packages? I don't want to run into diffuculties and have my gentoo box reinstalled.

What you suggest?

thanks

planar

----------

## mose

Unmerging sys-libs/glibc is not safe at all, is a system package! However this block sounds a bit strange to me... which version of glibc are you using?

----------

## jpl888

smbfs or cifs should be enabled in the kernel. That as far as I can remember is all you need to mount windows shares.

You shouldn't need to emerge any other packages to complete the task.

----------

## mose

That's true... sorry for my previous answer, I readed too fast and understood samba, instead of smbfs

----------

## planar

Still no go, although I recompiled my kernel and enabled both smbfs and cifs as a module (I use 2.6.18-gentoo-r4 with gcc version 4.1.1)

After that issued the following command and got this:

```

gentoo / # mount -t smbfs //172.16.0.5/SHARED /mnt/smb

mount: wrong fs type, bad option, bad superblock on //172.16.0.5/SHARED,

       missing codepage or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so
```

Found this in kernel log:

smbfs: mount_data version 1919251317 is not supported

What did I do wrong?   :Shocked: 

----------

## planar

I tired to load smbfs module but got the following output:

```

plantoo / # insmod smbfs

insmod: can't read 'smbfs': No such file or directory

```

my make menuconfig looks like:

```
 

< > NFS file system support

< > NFS server support

<M> SMB file system support (to mount Windows shares etc.)                                                   

[*]   Use a default NLS                                                                                      

(cp437) Default Remote NLS Option                                                                   

<M> CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)

[*]   CIFS statistics                                                                                        

[*]     Extended statistics                                                                                  

[*]   Support legacy servers which use weaker LANMAN security                                                

[*]   CIFS extended attributes                                                                               

[*]     CIFS POSIX Extensions                                                                                

[*]   Enable additional CIFS debugging routines                                                              

[*]   CIFS Experimental Features (EXPERIMENTAL)                                                              

[*]     Kerberos/SPNEGO advanced session setup (EXPERIMENTAL)                                                

< > NCP file system support (to mount NetWare volumes)                                                       

< > Coda file system support (advanced network fs)                                                           

< > Andrew File System support (AFS) (Experimental)                                                          

< > Plan 9 Resource Sharing Support (9P2000) (Experimental)                                              

```

----------

## mose

please post

```

 dmesg | tail

```

Probably you need some other kernel modules in the section filesystem... I don't remember which one, but looking at mesg you'll have the answer

----------

## planar

After issuing mount command I found this in the log:

```

smb_fill_super: missing data argument

```

The rest of the log messages were related to cron only...

----------

## mose

Please post the entire error message from dmesg | tail

----------

## planar

Here you go:

```

Jan  9 19:10:12 plantoo su(pam_unix)[5106]: session opened for user root by (uid=1000)                                                                                              

Jan  9 19:12:26 plantoo smbfs: mount_data version 1919251317 is not supported                                                                                                       

Jan  9 19:12:48 plantoo smbfs: mount_data version 1919251317 is not supported                                                                                                       

Jan  9 19:13:05 plantoo smbfs: mount_data version 1919251317 is not supported                                                                                                       

Jan  9 19:20:01 plantoo cron[5147]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )                                                                                

Jan  9 19:21:35 plantoo smb_fill_super: missing data argument                                                                                                                       

Jan  9 19:29:55 plantoo su[5203]: Successful su for root by planar                                                                                                                  

Jan  9 19:29:55 plantoo su[5203]: + pts/5 planar:root                                                                                                                               

Jan  9 19:29:55 plantoo su(pam_unix)[5203]: session opened for user root by (uid=1000)                                                                                              

Jan  9 19:30:01 plantoo cron[5208]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )                                                                                

Jan  9 19:30:05 plantoo su(pam_unix)[5106]: session closed for user root                                                                                                            

Jan  9 19:40:01 plantoo cron[6038]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )                                                                                

Jan  9 19:41:59 plantoo su(pam_unix)[5203]: session closed for user root                                                                                                            

Jan  9 19:46:29 plantoo su[6515]: Successful su for root by planar                                                                                                                  

Jan  9 19:46:29 plantoo su[6515]: + pts/5 planar:root                                                                                                                               

Jan  9 19:46:29 plantoo su(pam_unix)[6515]: session opened for user root by (uid=1000)                                                                                              

Jan  9 19:50:01 plantoo cron[7222]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons ) 

Jan  9 19:55:27 plantoo smb_fill_super: missing data argument                                                                                                                       J

```

----------

## jpl888

 *Quote:*   

> mount -t smbfs //172.16.0.5/SHARED /mnt/smb

 

There are a couple of things wrong with that command. Firstly the forward slashes "/" should be backslashes "\". Secondly you have to double up the slashes because the backslash is a special character as far as Linux is concerned.

So the command should have been:-

```
mount -t smbfs \\\\172.16.0.5\\SHARED /mnt/smb
```

----------

## planar

Same error message, I think I give it up and continue using sftp to transfer my data from my getoo box to windows.

The only problem is that the sftp transfer speed is only ~1Mbyte/sec instead of ~10Mbyte/sec, I think I am gonna setup ftp server...

Appreciate your help guys.

----------

## mose

try to mount using smbmount!

----------

## planar

I don't wanna install samba at all ...

is it possible to emerge smbmount tool without installing whole samba ?

----------

## mose

Yes, I think that you have to emerge the whole samba if you want smbmount.

By the way, I noticed that you inserted the module with insmod

 *Quote:*   

> 
> 
> plantoo / # insmod smbfs
> 
> insmod: can't read 'smbfs': No such file or directory 
> ...

 

Try to load the module with modprobe

```

plantoo / # modprobe smbfs

```

Then post the output of

```

lplantoo / # smod

```

----------

## planar

Yeah, I just wanted to insert, but it failed.

```

plantoo torrents # modprobe smbfs

plantoo torrents # smod

bash: smod: command not found

```

So no output for modprobe, tried to seach for smod but nothing... what should I install to use smod? BTW what is it good for?

Thanks

----------

## mose

Sorry, I writed the wrong command.

Try to put the output of

```

lsmod

```

But I guess that your module has been inserted correctly (no error messages after modprobe)

By the way:

modprobe: inserts a module

lsmod: list all the modules inserted

----------

## planar

man, you`r right ! smbfs module is inserted, in this case the kernel side is all right..

I go back to mount command and try playing with that...there is still hope  :Smile: 

----------

## mose

ok... let us know

----------

## apryan

 *jpl888 wrote:*   

> 
> 
> So the command should have been:-
> 
> ```
> ...

 

according to http://www.gentoo.org/doc/en/quick-samba-howto.xml the slashes should be "//172.16.0.5/SHARED". Which is it?  :Smile: 

----------

