WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Mounting CIFS (failed: No such device)  (Read 9645 times)

Offline hogkite

  • Newbie
  • *
  • Posts: 14
Mounting CIFS (failed: No such device)
« on: November 30, 2020, 05:36:10 AM »
Just can't figure this one out. Not the first time had mounting problems with CIFS but with other Linux variants, not sure why it always seems to be problematic.

Anyway, I built my piCore system on an old RPi and created a script in /opt to mount 4 CIF shares on my NAS. I added the script to /opt/bootlocal.sh and saved everything, rebooted, all worked perfectly, great!

I created the local mount points on the piCore in /mnt/mmcblk0p2/ for example...../mnt/mmcblk0p2/MusicNASCD

The music app I'm using (Asset) was quite slow on the old RPi decided to move the whole image to a RPi4 that I have. So backed up the piCore system and restored it to a new card (microSDHC), installed it in the RPi4 and booted up.

None of the CIF mounts work anymore!! I get an error that says "failed: No such device"............nothing has changed from the original build, other than the card.

I know there are all sorts of advice on similar issues scattered all over the net wrt CIF versions and other options. I've played around with these and none of them helped, also tried different share names without spaces etc, nothing works now. I have the ntfs-3g extension loaded, I also had the samba and cifs-utils loaded although not sure I need them but still didn't work.

Here is one of the mount commands...

sudo mount -t cifs //192.168.1.5/"Jack Music MQ" /mnt/mmcblkp02/MusicNASMQ -o username=MusicUser,password=‘xxxxxxxxxxxxx’

I'm wondering if the error message is referring to /mnt/mmcblkp02/MusicNASMQ more so than anything else?

There's nothing obvious in dmesg. Anyone any ideas on this please?


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11685
Re: Mounting CIFS (failed: No such device)
« Reply #1 on: November 30, 2020, 08:25:30 AM »
Hi hogkite
I think there are separate kernel and module builds for the different RPIs, so you may not be able to simply move an
existing install from an  "old RPi"  to a  "RPi4". Some of the boot config files may come into play too.

Maybe one of the RPi experts can confirm or deny what I just said.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1257
Re: Mounting CIFS (failed: No such device)
« Reply #2 on: November 30, 2020, 08:54:22 AM »
What version of piCore?

Yes, filesystems-KERNEL.tcz is required.  And if you setup on an older pi, you would not have the correct kernel module.  on you Pi4 image, run

tce-load -wi filesystems-KERNEL.tcz

Also take a look at `dmesg`  There might be some clues in there.  With modern kernels, you might need to specify a mount option vers=x.0  (Where x=1,2,3 or 4) depending on the remote device.   

Offline hogkite

  • Newbie
  • *
  • Posts: 14
Re: Mounting CIFS (failed: No such device)
« Reply #3 on: November 30, 2020, 09:43:03 AM »
Paul,

Thanks, I built the RPi using the piCore-12.0.zip from the stable releases advertised for Raspberry on the TCL website.

The Linux piCore is version 5.4.51-piCore-V71

I ran the "tce-load -wi filesystems-KERNEL.tcz" and my system reports that it's already installed......"Filesystems-5.4.51-piCore-v71 already installed"

I can't see anything of relevance in dmesg. I've already tried the different version variants and that didn't work. My NAS is enabled upto SMB v3 although pretty sure v1 is disabled. But as mentioned this all worked and I haven't changed anything at the NAS end.

Thanks

« Last Edit: November 30, 2020, 10:07:50 AM by hogkite »

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1257
Re: Mounting CIFS (failed: No such device)
« Reply #4 on: November 30, 2020, 10:47:39 AM »
entertain me,   add vers=3.0 to your mount options.

You can also install cifs-utils if you wish, which has the full mount.cifs helper.

Offline hogkite

  • Newbie
  • *
  • Posts: 14
Re: Mounting CIFS (failed: No such device)
« Reply #5 on: November 30, 2020, 11:11:19 AM »
Hi Paul,

I've added the cifs-utils and also added vers=3.0 to the mount command, still not working, here's what the mount command looks like now (password changed)....

sudo mount -t cifs //192.168.1.5/"Jack Music MQ" /mnt/mmcblk0p2/MusicNASMQ -o username=MusicUser,password='xxxxxxxx',vers=3.0

and here is the error message, nothing new added to dmesg either.

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) and kernel log messages (dmesg)
mount: mounting //192.168.1.5/Jack Music MQ on /mnt/mmcblk0p2/MusicNASMQ failed: No such device

Here is what my onboot.1st looks like.....

