modinfo命令,查看模块的驱动文件位置
管理内核模块
配置文件
/etc/modprobe.conf
/etc/modprobe.d/*.conf
modinfo [ -k kernel ] [modulename|filename…]
选项
-n 只显示模块文件路径
-p 显示模块参数
-a 作者
-d 描述
modinfo ext4
filename: /lib/modules/3.10.0-1127.el7.x86_64/kernel/fs/ext4/ext4.ko.xz ##存放这个模块的驱动文件所在路径。/lib/modules/3.10.0-1127.el7.x86_64这个文件夹放了和我们内核相关的独立的驱动模块
license: GPL
description: Fourth Extended Filesystem
author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts’o and others
alias: fs-ext4
alias: ext3
alias: fs-ext3
alias: ext2
alias: fs-ext2
retpoline: Y
rhelversion: 7.8
srcversion: 46F4AD54B9612D512456178
depends: mbcache,jbd2
intree: Y
vermagic: 3.10.0-1127.el7.x86_64 SMP mod_unload modversions
signer: CentOS Linux kernel signing key
sig_key: 69:0E:8A:48:2F:E7:6B:FB:F2:31:D8:60:F0:C6:62:D8:F1:17:3D:57
sig_hashalgo: sha256
我们内核的驱动由两个地方提供
1:/boot/vmlinuz-3.10.0-1127.el7.x86_64 计算机启动的时候会把整个文件加载到内核,(grub的stage2)
2:由/lib/modules/3.10.0-1127.el7.x86_64目录下的驱动程序提供,这里的是按需加载