LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1069|回复: 7

问个加载模块时参数的问题

[复制链接]
发表于 2006-3-14 15:20:52 | 显示全部楼层 |阅读模式
我只会用“modprobe 模块名 参数”的方式加载。
1 如何利用modprobe.conf自动加载?
2 如果把模块名写入rc.conf中该怎么指定参数?
3 如果将其编入内核,参数该怎么指定?

希望高手能不吝赐教。

我刚才把ibm_acpi编到内核里了,可是它没有加参数时不起作用,我该怎么办?不会再将其编为模块吧。
发表于 2006-3-14 18:27:35 | 显示全部楼层
1,添加到rc.conf里module

2,参数加在modprobe.conf中
  1. options modulename option...
  2.               This command allows you to add options to the module  modulename
  3.               (which  might  be  an  alias) every time it is inserted into the
  4.               kernel: whether directly (using modprobe modulename, or  because
  5.               the module being inserted depends on this module.
  6.               All options are added together: they can come from an option for
  7.               the module itself, for an alias, and on the command line.
复制代码
具体看man

3,不知道
回复 支持 反对

使用道具 举报

发表于 2006-3-15 14:55:40 | 显示全部楼层
用引号引起来,如同这种形式
MODULE=("模块名 参数")
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-15 19:57:24 | 显示全部楼层
Post by tx-cary
用引号引起来,如同这种形式
MODULE=("模块名 参数")


直接加在grub的内核引导参数后面吗?
回复 支持 反对

使用道具 举报

发表于 2006-3-16 08:19:33 | 显示全部楼层
是加在rc.conf中
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-16 21:10:41 | 显示全部楼层
那如果模块已经编入内核了呢?
回复 支持 反对

使用道具 举报

发表于 2006-3-16 21:21:27 | 显示全部楼层
编译进内核就不叫模块了吧。如果你想在内核初始化的时候就加载模块,可以配置mkinitrd.conf文件,将你想加载的模块添加进去。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-16 21:36:52 | 显示全部楼层
明白了。看来还得重新编译一遍内核,把ibm_acpi编译成模块。
谢谢fallen和tx-cary
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表