内核与内核模块:depmod,lsmod,modinfo,insmod,rmmod,mdprobe

 
 
       
 
内核模块:/lib/modules/version/kernel或/lib/modules/$(uname -r)/kernel;

[root@localhost kernel]# cd /lib/modules/$(uname -r)/kernel [root@localhost kernel]# ll total 32 drwxr-xr-x 3 root root 4096 Sep 20 2015 arch drwxr-xr-x 3 root root 4096 Sep 20 2015 crypto drwxr-xr-x 39 root root 4096 Sep 20 2015 drivers drwxr-xr-x 26 root root 4096 Sep 20 2015 fs drwxr-xr-x 4 root root 4096 Sep 20 2015 lib drwxr-xr-x 20 root root 4096 Sep 20 2015 net drwxr-xr-x 3 root root 4096 Sep 20 2015 samples drwxr-xr-x 9 root root 4096 Sep 20 2015 sound

 

   
      
 内核源码:/usr/src/linux 或 /usr/src/kernels;

[root@localhost boot]# cd /usr/src/kernels [root@localhost kernels]# ll total 216 drwxr-xr-x 27 root root 4096 Nov 5 2015 linux-2.6.32 -rwxrw-rw- 1 root root 12078 Sep 18 2015 tracehook.patch -rw-r--r-- 1 root root 149494 Sep 18 2015 utrace.patch -rw-r--r-- 1 root root 47352 Sep 18 2015 utrace-ptrace.patch

 

      如果内核顺利被加载了,会有以下几个信息记录:

 

     
[root@localhost kernels]# cat /proc/version
Linux version 2.6.32 (root@localhost.localdomain) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-55)) #1 SMP Sun Sep 20 18:58:21 PDT 2015
You have new mail in /var/spool/mail/root

 

    
 系统内核功能:/proc/sys/kernel

 




