WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: mount.cifs (cifs-tools) kernel module assist  (Read 5869 times)

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 776
mount.cifs (cifs-tools) kernel module assist
« on: June 09, 2018, 10:48:04 AM »
@Juanito:

cifs-utils.tcz
tce.installed needs to have insmod /usr/local/lib/modules/4.14.10-tinycore64/kernel/fs/cifs/cifs.ko.gz followed by a modprobe for the extension to be functional, or at least a note in .info saying "install/load the module manually and THEN try the example shown! :)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: mount.cifs (cifs-tools) kernel module assist
« Reply #1 on: June 09, 2018, 01:37:57 PM »
Filesystem modules are autoloaded when you try to mount something with them. No manual modprobe is needed, just tested.
The only barriers that can stop you are the ones you create yourself.

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 776
Re: mount.cifs (cifs-tools) kernel module assist
« Reply #2 on: June 09, 2018, 04:00:56 PM »
That's what I thought as well.

CorePure64 v9.x with cifs-utils tce-load'ed (and even reboot just for kicks though I highly doubt that's ever needed)
Code: [Select]
cat /proc/filesystems
nodev   sysfs
nodev   rootfs
nodev   tmpfs
nodev   bdev
nodev   proc
nodev   cpuset
nodev   cgroup
nodev   cgroup2
nodev   debugfs
nodev   sockfs
nodev   dax
nodev   bpf
nodev   pipefs
nodev   ramfs
nodev   rpc_pipefs
nodev   devpts
        ext3
        ext2
        ext4
        cramfs
        vfat
        iso9660
nodev   nfs
nodev   nfs4
        fuseblk
nodev   fuse
nodev   fusectl
nodev   pstore
nodev   mqueue
        squashfs
        ntfs
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: mounting //10.0.0.20/os on /mnt/os failed: No such device


After the attempted mount.cifs usage, lsmod still does not show cifs as existing (though it's there in the kernel library at /usr/local/lib/modules/4.14.10-tinycore64/kernel/fs/cifs/cifs.ko.gz)
When the mod is installed manually, everything works as expected.  Thoughts?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: mount.cifs (cifs-tools) kernel module assist
« Reply #3 on: June 10, 2018, 02:52:13 AM »
Did you use mount.cifs or mount? I tried mount. (without cifs-utils)
edit: I now tested with mount.cifs. The module still got autoloaded.
« Last Edit: June 10, 2018, 03:02:37 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 776
Re: mount.cifs (cifs-tools) kernel module assist
« Reply #4 on: June 13, 2018, 11:34:09 AM »
@curaga: Thank you for your reply.

Yes, I tried mount -t cifs first (followed by mount.cifs) and both types received an error stating the kernel didn't support that particular file system.  Since then, I have a safety valve in place which (bootlocal) tests lsmod, if CIFS isn't listed, check to make sure the TCZ is downloaded and also exists in /tmp/tcloop (properly loaded) and of course, if anything fails, insmod followed by modprobe.
So far, it has to install-module after each boot.

Bare with me on my response time; I have a few other anomalies I'm TC-Fighting as well! :)  (ie: An HP 9020 running x64 and when being told to power-off, it says "Okay!" and two seconds later...  fires back up as if it received a WoL packet.  Currently I've had to poweroff -f at the end of rc.shutdown to make it behave; but I'm still curious as to the "why" part! :) )

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 776
Re: mount.cifs (cifs-tools) kernel module assist
« Reply #5 on: June 17, 2018, 09:37:58 PM »
@curaga: If you don't mind, see if you can replicate the following (VM maybe?)

* CorePure64 9.x fresh, no gui (or anything else for that matter)
* tce-load both cifs-utils and filesystems-KERNEL
* Reboot and lsmod to see if cifs is listed in the boot-time module list

IF SO, I have a whacky installation going on here; third machine with a clean installation (HDD) and I'm showing the link to /usr/local/lib/modules/4.14.10-tinycore64/kernel/fs/cifs (cifs.ko.gz) which points to tcloop/filesystems-KERNEL but it is not loaded.  (Possibly an oversight with tce.installed script??  It's empty.)  mount.cifs only has a link pointing usr/local/sbin/mount.cifs to /sbin/mount.cifs -- no check there to see whether or not cifs' module is installed/loaded.

FOR ME, I'm just adding insmod/modprobe to my startup scripts -- for anyone else this might pose a problem unless the don't mount remote smb/cifs directories.
Thanks!

NOTE: Without the above, attempting mount -t cifs... fails with cifs file system not supported... followed by error(19)
« Last Edit: June 17, 2018, 10:08:10 PM by centralware »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: mount.cifs (cifs-tools) kernel module assist
« Reply #6 on: June 18, 2018, 03:13:02 AM »
The module does not get automatically loaded on boot, it gets loaded by the kernel when I try to mount something.  Screenshot:
The only barriers that can stop you are the ones you create yourself.

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 776
Re: mount.cifs (cifs-tools) kernel module assist
« Reply #7 on: June 21, 2018, 06:21:58 AM »
<shrugs>  I have no clue, then  :-\

On my end (fresh install) I install filesystems and cifs (and dependencies pull in)
When attempting to (sudo) mount -t cifs //a.b.c.d/path/to/share /mnt/point -o credentials it complained about the kernel not supporting the file system.  When I listed the installed mods, cifs was nowhere to be found.  See screenshot enclosed; I removed my insmod script and rebooted; then copied your exact steps...