maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   [Problem] Mounting samba shares (https://talk.maemo.org/showthread.php?t=92470)

J4ZZ 2014-01-20 20:07

[Problem] Mounting samba shares
 
Hi there,

I'm trying to mount my smb shares but all I get is
Code:

mount: wrong fs type, bad option, bad superblock on //192.168.xxx.xxx,
      missing codepage or helper program, or other error
      (for several filesystems (e.g. nfs, cifs) you might
      need a /sbin/mount.<type> helper program)
      In some cases useful info is found in syslog - try
      dmesg | tail or so

I tried
Code:

mount -t cifs -o nolock,addr=192.168.my.ip 192.168.my.ip:/Movies /home/nemo/Videos/Movies
as well as some of the basic combinations but none worked.
Code:

mount -t cifs //192.168.my.ip/MyShare /home/nemo/Videos/Movies
modinfo cifs gives the following so the module should be there...
Code:

[root@Jolla nemo]# modinfo cifs
filename:      /lib/modules/3.4.0.20131212.3/kernel/fs/cifs/cifs.ko
version:        1.78
description:    VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows
license:        GPL
author:        Steve French <sfrench@us.ibm.com>
srcversion:    626D640DF7DD0301397A171
depends:
intree:        Y
vermagic:      3.4.0.20131212.3 SMP preempt mod_unload modversions ARMv7
parm:          CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (int)
parm:          cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to 64 (int)
parm:          cifs_min_small:Small network buffers in pool. Default: 30 Range: 2 to 256 (int)
parm:          cifs_max_pending:Simultaneous requests to server. Default: 32767 Range: 2 to 32767. (int)
parm:          enable_oplocks:Enable or disable oplocks (bool). Default:y/Y/1 (bool)

As far as I know mounting nfs shares with above commands is working just fine.

So, does anyone know what I am missing?
(Maybe its just cifs-utils, but there's no such package yet)

Thanks in advance,

J4ZZ

nieldk 2014-01-20 21:08

Re: [Problem] Mounting samba shares
 
did you liad the CIFS module?

(as root, does lsmod show CIFS module is loaded)

devel-su
modprobe cifs

will load the needed module

J4ZZ 2014-01-20 21:26

Re: [Problem] Mounting samba shares
 
Yes, lsmod shows

Code:

Module                  Size  Used by
cifs                  228409  0
nfs                  253670  0
nfs_acl                2521  1 nfs
auth_rpcgss            33161  1 nfs
lockd                  61648  1 nfs
sunrpc                209176  4 nfs,auth_rpcgss,lockd,nfs_acl
mysatroker            57477  2
wlan                2592759  0
cfg80211              144263  1 wlan


javispedro 2014-01-22 00:29

Re: [Problem] Mounting samba shares
 
Like in the NFS situation, without a working mount.cifs program you need to be more careful with the mount options you pass to the kernel.

In this case, something like the following should work:
Code:

mount -o unc=\\\\host\\share,ip=192.168.1.2,username=X,password=X //host/share /mnt/tmp
Note there was some bug in the 3.4 kernel used that caused CIFS kernel driver to truncate command lines after the "password=" option, so ensure it is the last. You can't use credential files without mount.cifs.

Alternatively, build cifs-utils.

J4ZZ 2014-01-22 18:41

Re: [Problem] Mounting samba shares
 
Quote:

Originally Posted by javispedro (Post 1408063)

Alternatively, build cifs-utils.

I decided to build latest cifs-utils and it worked like a charm.

(for those who wanna try)
Code:

cd /home/nemo/Downloads
wget ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/cifs-utils-6.3.tar.bz2
tar -xvjf cifs-utils-6.3.tar.bz2
cd cifs-utils-6.3
./configure
make
make install

So, mounting samba/cifs now just works fine for example using:
Code:

mount -t cifs //servername/sharename /nemo/mountfolder
But I also need the iocharset=utf8 option to allow access to files with names in non-English languages
but apparently nls_utf8.ko is missing from kernel and all I get is:
Code:

mount error(79): Can not access a needed shared library
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Can someone give me some guidance, how to get or compile this module, please?

Thanks in advance,

J4ZZ

javispedro 2014-01-22 18:47

Re: [Problem] Mounting samba shares
 
Quote:

Originally Posted by J4ZZ (Post 1408276)
Can someone give me some guidance, how to get or compile this module, please?

For now, put a vote on Kernel feature request: CONFIG_NLS_UTF8 ;)

J4ZZ 2014-01-22 19:29

Re: [Problem] Mounting samba shares
 
Thanks mate, just voted ;)

nieldk 2014-01-22 19:36

Re: [Problem] Mounting samba shares
 
Quote:

Originally Posted by J4ZZ (Post 1408276)
I decided to build latest cifs-utils and it worked like a charm.

(for those who wanna try)
Code:

cd /home/nemo/Downloads
wget ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/cifs-utils-6.3.tar.bz2
tar -xvjf cifs-utils-6.3.tar.bz2
cd cifs-utils-6.3
./configure
make
make install

So, mounting samba/cifs now just works fine for example using:
Code:

mount -t cifs //servername/sharename /nemo/mountfolder
But I also need the iocharset=utf8 option to allow access to files with names in non-English languages
but apparently nls_utf8.ko is missing from kernel and all I get is:
Code:

mount error(79): Can not access a needed shared library
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Can someone give me some guidance, how to get or compile this module, please?

Thanks in advance,

J4ZZ

It might be possible for you to compile a kernel module outside the kernel tree, at least I believe it will be less troblesome with Sailfish, than Harmattan.
For inspiration https://www.kernel.org/doc/Documenta...ld/modules.txt


All times are GMT. The time now is 03:32.

vBulletin® Version 3.8.8