[root@localhost kernels]# cd /proc/sys/kernel [root@localhost kernel]# ll total 0 -rw-r--r-- 1 root root 0 Jun 6 19:11 acct -rw-r--r-- 1 root root 0 Jun 6 19:11 acpi_video_flags -rw-r--r-- 1 root root 0 Jun 6 19:11 auto_msgmni -rw-r--r-- 1 root root 0 Jun 6 19:11 blk_iopoll -r--r--r-- 1 root root 0 Jun 6 19:11 bootloader_type -r--r--r-- 1 root root 0 Jun 6 19:11 bootloader_version -rw------- 1 root root 0 Jun 6 19:11 cad_pid -rw-r--r-- 1 root root 0 Jun 6 19:11 compat-log -rw-r--r-- 1 root root 0 Jun 6 19:11 core_pattern -rw-r--r-- 1 root root 0 Jun 6 19:11 core_pipe_limit -rw-r--r-- 1 root root 0 Jun 6 18:28 core_uses_pid -rw-r--r-- 1 root root 0 Jun 6 19:11 ctrl-alt-del -rw-r--r-- 1 root root 0 Jun 6 19:11 domainname -rw-r--r-- 1 root root 0 Jun 6 19:11 ftrace_dump_on_oops -rw-r--r-- 1 root root 0 Jun 6 19:11 hostname -rw-r--r-- 1 root root 0 Jun 6 18:27 hotplug -rw-r--r-- 1 root root 0 Jun 6 19:11 hung_task_check_count -rw-r--r-- 1 root root 0 Jun 6 19:11 hung_task_panic -rw-r--r-- 1 root root 0 Jun 6 19:11 hung_task_timeout_secs -rw-r--r-- 1 root root 0 Jun 6 19:11 hung_task_warnings -rw-r--r-- 1 root root 0 Jun 6 19:11 io_delay_type dr-xr-xr-x 0 root root 0 Jun 6 19:11 keys -rw-r--r-- 1 root root 0 Jun 6 19:11 kstack_depth_to_print -rw-r--r-- 1 root root 0 Jun 6 19:11 max_lock_depth -rw-r--r-- 1 root root 0 Jun 6 18:27 modprobe -rw-r--r-- 1 root root 0 Jun 6 19:11 modules_disabled -rw-r--r-- 1 root root 0 Jun 6 18:28 msgmax -rw-r--r-- 1 root root 0 Jun 6 18:28 msgmnb -rw-r--r-- 1 root root 0 Jun 6 19:11 msgmni -r--r--r-- 1 root root 0 Jun 6 18:28 ngroups_max -rw-r--r-- 1 root root 0 Jun 6 19:11 nmi_watchdog -r--r--r-- 1 root root 0 Jun 6 19:11 osrelease -r--r--r-- 1 root root 0 Jun 6 19:11 ostype -rw-r--r-- 1 root root 0 Jun 6 19:11 overflowgid -rw-r--r-- 1 root root 0 Jun 6 19:11 overflowuid -rw-r--r-- 1 root root 0 Jun 6 19:11 panic -rw-r--r-- 1 root root 0 Jun 6 19:11 panic_on_io_nmi -rw-r--r-- 1 root root 0 Jun 6 19:11 panic_on_oops -rw-r--r-- 1 root root 0 Jun 6 19:11 panic_on_unrecovered_nmi -rw-r--r-- 1 root root 0 Jun 6 19:11 perf_event_max_sample_rate -rw-r--r-- 1 root root 0 Jun 6 19:11 perf_event_mlock_kb -rw-r--r-- 1 root root 0 Jun 6 19:11 perf_event_paranoid -rw-r--r-- 1 root root 0 Jun 6 19:11 pid_max -rw-r--r-- 1 root root 0 Jun 6 19:11 poweroff_cmd -rw-r--r-- 1 root root 0 Jun 6 19:11 print-fatal-signals -rw-r--r-- 1 root root 0 Jun 6 19:11 printk -rw-r--r-- 1 root root 0 Jun 6 19:11 printk_delay -rw-r--r-- 1 root root 0 Jun 6 19:11 printk_ratelimit -rw-r--r-- 1 root root 0 Jun 6 19:11 printk_ratelimit_burst dr-xr-xr-x 0 root root 0 Jun 6 19:11 pty dr-xr-xr-x 0 root root 0 Jun 6 19:11 random -rw-r--r-- 1 root root 0 Jun 6 19:11 randomize_va_space -rw-r--r-- 1 root root 0 Jun 6 19:11 real-root-dev -rw-r--r-- 1 root root 0 Jun 6 19:11 sched_child_runs_first -rw-r--r-- 1 root root 0 Jun 6 19:11 sched_compat_yield dr-xr-xr-x 0 root root 0 Jun 6 19:11 sched_domain -rw-r--r-- 1 root root 0 Jun 6 19:11 sched_features -rw-r--r-- 1 root root 0 Jun 6 19:11 sched_latency_ns -rw-r--r-- 1 root root 0 Jun 6 19:11 sched_migration_cost -rw-r--r-- 1 root root 0 Jun 6 19:11 sched_min_granularity_ns -rw-r--r-- 1 root root 0 Jun 6 19:11 sched_nr_migrate -rw-r--r-- 1 root root 0 Jun 6 19:11 sched_rt_period_us -rw-r--r-- 1 root root 0 Jun 6 19:11 sched_rt_runtime_us -rw-r--r-- 1 root root 0 Jun 6 19:11 sched_shares_ratelimit -rw-r--r-- 1 root root 0 Jun 6 19:11 sched_shares_thresh -rw-r--r-- 1 root root 0 Jun 6 19:11 sched_time_avg -rw-r--r-- 1 root root 0 Jun 6 19:11 sched_wakeup_granularity_ns -rw-r--r-- 1 root root 0 Jun 6 18:28 sem -rw-r--r-- 1 root root 0 Jun 6 18:28 shmall -rw-r--r-- 1 root root 0 Jun 6 18:28 shmmax -rw-r--r-- 1 root root 0 Jun 6 18:28 shmmni dr-xr-xr-x 0 root root 0 Jun 6 19:11 slow-work -rw-r--r-- 1 root root 0 Jun 6 19:11 softlockup_panic -rw-r--r-- 1 root root 0 Jun 6 19:11 softlockup_thresh -rw-r--r-- 1 root root 0 Jun 6 18:28 sysrq -rw-r--r-- 1 root root 0 Jun 6 19:11 tainted -rw-r--r-- 1 root root 0 Jun 6 19:11 threads-max -rw-r--r-- 1 root root 0 Jun 6 19:11 timer_migration -rw-r--r-- 1 root root 0 Jun 6 19:11 unknown_nmi_panic -r--r--r-- 1 root root 0 Jun 6 19:11 version -rw-r--r-- 1 root root 0 Jun 6 19:11 vsyscall64



  
    假如我有个新硬件,偏偏我的系统不支持,要这样做:
      重新编译内核,并加入最新的硬件驱动程序源码;
      将该硬件的驱动程序编译成为模块,在启动时加载该模块。

 

 
