Page 1 of 3

Unable to mount cifs shares - NanoPi M3

Posted: Thu Dec 29, 2016 4:34 pm
by Sciamano
I feel stupid, but I can't succeed in mounting samba/cifs shares on the NanoPi M3 (with v140).
I have created the mount points. I have installed the samba client, I have installed cifs-utils, I have even installed the samba server (it's useless, I know... but can't blame a man for trying).
I keep getting the error:

Code: Select all

mount error: cifs filesystem not supported by the system
mount error(19): No such device
I've done this a million times on other installations (dietpi on OPi PC, dietpi on RPi, Raspbian ecc.) and the same procedure works.
I can't understand why it's failing on the NanoPi M3.
Even the "automatic" procedure using dietpi-config fails. :o

Re: Cannot mount cifs shares - NanoPi M3

Posted: Mon Jan 02, 2017 4:43 pm
by Sciamano
Seriously... I've started again from scratch.
I've installed the samba client, cifs-utils and edited the fstab to add the following lines (which are copied and pasted from the fstab of a working installation of dietpi on a Raspberry Pi):

Code: Select all

//192.168.1.103/STCloud /mnt/STCloud cifs defaults,rw,credentials=/root/.cifscred 0 0 
//192.168.1.103/Multimedia /mnt/Multimedia cifs defaults,rw,credentials=/root/.cifscred 0 0 
//192.168.1.103/SBCBackups/Casa/NanoPi /mnt/backupfolder cifs defaults,rw,credentials=/root/.cifscred 0 0 
But it does not work:

Code: Select all

root@NanoPi:/mnt/STCloud# mount -a
mount error: cifs filesystem not supported by the system
mount error(19): No such device
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error: cifs filesystem not supported by the system
mount error(19): No such device
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error: cifs filesystem not supported by the system
mount error(19): No such device
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
(Of course I have also created the /root/.cifscred file, which was copied from the working installation).

I don't understand.

Re: Cannot mount cifs shares - NanoPi M3

Posted: Mon Jan 02, 2017 6:59 pm
by Fourdee
I'll power up my M3 and try to replicate.

Also, does it fail with dietpi-config > Networking Options: NAS > Samba Client? Either way it will pull in required packages.

Re: Unable to mount cifs shares - NanoPi M3

Posted: Mon Jan 02, 2017 7:05 pm
by Fourdee
Hmm, looks like CIFS is missing from kernel/modules:

Code: Select all

root@DietPi:~# mount -a
mount error: cifs filesystem not supported by the system
mount error(19): No such device
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
root@DietPi:~# modprobe cifs
modprobe: FATAL: Module cifs not found.

Re: Unable to mount cifs shares - NanoPi M3

Posted: Mon Jan 02, 2017 7:37 pm
by Fourdee
Well, i compiled kernel with CIFS enabled, no luck, wont boot, possibly something I did/didn't do :). If i get another chance over next few days, i'll take another stab at it.

If you want to try it yourself, see below:
http://wiki.friendlyarm.com/wiki/index. ... nux_Kernel

Re: Unable to mount cifs shares - NanoPi M3

Posted: Tue Jan 03, 2017 2:31 am
by Sciamano
I'll try too if I find the time. But I am not good at these things, so I guess it would be better if you did it. :p
At least now I know it was not just me :D

Also, I have noticed that in the audio settings there is no audio card selectable. But the board has a 3,5mm audio jack...

Re: Unable to mount cifs shares - NanoPi M3

Posted: Tue Jan 03, 2017 2:48 pm
by Sciamano
I receive an error when trying to compile the kernel:

Code: Select all

