转到正文

冷博客

见的人多了,我就更喜欢狗——罗曼·罗兰

存档

标签: modprobe.conf

这篇挺水的,老鸟略过吧

一、用命令自动添加模块

这个很简答,分为三步。

1.查看模块是否已经存在当前内核中

这里以ipip.ko这个模块为例,一般都没有被编译进去

#lsmod | grep ipip

如果没有的话,查看本地lib中是否有这个模块

#modprobe –l | grep ipip
/lib/modules/2.6.18-194.el5/kernel/net/ipv4/ipip.ko

或者手动查看/lib/modules/$(unmae -r)/kernel/

继续阅读

今天看到/etc/modprobe.conf文件中有如下内容:

alias eth0 pcnet32

其中alias啥意思,不太明白,查之,原来是给设备做备注的。开始也忘了查man,后来才知道啥意思,再查man,解释得很详细。

alias wildcard modulename
          This  allows  you  to  give  alternate  names  for  a  module.   For  example:  "alias  my-mod really_long_modulename"  means  you  can  use   "modprobe   my-mod"   instead   of   "modprobe really_long_modulename".    You   can  also  use  shell-style  wildcards,  so  "alias  my-mod* really_long_modulename" means that "modprobe my-mod-something" has the same effect.  You can’t have  aliases  to  other  aliases (that way lies madness), but aliases can have options, which will be added to any other options.

          Note that modules can also contain their own aliases, which you can see using modinfo.   These aliases  are  used as a last resort (ie. if there is no real module, install, remove, or alias command in the configuration).

继续阅读