内核:/boot/vmlinuz或/boot/vmlinuz-version;
     内核解压缩所需RAMDisk:/boot/initrd(/boot/initrd-version);

[root@server1 boot]# pwd
/boot

[root@server1 boot]# ll
总用量 23536
-rw-r--r--. 1 root root 105200 8月 1 2014 config-2.6.32-431.23.3.el6.x86_64
drwxr-xr-x. 3 root root 4096 8月 14 2014 efi
drwxr-xr-x. 2 root root 4096 8月 14 2014 grub
-rw-------. 1 root root 17125747 4月 10 21:24 initramfs-2.6.32-431.23.3.el6.x86_64.img
-rw-r--r--. 1 root root 193925 8月 1 2014 symvers-2.6.32-431.23.3.el6.x86_64.gz
-rw-r--r--. 1 root root 2519815 8月 1 2014 System.map-2.6.32-431.23.3.el6.x86_64
-rwxr-xr-x. 1 root root 4133040 8月 1 2014 vmlinuz-2.6.32-431.23.3.el6.x86_64

 

 

  下面我们着重讲一下内核模块
一、内核模块与依赖性
      基本上,内核模块放置处是在 /lib/modules/$(uname -r)/kernel当中,里面的几个目录主要为:
           arch 与硬件平台有关的选项
           crypto 内核所支持的加密的技术
           drivers 一些硬件的驱动程序
           fs 内核所支持的文件系统
           lib 一些函数库
           net 与网络有关的各项协议数据,还有防火墙模块等
           sound 与音效有关的各项模块
  还有文件/lib/modules/$(uname -r)/modules.dep ,记录了内核支持的模块的依赖性。那么如何创建该文件呢?如下:
#depmod [-Ane]
    -A:不加任何参数时,depmod会主动去分析目前内核的模块,并且重新写入/lib/modules/$(uname -r)/
           modules.dep当中。如果加-A参数,则会查找比modules.dep内还要新的模块,如果真找到,才会更新。
    -n:不写入modules.dep,而是将结果输出到屏幕上。
    -e:显示出目前已加载的不可执行的模块名称。
 
  例子:我做好一个网卡驱动程序a.ko(内核模块名以.ko结尾),该如何更新内核的依赖性?
     #cp a.ko /lib/modules/$(uname -r)/kernel/drivers/net
    #depmod
 
 
二、内核模块的查看
  查看目前模块加载了多少的模块。
 
[root@server1 ~]# lsmod
Module                  Size  Used by
xenfs                   5705  1 
microcode             112685  0 
xen_netfront           18969  0 
i2c_piix4              12608  0 
i2c_core               31084  1 i2c_piix4
ext4                  374405  1 
jbd2                   93427  1 ext4
mbcache                 8193  1 ext4
xen_blkfront           16108  2 
pata_acpi               3701  0 
ata_generic             3837  0 
ata_piix               24601  0 
dm_mirror              14384  0 
dm_region_hash         12085  1 dm_mirror
dm_log                  9930  2 dm_mirror,dm_region_hash
dm_mod                 84337  2 dm_mirror,dm_log

模块名称     模块的大小  此模块是否被其他模块使用

 

 
查阅每个模块信息
#modinfo [-adln] [module_name|filename]
  -a:仅列出作者名
  -d:仅列出该modules的说明
  -l:仅列出授权
  -n:仅列出该模块的详细路径

 

 
 
[root@server1 ~]# modinfo ext4
filename:       /lib/modules/2.6.32-431.23.3.el6.x86_64/kernel/fs/ext4/ext4.ko
license:        GPL
description:    Fourth Extended Filesystem
author:         Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
srcversion:     88E736686F4302B17E0DA05
depends:        mbcache,jbd2
vermagic:       2.6.32-431.23.3.el6.x86_64 SMP mod_unload modversions 
[root@server1 ~]# modinfo dm_log 
filename:       /lib/modules/2.6.32-431.23.3.el6.x86_64/kernel/drivers/md/dm-log.ko
license:        GPL
author:         Joe Thornber, Heinz Mauelshagen <dm-devel@redhat.com>
description:    device-mapper dirty region log
srcversion:     B0BB111AC7F0B71848484DF
depends:        dm-mod
vermagic:       2.6.32-431.23.3.el6.x86_64 SMP mod_unload modversions 

 

