Oban
Posts: 5
Joined: Fri Aug 17, 2012 3:39 pm

QEMU / RASPIAN and CIFS mount error

Fri Aug 17, 2012 4:05 pm

Dear community,

could someone help a newbe in posix ?
I'm running 2012-07-15-wheezy-raspbian in QEMU for Windows, with TAP interface. The host is Win 7 64b.
Connection from raspian to the host is OK, also is with the Internet, and I can ssh from win 7 to raspian.

QEMU cmd line is :

Code: Select all

qemu-system-arm.exe -M versatilepb -cpu arm1176 -hda 2012-07-15-wheezy-raspbian.img -kernel kernel-qemu -m 192 -append "root=/dev/sda2" -net nic -net tap,ifname="QEMU_TAP0"
I wish to mount a windows share in raspian :

Code: Select all

sudo mount -t cifs //192.168.1.154/share /media/dell/ -o user=qemu%Raspberry0
I got :

Code: Select all

mount error: cifs filesystem not supported by the system
mount error(19): No such device
Well, googling since lastweek, here's what I tried :

Code: Select all

$ which mount.cifs
/sbin/mount.cifs

Code: Select all

$ ls /lib/modules/`uname -r`/kernel/fs/cifs
->cifs.ko

Code: Select all

$ sudo modprobe cifs
ERROR: could not insert 'cifs': Exec format error
cifs: version magic '3.1.9+ preempt mod_unload modversions ARMv6 ' should be '3.1.9+ mod_unload ARMv6'

Code: Select all

$ sudo modprobe  cifs -f
ERROR: could not insert 'cifs': Exec format error
cifs: version magic '' should be '3.1.9+ mod_unload ARMv6 '

Code: Select all

$ apt-cache search cifs-utils
cifs-utils - Common Internet File System utilities
samba - SMB/CIFS file, print, and login server for Unix
smbclient - command-line SMB/CIFS clients for Unix

Code: Select all

$ sudo apt-get --reinstall install cifs-utils
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
0 mis à jour, 0 nouvellement installés, 1 réinstallés, 0 à enlever et 5 non mis à jour.
Il est nécessaire de prendre 70,1 ko dans les archives.
Après cette opération, 0 o d'espace disque supplémentaires seront utilisés.
Réception de : 1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main cifs-utils armhf 2:5.5-1 [70,1 kB]
70,1 ko réceptionnés en 1s (65,7 ko/s)
(Lecture de la base de données... 54451 fichiers et répertoires déjà installés.)
Préparation du remplacement de cifs-utils 2:5.5-1 (en utilisant .../cifs-utils_2%3a5.5-1_armhf.deb) ...
Dépaquetage de la mise à jour de cifs-utils ...
Traitement des actions différées (« triggers ») pour « man-db »...
Paramétrage de cifs-utils (2:5.5-1) ...
And of course, I still can't make "mount -f cifs" work. :evil:

I wanna use cifs because 1) smbfs seems deprecated 2) Win 7 shares with NTLMv2 that is cifs compliant.

Given those data, do you think cifs-utils module is either loaded, installed, or not compatible with the kernel ?
Might it possible that there's a version problem between the kernel and the cifs package ?

What does this means ? "version magic '3.1.9+ preempt mod_unload modversions ARMv6 ' should be '3.1.9+ mod_unload ARMv6"

Any help is welcomed, as this kind of problem is very "educationnal" for me !

Oban
Posts: 5
Joined: Fri Aug 17, 2012 3:39 pm

QEMU / RASPIAN and CIFS mount error - EDIT

Fri Aug 17, 2012 10:16 pm

Another question : does the following mean that the module is loaded in the kernel ?
How to check if it's started, enabled or running ?

Code: Select all

$ modinfo cifs
filename:       /lib/modules/3.1.9+/kernel/fs/cifs/cifs.ko
version:        1.75
description:    VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows
license:        GPL
author:         Steve French <[email protected]>
srcversion:     B6EDDF79494EFA361C352B5
depends:
vermagic:       3.1.9+ preempt mod_unload modversions ARMv6
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: 50 Range: 2 to 256 (int)
parm:           echo_retries:Number of echo attempts before giving up and reconnecting server. Default: 5. 0 means never reconnect. (ushort)
Thanx to any reader that comes around and would post some tips...

notnewcivilman
Posts: 6
Joined: Sun Jul 08, 2012 3:17 am

Re: QEMU / RASPIAN and CIFS mount error

Thu Sep 20, 2012 1:45 am

This is a shot in the dark but try formatting your mount command as follows:

Code: Select all

mount -t cifs -o username=<username>,password='<password>' //server/share /mountpoint
 

plugwash
Forum Moderator
Forum Moderator
Posts: 3579
Joined: Wed Dec 28, 2011 11:45 pm

Re: QEMU / RASPIAN and CIFS mount error

Thu Sep 20, 2012 2:11 am

I'm guessing the kernel you are using doesn't match the modules you have in /etc/modules

Oban
Posts: 5
Joined: Fri Aug 17, 2012 3:39 pm

Re: QEMU / RASPIAN and CIFS mount error

Thu Sep 20, 2012 11:17 pm

Thank you notnewcivilman (what is a new civil man ?). I tried also your syntax and the reply is always the same. :cry:

The interesting thing is that the result is equal if I type a fool command like this one :

sudo mount -t cifs //19.16.1.255/shhhhhare /mnt/dell
mount error: cifs fiile system not supported by the system / no such device.

