Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: hogkite on November 30, 2020, 02:36:10 AM

Title: Mounting CIFS (failed: No such device)
Post by: hogkite on November 30, 2020, 02: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?

Title: Re: Mounting CIFS (failed: No such device)
Post by: Rich on November 30, 2020, 05: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.
Title: Re: Mounting CIFS (failed: No such device)
Post by: Paul_123 on November 30, 2020, 05: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.   
Title: Re: Mounting CIFS (failed: No such device)
Post by: hogkite on November 30, 2020, 06: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

Title: Re: Mounting CIFS (failed: No such device)
Post by: Paul_123 on November 30, 2020, 07: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.
Title: Re: Mounting CIFS (failed: No such device)
Post by: hogkite on November 30, 2020, 08: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
Title: Re: Mounting CIFS (failed: No such device)
Post by: hogkite on November 30, 2020, 08:40:47 AM
I've added samba4 and samba4-lib just in case, but didn't help
Title: Re: Mounting CIFS (failed: No such device)
Post by: Paul_123 on November 30, 2020, 08:55:59 AM
Is cifs.ko loading properly?

what is the output of lsmod?
Title: Re: Mounting CIFS (failed: No such device)
Post by: hogkite on November 30, 2020, 09:13:09 AM
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?
Title: Re: Mounting CIFS (failed: No such device)
Post by: Rich on November 30, 2020, 09:45:49 AM
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.
Title: Re: Mounting CIFS (failed: No such device)
Post by: hogkite on November 30, 2020, 09:56:21 AM
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.

Title: Re: Mounting CIFS (failed: No such device)
Post by: Juanito on November 30, 2020, 10:07:33 AM
piCore will automatically download and install the correct extensions if you use “tce-load -wil filesystems-KERNEL raid-dm-KERNEL”
Title: Re: Mounting CIFS (failed: No such device)
Post by: Rich on November 30, 2020, 10:12:45 AM
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.
Title: Re: Mounting CIFS (failed: No such device)
Post by: Paul_123 on November 30, 2020, 10:30:12 AM
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
Title: Re: Mounting CIFS (failed: No such device)
Post by: Rich on November 30, 2020, 10:47:58 AM
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.
Title: Re: Mounting CIFS (failed: No such device)
Post by: hogkite on November 30, 2020, 11:10:58 AM
Thanks guys, yes that script very useful

I've followed Juanito's advice but still not quite right and slightly confused!

I was getting some errors with the original command so broke it up slightly as follows...

tce-load -wil raid-dms-KERNEL

Downloading: raid-dms-5.4.51-piCore-v7l.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: raid-dms-5.4.51-piCore-v7l.tcz.md5.txt: No such file or directory
Error on raid-dms-5.4.51-piCore-v7l.tcz

tce-load -wil file systems-KERNEL

file is already installed!
Downloading: systems-5.4.51-piCore-v7l.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: systems-5.4.51-piCore-v7l.tcz.md5.txt: No such file or directory
Error on systems-5.4.51-piCore-v7l.tcz

uname -r (returns 5.4.51-piCore-v7l)

I then used tce-ab to search for the extensions.

when using the search term raid I found....

raid-dm-5.4.51-piCore-v7l.tcz (note not dms, just dm, anyway installed this and it appears in onboot.lst)

I then searched for filesystems and found...

filesystems-5.4.51-piCore-v7l.tcz

I tried to install this but it says already installed (filesystems-5.4.51-piCore-v7l is already installed!)

lsmod shows...


squashfs                     45056 39
zstd_decompress         65536  1 squashfs
xxhash                        20480  1 zstd_decompress
raspberrypi_hwmon      16384  0
zram                           28672  1
zsmalloc                      28672  1 zram

Not exactly sure where this leaves me but mounts still not working

Extract from latest TCscan....

Sect 8    onboot.lst, ondemand

/mnt/mmcblk0p2/tce/onboot.lst=
        openssh.tcz
        nano.tcz
        kmaps.tcz
        AssetUPnP.tcz
        ntfs-3g.tcz
        cifs-utils.tcz
        samba4.tcz
        samba4-lib.tcz
        raid-dm-5.4.51-piCore-v7l.tcz

ondemand=
        total 4
        -rwxrwxr-x    1 tc       staff           46 Jan  1  1970 squashfs-tools