[root@localhost kernel]# modinfo e1000    
filename:       /lib/modules/2.6.32/kernel/drivers/net/e1000/e1000.ko
version:        7.3.21-k5-NAPI
license:        GPL
description:    Intel(R) PRO/1000 Network Driver
author:         Intel Corporation, <linux.nics@intel.com>
srcversion:     2B8A35B3369384355170615
alias:          pci:v00008086d000010B5sv*sd*bc*sc*i*
alias:          pci:v00008086d00001099sv*sd*bc*sc*i*
alias:          pci:v00008086d0000108Asv*sd*bc*sc*i*
alias:          pci:v00008086d0000107Csv*sd*bc*sc*i*
alias:          pci:v00008086d0000107Bsv*sd*bc*sc*i*
alias:          pci:v00008086d0000107Asv*sd*bc*sc*i*
alias:          pci:v00008086d00001079sv*sd*bc*sc*i*
alias:          pci:v00008086d00001078sv*sd*bc*sc*i*
alias:          pci:v00008086d00001077sv*sd*bc*sc*i*
alias:          pci:v00008086d00001076sv*sd*bc*sc*i*
alias:          pci:v00008086d00001075sv*sd*bc*sc*i*
alias:          pci:v00008086d00001028sv*sd*bc*sc*i*
alias:          pci:v00008086d00001027sv*sd*bc*sc*i*
alias:          pci:v00008086d00001026sv*sd*bc*sc*i*
alias:          pci:v00008086d0000101Esv*sd*bc*sc*i*
alias:          pci:v00008086d0000101Dsv*sd*bc*sc*i*
alias:          pci:v00008086d0000101Asv*sd*bc*sc*i*
alias:          pci:v00008086d00001019sv*sd*bc*sc*i*
alias:          pci:v00008086d00001018sv*sd*bc*sc*i*
alias:          pci:v00008086d00001017sv*sd*bc*sc*i*
alias:          pci:v00008086d00001016sv*sd*bc*sc*i*
alias:          pci:v00008086d00001015sv*sd*bc*sc*i*
alias:          pci:v00008086d00001014sv*sd*bc*sc*i*
alias:          pci:v00008086d00001013sv*sd*bc*sc*i*
alias:          pci:v00008086d00001012sv*sd*bc*sc*i*
alias:          pci:v00008086d00001011sv*sd*bc*sc*i*
alias:          pci:v00008086d00001010sv*sd*bc*sc*i*
alias:          pci:v00008086d0000100Fsv*sd*bc*sc*i*
alias:          pci:v00008086d0000100Esv*sd*bc*sc*i*
alias:          pci:v00008086d0000100Dsv*sd*bc*sc*i*
alias:          pci:v00008086d0000100Csv*sd*bc*sc*i*
alias:          pci:v00008086d00001009sv*sd*bc*sc*i*
alias:          pci:v00008086d00001008sv*sd*bc*sc*i*
alias:          pci:v00008086d00001004sv*sd*bc*sc*i*
alias:          pci:v00008086d00001001sv*sd*bc*sc*i*
alias:          pci:v00008086d00001000sv*sd*bc*sc*i*
depends:        
vermagic:       2.6.32 SMP mod_unload modversions 
parm:           TxDescriptors:Number of transmit descriptors (array of int)
parm:           RxDescriptors:Number of receive descriptors (array of int)
parm:           Speed:Speed setting (array of int)
parm:           Duplex:Duplex setting (array of int)
parm:           AutoNeg:Advertised auto-negotiation setting (array of int)
parm:           FlowControl:Flow Control setting (array of int)
parm:           XsumRX:Disable or enable Receive Checksum offload (array of int)
parm:           TxIntDelay:Transmit Interrupt Delay (array of int)
parm:           TxAbsIntDelay:Transmit Absolute Interrupt Delay (array of int)
parm:           RxIntDelay:Receive Interrupt Delay (array of int)
parm:           RxAbsIntDelay:Receive Absolute Interrupt Delay (array of int)
parm:           InterruptThrottleRate:Interrupt Throttling Rate (array of int)
parm:           SmartPowerDownEnable:Enable PHY smart power down (array of int)
parm:           KumeranLockLoss:Enable Kumeran lock loss workaround (array of int)
parm:           copybreak:Maximum size of packet that is copied to a new buffer on receive (uint)
parm:           debug:Debug level (0=none,...,16=all) (int)
[root@localhost kernel]# modinfo -p e1000 
debug:Debug level (0=none,...,16=all)
copybreak:Maximum size of packet that is copied to a new buffer on receive
KumeranLockLoss:Enable Kumeran lock loss workaround
SmartPowerDownEnable:Enable PHY smart power down
InterruptThrottleRate:Interrupt Throttling Rate
RxAbsIntDelay:Receive Absolute Interrupt Delay
RxIntDelay:Receive Interrupt Delay
TxAbsIntDelay:Transmit Absolute Interrupt Delay
TxIntDelay:Transmit Interrupt Delay
XsumRX:Disable or enable Receive Checksum offload
FlowControl:Flow Control setting
AutoNeg:Advertised auto-negotiation setting
Duplex:Duplex setting
Speed:Speed setting
RxDescriptors:Number of receive descriptors
TxDescriptors:Number of transmit descriptors

 