And there's that story of
cifs: version magic '3.1.9+ preempt mod_unload modversions ARMv6 ' should be '3.1.9+ mod_unload ARMv6'
present in dmesg and that I do not understand.
As plugwash suggested, there should be something wrong between the kernel and modules, or missing dependencies (I thought of samba-common but I don't know how to check).

The big issue is that I'm a real beginner in linux and friends, and I'm lost...

Plugwash: the etc/modules file is pretty empty. Only one line with : snd-bcm2835
I've seen your name in raspian.org ; if you're involved there, do you know where I could find release information on the 2012-09-18 wheezy image ? What would be the changes with the August version ? only the turbo mode ?

Already a big thanks for your suggestions

User avatar
PIstolero
Posts: 101
Joined: Mon Jul 23, 2012 6:28 am
Location: paradise city, where the grass is green and the girls are pretty

Re: QEMU / RASPIAN and CIFS mount error

Fri Sep 21, 2012 4:51 am

You are using a qemu kernel (-kernel kernel-qemu) not the raspbian kernel thats why you can´t load the module.
On a real RPI it will probably work or try to compile a qemu kernel with CIFS support (don´t know if you can load a module then.)

User avatar
PIstolero
Posts: 101
Joined: Mon Jul 23, 2012 6:28 am
Location: paradise city, where the grass is green and the girls are pretty

Re: QEMU / RASPIAN and CIFS mount error

Fri Sep 21, 2012 7:55 am

I upload my qemu & kernel to the wiki, maybe that solve your problem. Here is a qemu-linaro-1.2.0-2012.09 with a qemu kernel (3.2.27, the same as in new raspbian image) compiled with CIFS, just put the new raspbian image ( 2012-09-18-wheezy-raspbian.img) into it, change the run.bat file (delete -redir tcp:2222:22 and add -net nic -net tap,ifname="QEMU_TAP0" because your are using a TAP device).
http://elinux.org/File:Qemu-linaro-1.2.0-2012.09.7z
I´m not at home so I can not try it before tomorrow.

EDIT: fixed the .7z extension

notnewcivilman
Posts: 6
Joined: Sun Jul 08, 2012 3:17 am

Re: QEMU / RASPIAN and CIFS mount error

Fri Sep 21, 2012 1:34 pm

My screen name is an inside joke between me and my brother...

Also something I noticed the other night was that when I tried to mount something to the /mnt/whatever I got an error(13).
I didn't do any research on the error.

But I just changed the mount path to my a dir in my home dir. Such as /home/username/share

I'll try to keep an eye on this forum to see if you get this resolved plus I could read through your original post again....

Oban
Posts: 5
Joined: Fri Aug 17, 2012 3:39 pm

Re: QEMU / RASPIAN and CIFS mount error

Fri Sep 21, 2012 9:35 pm

well well well PIstolero, that was a good idea. I found your file in the wiki elinux.org (by searching for the last modifications in the wiki, cos' sincerely I don't know where to start from :oops: ), within which I only extract your "zImage" kernel.
You'll not be surprised to know it works !
I've done this :

Code: Select all

sudo mount.cifs //192.168.1.199/share /mnt/dell -o user=qemu%qemuPwdInWindows
and that's fine like in every other Debian over the world !

The point is that I can't understand why :)

notnewcivilman: for me the mounting point in /mnt/something did work. Did you mean
error(13) permission denied
? I had this due to a mistype in the password.

To all : do you know where I could find explanation on why qemu needs an external kernel and how this one was built for Raspbian, or is the kernel extracted from the wheezy img file, what does debian_version wheezy/sid means, why lsmod returns an empty list, etc.

Anyway big thank you to you three people, you were totally helpfull.
Best regards

User avatar
PIstolero
Posts: 101
Joined: Mon Jul 23, 2012 6:28 am
Location: paradise city, where the grass is green and the girls are pretty

Re: QEMU / RASPIAN and CIFS mount error

Sat Sep 22, 2012 8:46 am

Qemu needs a kernel because it is not emulating the same hardware as a RPI, see here:
http://qemu.weilnetz.de/qemu-doc.html#A ... m-emulator
You are emulating a versatile baseboard with SCSI Controller and other different hardware, for that you need the kernel, you are only using the filesystem from raspbian.
I used this how-to for compiling a qemu kernel:
http://xecdesign.com/compiling-a-kernel/
I took the kernel and toolchain to compile from here:
https://github.com/raspberrypi/linux
I add CIFS support in the menuconfig, maybe thats because its works for you with this kernel.

Oban
Posts: 5
Joined: Fri Aug 17, 2012 3:39 pm

Re: QEMU / RASPIAN and CIFS mount error

Sat Sep 22, 2012 9:19 pm

Hum... I browsed threw the links you mentionned, plus this one http://balau82.wordpress.com/2010/03/22 ... -emulator/ and I realize I'm far far away from compiling any line for a kernel :P

The fact is that your kernel works with a cifs module in.

Maybe last question : if I need e.g. a FTP server in my project, must I again have a new kernel built for Qemu ? And this each time a deep module is needed ?

User avatar
PIstolero
Posts: 101
Joined: Mon Jul 23, 2012 6:28 am
Location: paradise city, where the grass is green and the girls are pretty

Re: QEMU / RASPIAN and CIFS mount error

Sun Sep 23, 2012 8:32 am

No, you don' t need a special kernel for ftp (proftpd, vsftpd,...) for other network services, that was only for CIFS.

Return to “Raspberry Pi OS”