Unable to mount cifs shares - NanoPi M3

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:

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. :open_mouth:

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):

//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:

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.

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.

Hmm, looks like CIFS is missing from kernel/modules:

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.

Well, i compiled kernel with CIFS enabled, no luck, wont boot, possibly something I did/didn’t do :slight_smile:. 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.php/NanoPi_M3#Compile_Linux_Kernel

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. :stuck_out_tongue:
At least now I know it was not just me :smiley:

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

I receive an error when trying to compile the kernel:

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:

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?

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 :

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

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

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.

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:

"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_eyes:

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

sudo apt-get install u-boot-tools

Ok, I’ve managed to make it work although not exactly as it should.

I’ve followed the instructions here: http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M3#Make_Your_Own_OS_Image

Specifically the sections:
[]Install Cross Compiler
[
]Prepare mkimage

I’ve installed the u-boot-tools via

sudo apt-get install u-boot-tools

but follow the instructions on the aforementioned page if your distro does not provide this package.

Now execute the following commands:

git clone https://github.com/friendlyarm/linux-3.4.y.git
cd linux-3.4.y
git checkout nanopi2-lollipop-mr1

Then:

touch .scmversion
make nanopi3_linux_defconfig
make menuconfig

IMPORTANT: Go to File Systems → Network Filesystems and enable CIFS

then

make uImage

After a looooong time you’ll find the compiled uImage file in the arch/arm/boot/ subdirectory

I’ve copied this file in the boot partition of the SD card, but after booting up the M3 I’ve noticed no changes in behavior… CIFS shares still wouldn’t mount.

Then I’ve tried renaming the newly compiled uImage to uImage.hdmi and when I rebooted, CIFS magically worked.

Since I’m using the M3 as a headless machine, this is not relevant to me.
I’m not sure why DietPi is booting with the uImage.hdmi file by default, but I guess that those who need the LCD/HDMI support should fiddle with this section during the menuconfig phase.

Device Drivers -->
    Graphics support -->
      Nexell Graphics -->
        [ ] LCD
        [ ] HDMI

Maybe Fourdee would be able to explain this better. I’m sorry but I have not enough knowledge nor I’m skilled enough to go beyond this point :slight_smile:

Anyway… CIFS is now enabled. Yippee! :smiley:

If you run a headless machine too and you don’t want to compile the kernel yourself, you can also take the shortcut and download the kernel compiled by me here: http://www.mediafire.com/?romf7vmc7ta14
But remember to rename it uImage.hdmi before copying it onto the SD card or you won’t notice any changes.

Well, obviously something new happened immediately after… I tried dietpi-software and this is the output:

│    [ ]      �<94><80>�<94><80>�<94><80>�<94><80>Desktops�<94><80>�<94><80>�<94><80>�<94><80>�<94><80>�<94><80>�<94><
│    [ ] 23   LXDE: ultra lightweight desktop                                │
│    [ ] 24   MATE: desktop enviroment                                   ▒   │
│    [ ] 25   XFCE: lightweight desktop environment                      ▒   │
│    [ ] 26   GNUStep: lightweight based on OpenStep                     ▒   │
│    [ ] 113  Chromium: (Optional) web browser                           ▒   │
│    [ ]      �<94><80>�<94><80>�<94><80>�<94><80>Remote Desktop Access�<94><80>�<94><80>�<94><80>�<94><80>�<94><80>�<
│    [ ] 27   TightVNC Server: desktop for remote connection             ▒   │
│    [ ] 28   VNC4 Server: desktop for remote connection                 ▒   │
│    [ ] 29   XRDP: remote desktop protocol (rdp) server

:open_mouth: :thinking: :open_mouth: :frowning:

Thats a new one on me lol. Looks as if fbdev + fonts are completely broken.

Might be worth checking locale is in order:

locale



root@DietPi:~# locale
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
root@NanoPi:~# locale
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
root@NanoPi:~#

But also…

[ ]      ────Desktops────────────────────────────────────────────── ↑   |
|    [ ] 23   LXDE: ultra lightweight desktop                            ▮   |
|    [ ] 24   MATE: desktop enviroment                                   ▒   |
|    [ ] 25   XFCE: lightweight desktop environment                      ▒   |
|    [ ] 26   GNUStep: lightweight based on OpenStep                     ▒   |
|    [ ] 113  Chromium: (Optional) web browser                           ▒   |
|    [ ]      ────Remote Desktop Access───────────────────────────────── ▒   |
|    [ ] 27   TightVNC Server: desktop for remote connection             ▒   |
|    [ ] 28   VNC4 Server: desktop for remote connection                 ▒   |
|    [ ] 29   XRDP: remote desktop protocol (rdp) server                 ▒   |
|    [ ] 30   NoMachine: multi-platform server and client access         ▒   |
|    [ ]      ────Media Systems───────────────────────────────────────── ▒   |
|    [ ] 32   HiFi: web interface music & radio player                   ▒   |
|    [ ] 33   SubSonic 5: web interface media streaming server

The SBC fairy strikes again! :smiley:

Hello, I am not so good to compile kernel and unfortunately I don’t have time to learn this.
After last update 148->149 on RPi 3 I have the same problem. How to solve this? without network drive my RPi is not so useful.
Thanks in advance for your help.

What problem are you experiencing, exactly?
Please post error messages.

root@RPi:~# modprobe cifs
modprobe: ERROR: could not insert ‘cifs’: Unknown symbol in module, or unknown parameter (see dmesg)

it is not working by dietpi-config too

It doesn’t look like the same problem.
You do have the package cifs-utils (or -util, I don’t remember exactly the name) installed, don’t you?

I have - in newest version cifs-utils, there is no cifs-util package to install.
In my opinion there is problem with CIFS.
I don’t want to reinstall everything. What should I do now to fix this quite easy?

It’s not easy to debug without more information.

Please post your fstab:

cat /etc/fstab

(copy and paste here)

and the result of:

mount -a

BTW: DietPi recommends (and offers) to make a backup before upgrading for a reason. This is very easy to do (just use the command ‘dietpi-backup’ and follow instructions) and it saves from reinstalling everything in a case like yours.