root@NanoPi:~/linux-3.4.y# make uImage
scripts/kconfig/conf --silentoldconfig Kconfig
make: arm-linux-gcc: Command not found
  WRAP    arch/arm/include/generated/asm/auxvec.h
  WRAP    arch/arm/include/generated/asm/bitsperlong.h
  WRAP    arch/arm/include/generated/asm/cputime.h
  WRAP    arch/arm/include/generated/asm/emergency-restart.h
  WRAP    arch/arm/include/generated/asm/errno.h
  WRAP    arch/arm/include/generated/asm/ioctl.h
  WRAP    arch/arm/include/generated/asm/irq_regs.h
  WRAP    arch/arm/include/generated/asm/kdebug.h
  WRAP    arch/arm/include/generated/asm/local.h
  WRAP    arch/arm/include/generated/asm/local64.h
  WRAP    arch/arm/include/generated/asm/percpu.h
  WRAP    arch/arm/include/generated/asm/poll.h
  WRAP    arch/arm/include/generated/asm/resource.h
  WRAP    arch/arm/include/generated/asm/sections.h
  WRAP    arch/arm/include/generated/asm/siginfo.h
  WRAP    arch/arm/include/generated/asm/sizes.h
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  Generating include/generated/mach-types.h
  CC      kernel/bounds.s
/bin/sh: 1: arm-linux-gcc: not found
/root/linux-3.4.y/./Kbuild:35: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 127
Makefile:986: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
But gcc is installed:

Code: Select all

root@NanoPi:~/linux-3.4.y# apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version.
gcc set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
WTF?

Re: Unable to mount cifs shares - NanoPi M3

Posted: Tue Jan 03, 2017 8:12 pm
by Fourdee
Sciamano wrote:I receive an error when trying to compile the kernel:
I made the same mistake lol, you need to install the toolchain for cross compiling. Must be on a Ubuntu (Debian might work, untested) 64bit PC :

Code: Select all

git clone https://github.com/friendlyarm/prebuilts.git
sudo mkdir -p /opt/FriendlyARM/toolchain
sudo tar xf prebuilts/gcc-x64/arm-cortexa9-linux-gnueabihf-4.9.3.tar.xz -C /opt/FriendlyARM/toolchain/
export PATH=/opt/FriendlyARM/toolchain/4.9.3/bin:$PATH
export GCC_COLORS=auto
. ~/.bashrc
I'll take a look at the soundcard: https://github.com/Fourdee/DietPi/issues/690

Re: Unable to mount cifs shares - NanoPi M3

Posted: Tue Jan 03, 2017 10:47 pm
by Sciamano
Fourdee wrote:
Sciamano wrote:I receive an error when trying to compile the kernel:
I made the same mistake lol, you need to install the toolchain for cross compiling. Must be on a Ubuntu (Debian might work, untested) 64bit PC :

Code: Select all

git clone https://github.com/friendlyarm/prebuilts.git
sudo mkdir -p /opt/FriendlyARM/toolchain
sudo tar xf prebuilts/gcc-x64/arm-cortexa9-linux-gnueabihf-4.9.3.tar.xz -C /opt/FriendlyARM/toolchain/
export PATH=/opt/FriendlyARM/toolchain/4.9.3/bin:$PATH
export GCC_COLORS=auto
. ~/.bashrc
I don't think I've understood. The kernel has to be compiled on a Ubuntu 64 bit PC?
When do these commands you wrote need to be launched?
Thanks
Fourdee wrote:I'll take a look at the soundcard: https://github.com/Fourdee/DietPi/issues/690
Great thanks. Maybe it works, I don't know. I couldn't actually test it because I did not have any speakers available, but I've noticed that the Audio Config section did not list it.

Re: Unable to mount cifs shares - NanoPi M3

Posted: Wed Jan 11, 2017 4:23 pm
by Sciamano
I tried compiling the kernel on a Ubuntu 64-bit PC. Installed build-essential, followed the guide and your indications but at an advanced point I got this error:

Code: Select all

"mkimage" command not found - U-Boot images will not be built
/home/luca/git/linux-3.4.y/arch/arm/boot/Makefile:101: recipe for target 'arch/arm/boot/uImage' failed
make[1]: *** [arch/arm/boot/uImage] Error 1
/home/luca/git/linux-3.4.y/arch/arm/Makefile:291: recipe for target 'uImage' failed
make: *** [uImage] Error 2
Any suggestions? :roll:

*EDIT*: in case anyone else needs this, the solution is:

Code: Select all

sudo apt-get install u-boot-tools