e1000模块参数设置:

[root@localhost e1000]# ll
total 0
drwxr-xr-x 2 root root    0 Jun  6 19:34 drivers
drwxr-xr-x 2 root root    0 Jun  6 19:34 holders
-r--r--r-- 1 root root 4096 Jun  6 19:34 initstate
drwxr-xr-x 2 root root    0 Jun  6 19:34 parameters
-r--r--r-- 1 root root 4096 Jun  6 19:34 refcnt
drwxr-xr-x 2 root root    0 Jun  6 19:34 sections
-r--r--r-- 1 root root 4096 Jun  6 19:34 srcversion
-r--r--r-- 1 root root 4096 Jun  6 19:34 version
[root@localhost e1000]# cd parameters
[root@localhost parameters]# ll
total 0
-rw-r--r-- 1 root root 4096 Jun  6 19:35 copybreak
[root@localhost parameters]# pwd
/sys/module/e1000/parameters

scsi_mod:模拟参数设置


[root@server1 module]# pwd
/sys/module [root@server1 module]# cd scsi_mod [root@server1 scsi_mod]# ll 总用量 0 drwxr-xr-x 2 root root 0 6月 7 10:41 parameters [root@server1 scsi_mod]# cd parameters [root@server1 parameters]# ll 总用量 0 -rw-r--r-- 1 root root 4096 6月 7 10:41 default_dev_flags -rw-r--r-- 1 root root 4096 6月 7 10:41 eh_deadline -rw-r--r-- 1 root root 4096 6月 7 10:41 inq_timeout -rw-r--r-- 1 root root 4096 6月 7 10:41 max_luns -rw-r--r-- 1 root root 4096 6月 7 10:41 max_report_luns -r--r--r-- 1 root root 4096 6月 7 10:41 scan -rw-r--r-- 1 root root 4096 6月 7 10:41 scsi_logging_level

 

 
 
 
三、内核模块的加载与删除
  最好使用modprobe这个命令加载模块,因为modprobe会主动查找modules.dep的内容,解决了依赖性后,才决定需要加载的模块有哪些。
  insmod则完全由用户自行加载一个完整文件名的模块,并不会主动分析模块依赖性。
#insmod [/full/path/module_name] [parameters]
 
  例子:尝试载入cifs.ko这个文件系统模块
#insmod /lib/modules/$(uname -r)/kernel/fs/cifs/cifs.ko
  记住,一定要是完整的文件名。
 
#rmmod [-fw] module_name
  -f:强制将该模块删除掉,不论是否正在被使用
  -w:若该模块正在被使用,则等待该模块被使用完毕后再删除
 
  insmod与rmmod的问题时,你必须自行找到模块的完整文件名才行。所以,我们一般使用modprobe.
#modprobe [-lcfr] module_name
  -c:列出目前系统上面所有的模块
  -l:列出目前在/lib/modules/`uname -r`/kernel当中的所有模块完整文件名
  -f:强制加载该模块
  -r:删除某个模块
[root@localhost kernel]# modprobe -l
/lib/modules/2.6.32/kernel/net/ipv6/xfrm6_tunnel.ko
/lib/modules/2.6.32/kernel/net/xfrm/xfrm_ipcomp.ko
/lib/modules/2.6.32/kernel/drivers/net/pcmcia/xirc2ps_cs.ko
/lib/modules/2.6.32/kernel/drivers/net/tulip/xircom_cb.ko
/lib/modules/2.6.32/kernel/crypto/xor.ko
/lib/modules/2.6.32/kernel/net/sunrpc/xprtrdma/xprtrdma.ko
/lib/modules/2.6.32/kernel/net/netfilter/xt_CLASSIFY.ko
/lib/modules/2.6.32/kernel/net/netfilter/xt_HL.ko