openssh.tcz
nano.tcz
kmaps.tcz
AssetUPnP.tcz
ntfs-3g.tcz
cifs-utils.tcz

Offline hogkite

  • Newbie
  • *
  • Posts: 14
Re: Mounting CIFS (failed: No such device)
« Reply #6 on: November 30, 2020, 11:40:47 AM »
I've added samba4 and samba4-lib just in case, but didn't help

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1257
Re: Mounting CIFS (failed: No such device)
« Reply #7 on: November 30, 2020, 11:55:59 AM »
Is cifs.ko loading properly?

what is the output of lsmod?

Offline hogkite

  • Newbie
  • *
  • Posts: 14
Re: Mounting CIFS (failed: No such device)
« Reply #8 on: November 30, 2020, 12:13:09 PM »
I installed a script (TCscan) that I found on the forum that hopefully gives more information, I have attached the scan results here

Can't see cifs mention in lsmod?
« Last Edit: November 30, 2020, 12:15:13 PM by hogkite »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11685
Re: Mounting CIFS (failed: No such device)
« Reply #9 on: November 30, 2020, 12:45:49 PM »
Hi hogkite
... Can't see cifs mention in lsmod?
That's because it's not loaded. Here's why:
Code: [Select]
#----------------------------------------------------------------------------------
Sect 1    TC version, uname, tcedir, mydata.tgz status, /etc/sysconfig/

TC version=
12.0

uname=
Linux piCore 5.4.51-piCore-v7l #1 SMP Sat Sep 19 11:36:43 EDT 2020 armv7l GNU/Linux

 ----- Snip -----
That shows the kernel you are running is version  5.4.51-piCore-v7l

Code: [Select]
#----------------------------------------------------------------------------------
Sect 9    Missing md5 files, Failed md5 checks, Local/Repo md5 files differ

Missing md5 files= 1
AssetUPnP.tcz.md5.txt

Failed md5 checks= 0
All md5 checks passed.

Local/Repo md5 file differences= 3
filesystems-5.4.51-piCore.tcz Not in repo
raid-dm-5.4.51-piCore.tcz Not in repo

ca-certificates.tcz Mismatch
Local 86f3622d1337cf1ef0aa06503e22952e
Repo  0c1f12523a2162b16276695376681a0d
This shows the your  filesystems  extension is from version  5.4.51-piCore.
That does not match your kernel which is version  5.4.51-piCore-v7l.  It will not load because the versions don't match.
The same holds true for your  raid-dm  extension.
« Last Edit: November 30, 2020, 01:14:28 PM by Rich »

Offline hogkite

  • Newbie
  • *
  • Posts: 14
Re: Mounting CIFS (failed: No such device)
« Reply #10 on: November 30, 2020, 12:56:21 PM »
Thanks Rich

Has this been most likely caused by me moving the image from my old RPi to the new RPi?

Maybe if I had built it on the RPi4 and moved it to the old RPI it would have worked? Perhaps someone could just outline the compatibility of PiCore between RPIs for me, I know with Raspbian you can move between models without issue (or at least backwards).

No problem, I'll rebuild it all on the RPi4.....and see what happens.


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14840
Re: Mounting CIFS (failed: No such device)
« Reply #11 on: November 30, 2020, 01:07:33 PM »
piCore will automatically download and install the correct extensions if you use “tce-load -wil filesystems-KERNEL raid-dm-KERNEL”
« Last Edit: November 30, 2020, 02:28:13 PM by Juanito »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11685
Re: Mounting CIFS (failed: No such device)
« Reply #12 on: November 30, 2020, 01:12:45 PM »
Hi hogkite
The mixed version numbers sounds like you installed a fresh operating system on the RPi4 and then transferred the rest
of your files and extensions from your old RPi. There should be no need to start from scratch. Juanitos recommendation
should fix your problem.

Thank you for trying out TCscan.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1257
Re: Mounting CIFS (failed: No such device)
« Reply #13 on: November 30, 2020, 01:30:12 PM »
That's a cool script Rich.   Need to put that one in my Help Desk Script.

1)  Is it Plugged in?
2)  Can you unplug it and plug it back in?
3)  Run tcscan.sh

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11685
Re: Mounting CIFS (failed: No such device)
« Reply #14 on: November 30, 2020, 01:47:58 PM »
Hi Paul_123
That's a cool script Rich. ...
Thanks, cool is exactly what i was going for. ;D

Some of the other distros have scripts that do this type of thing, and I've seen the output they generate. Talk about
information overload. I decided to focus on Tinycore specifics, questions we ask, problems that typically come up, and
making the output clean and concise.

It was written for x86 platforms but I'm glad to see it has some value on ARM too.