mount.cifs 给出“挂载错误:系统不支持 cifs 文件系统”

mount.cifs 给出“挂载错误:系统不支持 cifs 文件系统”

我尝试将 OneDrive 文件夹安装到我的 Linux 服务器。但是,当我尝试使用 mout.cifs 时,XXX 是正确的值...

root@XXX:~# mount.cifs //onedrive.live.com/about/en-us/signin/ /usr/plex/share -o user='XXX',password='XXX'

...它返回:

mount error: cifs filesystem not supported by the system
mount error(19): No such device

我安装了 cifs-utils,没有任何错误。(版本 2:6.8-1)

我亲爱的朋友谷歌引导我到一些网站告诉我检查一些事情:

1.

zgrep -i cifs /proc/config.gz

不返回任何内容。

2.

modprobe cifs

返回:

modprobe: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/4.15.0/modules.builtin.bin'
modprobe: FATAL: Module cifs not found in directory /lib/modules/4.15.0

3.

我尝试更新软件包、重新安装 cifs-utils、升级内核、重新启动并重新编译内核。但对我而言,这些方法都不起作用。

4.

uname -r

返回:

4.15.0

5.

lsb_release -a

返回:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic

6.samba 服务已启动并正在运行。

service smbd status

返回

● smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-02-03 05:19:03 CET; 29min ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
 Main PID: 561 (smbd)
   Status: "smbd: ready to serve connections..."
    Tasks: 5 (limit: 165)
   CGroup: /system.slice/smbd.service
           ├─ 561 /usr/sbin/smbd --foreground --no-process-group
           ├─ 662 /usr/sbin/smbd --foreground --no-process-group
           ├─ 664 /usr/sbin/smbd --foreground --no-process-group
           ├─ 768 /usr/sbin/smbd --foreground --no-process-group
           └─1570 /usr/sbin/smbd --foreground --no-process-group

Feb 03 05:46:52 XXX.net smbd[2050]: pam_unix(samba:session): session closed for user nobody
Feb 03 05:46:52 XXX.net smbd[2052]: pam_unix(samba:session): session closed for user nobody
Feb 03 05:46:53 XXX.net smbd[2054]: pam_unix(samba:session): session closed for user nobody
Feb 03 05:46:56 XXX.net smbd[2055]: pam_unix(samba:session): session closed for user nobody
Feb 03 05:46:56 XXX.net smbd[2056]: pam_unix(samba:session): session closed for user nobody
Feb 03 05:46:58 XXX.net smbd[2057]: pam_unix(samba:session): session closed for user nobody
Feb 03 05:47:11 XXX.net smbd[2059]: pam_unix(samba:session): session closed for user nobody
Feb 03 05:47:15 XXX.net smbd[2064]: pam_unix(samba:session): session closed for user nobody
Feb 03 05:48:15 XXX.net smbd[2073]: pam_unix(samba:session): session closed for user nobody
Feb 03 05:48:20 XXX.net smbd[2076]: pam_unix(samba:session): session closed for user nobody

然而,最后几行对我来说似乎有点奇怪。

所以最后我束手无策了。我在网上搜索了几个小时,但我能找到的唯一解决方案是重新编译内核。显然这对我来说不起作用。

我希望有人能帮助我。如果您需要更多信息,请给我确切的命令行,因为我对 Linux 还比较陌生。

先感谢您!

问候小山

附言:请原谅我的英语不好。谢谢。

- - - - 更新 - - - - -

命令

find /lib/modules/ -name cifs.ko

返回一组内核名称:

/lib/modules/4.15.0-1019-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1036-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1019-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-33-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1019-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1011-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-38-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1009-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1022-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1006-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1021-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1008-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1012-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1023-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1025-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1024-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-39-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-42-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1020-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-43-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1025-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-23-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1008-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1012-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1028-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1004-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1031-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1023-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1025-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-30-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1027-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1009-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1028-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1024-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1015-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1016-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-32-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1029-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-33-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1030-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1017-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1023-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1018-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1035-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1007-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-29-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1012-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1009-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1021-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1006-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1021-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1014-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1028-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1015-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-32-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1017-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-36-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1026-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1013-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1021-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-22-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1027-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-23-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1010-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1021-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1019-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1017-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-36-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1010-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1018-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1011-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-29-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1007-oracle/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-38-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-39-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1031-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1032-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-20-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1020-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1008-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1010-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1014-azure/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-42-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1030-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-24-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-43-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1016-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-30-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-34-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-24-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1018-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-22-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1025-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1023-aws/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-20-lowlatency/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1009-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-34-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1026-kvm/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1026-gcp/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1017-oem/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-1013-azure/kernel/fs/cifs/cifs.ko

我应该选择哪一个?我应该使用....

GRUB_DEFAULT='Example GNU/Linux distribution'

...在文件中...

/etc/default/grub

选择要启动到哪个内核?请记住,启动过程成功后,我只能通过 ssh 访问服务器。我无法在启动过程中在屏幕上选择内核。

提前谢谢您。问候: Smallmountain

答案1

您没有运行 ubuntu 附带的内核:

uname -r
returns:

4.15.0

它应该4.15.0-45-generic在当前的 ubuntu 18.04 中。

运行此程序来找出cifs.ko系统中哪些已安装的内核具有该模块,然后重新启动进入该内核:find /lib/modules/ -name cifs.ko

在我的 18.04 系统上,例如:

root@nsnx:~# uname -r
4.15.0-45-generic
root@nsnx:~# find /lib/modules/ -name cifs.ko
/lib/modules/4.15.0-44-generic/kernel/fs/cifs/cifs.ko
/lib/modules/4.15.0-45-generic/kernel/fs/cifs/cifs.ko

如果您确实看到了cifs.ko自定义4.15.0内核的模块,也许您需要做的就是运行depmod -a

答案2

你的 Ubuntu 无法在文件系统中找到 cifs。没有必要将 cifs.ko 添加到内核。你可以在内核的菜单配置中对其进行定义,并在文件系统中选择 cifs。之后复制新的 zImage

相关内容