#----------------------------------------------------------------------------------
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




 
Title: Re: Mounting CIFS (failed: No such device)
Post by: Juanito on November 30, 2020, 11:27:27 AM
Sorry - that should have been filesystems and raid-dm
Title: Re: Mounting CIFS (failed: No such device)
Post by: hogkite on November 30, 2020, 11:43:03 AM
No problem, I sort of worked that out and maybe the raid extension has installed ok?

If I've still got a problem, do the messages in section 9 of the scan (Missing md5 files, Failed md5 checks, Local/Repo md5 files differ) still indicate a problem with extension/module mis-match?
Title: Re: Mounting CIFS (failed: No such device)
Post by: Juanito on November 30, 2020, 12:26:44 PM
You can check if it installed with “tce-status-i | grep raid”
Title: Re: Mounting CIFS (failed: No such device)
Post by: Greg Erskine on November 30, 2020, 12:30:54 PM
hi hogkite,

I'd start from scratch and not swap the SD card between different RPi architectures. Doing that will result in a mismatch of extensions.

regards
Greg

Title: Re: Mounting CIFS (failed: No such device)
Post by: Rich on November 30, 2020, 12:39:37 PM
Hi Juanito
The following are present in  http://tinycorelinux.net/12.x/armv7/tcz/  but not in  http://tinycorelinux.net/12.x/armv7l/tcz/:
Code: [Select]
raid-dm-5.4.51-piCore-v7l.tcz
raid-dm-5.4.51-piCore-v7l+.tcz
raid-dm-5.4.51-piCore-v7.tcz
filesystems-5.4.51-piCore-v7l.tcz
filesystems-5.4.51-piCore-v7l+.tcz
filesystems-5.4.51-piCore-v7.tcz
They should be in  http://tinycorelinux.net/12.x/armv7l/tcz/  too, right?
Title: Re: Mounting CIFS (failed: No such device)
Post by: Rich on November 30, 2020, 12:46:47 PM
Hi Juanito
I don't see any  KERNEL  extensions in  http://tinycorelinux.net/12.x/armv7l/tcz/.  Oversight?
Title: Re: Mounting CIFS (failed: No such device)
Post by: hogkite on November 30, 2020, 12:48:39 PM
Thanks guys..

tce-status shows..

raid-dm-5.4.51-piCore-v7l
filesystems-5.4.51-piCore-v7l

no other raid/filesystems extensions.

George....yes, think it might be better to start over, won't take long. I'm assuming my personal extensions and text files can all be transferred without issue.

Rich...what's the use case difference for those two different versions, seems like I have the 7l.

Having said that just seen your reply to Juanito, maybe I should hold fire
Title: Re: Mounting CIFS (failed: No such device)
Post by: Juanito on November 30, 2020, 01:01:18 PM
RPi-2/3/4 all use extensions from the armv7 repo.

RPi-2/3 use v7 kernel extensions
RPi-4 uses v7l kernel extensions

There should be no need for an armv7l repo.
Title: Re: Mounting CIFS (failed: No such device)
Post by: Rich on November 30, 2020, 01:04:05 PM
Hi hogkite
... Rich...what's the use case difference for those two different versions, seems like I have the 7l. ...
Those slight differences (7, 7l, 7l+) are for different ARM processors. Based on the kernel you're running, 7l  is the
correct version for you.
Title: Re: Mounting CIFS (failed: No such device)
Post by: Rich on November 30, 2020, 01:41:40 PM
Hi hogkite
... If I've still got a problem, do the messages in section 9 of the scan (Missing md5 files, Failed md5 checks, Local/Repo md5 files differ) still indicate a problem with extension/module mis-match?
You can delete those 2 extensions, the v7 not the v7l versions.

Have you tried loading the kernel module:
Code: [Select]
sudo modprobe cifs.koThen see if  lsmod  lists it as being loaded.
Title: Re: Mounting CIFS (failed: No such device)
Post by: hogkite on November 30, 2020, 02:22:21 PM
Rich...

Thanks but I'm in the process of re-building it and can confirm all the mounts seem to work now. As pointed out it must have had something to do with me building on an old RPi and then moving to the RPi4.

Will update as soon as finished

All seems to be working well, just re-scanning my music library which will atke a while but all shares mounted correctly after reboot. Also the TCscan doesn't show any mismatches with extensions

Thanks again for all the help from everyone