【问题标题】:How do I add a kernel module not compiled in my current kernel in linux如何在 linux 中添加未在当前内核中编译的内核模块
【发布时间】:2014-11-24 04:01:18
【问题描述】:

我发现内核模块 "ceph" 和 "rbd" 在我的 centos 7 中被配置为 "Y""M"寻找 /boot/config-xxxx 文件。

Does any guys know what's the best way to add these modules back ?

我需要手动download内核源代码和configure这些模块到“Y/M”吗?
还是我只需要build 有两个内核模块和add 他们到 /lib64/modules

【问题讨论】:

  • 检查内核模块是否构建在ls /lib/modules/uname -r/kernel/fs/ceph下的模块,然后modprobe ceph加载模块。

标签: linux linux-kernel centos7


【解决方案1】:

首先,

  1. 我发现内核模块“ceph”和“rbd”配置为“Y”或“M”

A kernel module is configured as either "Y" or "M". If you grep for the module under /boot/config it would be marked either of those.

如果标记为“Y”,则该模块已作为静态模块内置到内核中。您无需再次重建它。

如果标记为“M”,则该模块仍被构建,但作为 DYNAMIC MODULE。您可以使用“$ lsmod”命令找到该模块,也可以在 /lib/modules 中找到

So, if you don't find your module listed under /boot/config*** only then you will have to consider building that module

接下来,如果您没有找到列出的模块,那么您将不得不下载与您 PC 上的版本相对应的内核源代码,然后只编译这些模块并安装它们

【讨论】:

    猜你喜欢
    • 2012-02-22
    • 1970-01-01
    • 2011-05-03
    • 1970-01-01
    • 1970-01-01
    • 2011-06-06
    • 2023-03-14
    相关资源
    最近更新 更多