...



[root@server1 /]# modprobe -l kernel/net/rds/rds.ko kernel/net/rds/rds_rdma.ko kernel/net/rds/rds_tcp.ko kernel/net/mac80211/mac80211.ko kernel/net/rfkill/rfkill.ko kernel/net/9p/9pnet.ko kernel/net/9p/9pnet_virtio.ko kernel/net/9p/9pnet_rdma.ko kernel/net/wimax/wimax.ko kernel/net/openvswitch/openvswitch.k ...
[root@server1 /]# cd /lib/modules/`uname -r`/kernel
[root@server1 kernel]# ll
总用量 36
drwxr-xr-x.  3 root root 4096 8月  14 2014 arch
drwxr-xr-x.  3 root root 4096 8月  14 2014 crypto
drwxr-xr-x. 61 root root 4096 8月  14 2014 drivers
drwxr-xr-x. 30 root root 4096 8月  14 2014 fs
drwxr-xr-x.  3 root root 4096 8月  14 2014 kernel
drwxr-xr-x.  6 root root 4096 8月  14 2014 lib
drwxr-xr-x.  2 root root 4096 8月  14 2014 mm
drwxr-xr-x. 28 root root 4096 8月  14 2014 net
drwxr-xr-x.  9 root root 4096 8月  14 2014 sound
[root@server1 kernel]# pwd
/lib/modules/2.6.32-431.23.3.el6.x86_64/kernel
[root@server1 kernel]# cd  net
[root@server1 net]# ll
总用量 104
drwxr-xr-x. 2 root root 4096 8月  14 2014 802
drwxr-xr-x. 2 root root 4096 8月  14 2014 8021q
drwxr-xr-x. 2 root root 4096 8月  14 2014 9p
drwxr-xr-x. 2 root root 4096 8月  14 2014 atm
drwxr-xr-x. 6 root root 4096 8月  14 2014 bluetooth
drwxr-xr-x. 3 root root 4096 8月  14 2014 bridge
drwxr-xr-x. 2 root root 4096 8月  14 2014 can
drwxr-xr-x. 2 root root 4096 8月  14 2014 core
drwxr-xr-x. 2 root root 4096 8月  14 2014 dccp
drwxr-xr-x. 2 root root 4096 8月  14 2014 ieee802154
drwxr-xr-x. 3 root root 4096 8月  14 2014 ipv4
drwxr-xr-x. 3 root root 4096 8月  14 2014 ipv6
drwxr-xr-x. 2 root root 4096 8月  14 2014 key
drwxr-xr-x. 2 root root 4096 8月  14 2014 llc
drwxr-xr-x. 2 root root 4096 8月  14 2014 mac80211
drwxr-xr-x. 4 root root 4096 8月  14 2014 netfilter
drwxr-xr-x. 2 root root 4096 8月  14 2014 openvswitch
drwxr-xr-x. 2 root root 4096 8月  14 2014 phonet
drwxr-xr-x. 2 root root 4096 8月  14 2014 rds
drwxr-xr-x. 2 root root 4096 8月  14 2014 rfkill
drwxr-xr-x. 2 root root 4096 8月  14 2014 sched
drwxr-xr-x. 2 root root 4096 8月  14 2014 sctp
drwxr-xr-x. 4 root root 4096 8月  14 2014 sunrpc
drwxr-xr-x. 2 root root 4096 8月  14 2014 wimax
drwxr-xr-x. 2 root root 4096 8月  14 2014 wireless
drwxr-xr-x. 2 root root 4096 8月  14 2014 xfrm
[root@server1 net]# cd rds
[root@server1 rds]# ll
总用量 296
-rwxr--r--. 1 root root 111448 8月   1 2014 rds.ko
-rwxr--r--. 1 root root 156304 8月   1 2014 rds_rdma.ko
-rwxr--r--. 1 root root  28168 8月   1 2014 rds_tcp.ko

 

 
  例子:加载cifs模块
   #modprobe cifs
  很方便,因为我们根本不用知道完整的模块文件名
 
内核模块的额外参数配置:/etc/modprobe.conf
  如果你想修改某些模块的额外参数设置,就在这个文件内。
  #vi /etc/modprobe.conf
 
posted @ 2016-06-07 10:22  zengkefu  阅读(2208)  评论(0编辑  收藏  举报