LinuxSir.cn,穿越时空的Linuxsir!

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

怎么使模块开机不自动加载,帮忙看下,谢谢!

[复制链接]
发表于 2007-11-4 11:15:26 | 显示全部楼层 |阅读模式
debian下没有modprobe.conf文件,只有modprob.d文件,我想开机不加载一些模块,可是用modprobe -r xxx 或 rmmod xxx 或 modconf 选定不加载的模块,开机又自动加载了,我想 modconf应该可以管理开机不加载模块的阿,我的模块如下所示:
Module                  Size     Used by
reiserfs              200768   1
button                   8144    0
k8temp                  6080   0
i2c_nforce2            6976   0
i2c_core               19968   1 i2c_nforce2
psmouse               34768   0
evdev                      8896   0
sd_mod                 23872   9
ide_cd                 33504     0
cdrom                  31712    1 ide_cd
sata_nv                15940    8
ata_generic             6852   0
amd74xx                13916  0 [permanent]
libata                      97204  2 sata_nv,ata_generic
scsi_mod               87372   2 sd_mod,libata
generic                    6212    0 [permanent]
forcedeth               43080   0
ohci_hcd               19204    0
ide_core                96280    3 ide_cd,amd74xx,generic
ehci_hcd               27020    0
thermal                14620    0
processor              30056    1 thermal
fan                         5700    0


想问一下 Used那一行 为0的是否说没有被用到,所以没用了,就象 模块cdrom和ide_cd那样,used为0,并且我不用 光驱,应该怎么设置开机不自动加载了,modconf删除了,但是开机又加载了,谢谢帮忙
发表于 2007-11-4 17:02:10 | 显示全部楼层
http://theos.in/category/desktop-linux/tip-that-matters/page/2/



Under Debian Linux ( and most other distros) startup files are stored in /etc/init.d/ directory and symbolic linked between /etc/rcX.d/ directory exists. Debian Linux (Red Hat/ Fedora) uses System V initialization scripts to start services at boot time from /etc/rcX.d/ directory. Debian Linux comes with different utilities to remove unwanted startup file:

(A) rcconf
It is a console based interactive utility that allows you to control which services are started when the system boots up or reboots. It displays a menu of all the services which could be started at boot. The ones that are configured to do so are marked and you can toggle individual services on and off. To start rconf, login as root user and type rcconf
# rcconf


Debian rcconf - a console based utility to control startup services

Select the service you would like to enable or disable.

(B) sysv-rc-conf is yet another tool for for SysV like init script links under Debian Linux. To start sysv-rc-conf, login as root user and type sysv-rc-conf:
# sysv-rc-conf


Debian sysv-rc-conf - a console based advanced utility to control startup services

Select the service you would like to enable or disable.

Both sysv-rc-conf and rcconf are best tools to use on Remote Debian Linux or when GUI is not available, they are just like ntsysv command under Red Hat Linux.

(C) You can also use update-rc.d script as follows (update-rc.d removes any links in the /etc/rcX.d directories to the script /etc/init.d/service):
# update-rc.d -f {SERVICE-NAME} remove

For example to stop xinetd service at boot time, type the command as follows:
# update-rc.d -f xinetd remove
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-4 20:31:52 | 显示全部楼层
谢谢,但是这个不是管理模块啊
回复 支持 反对

使用道具 举报

发表于 2007-11-5 10:44:51 | 显示全部楼层
/etc/modprobe.d/blacklist

我没有实际用过, 因为我的内核都是自己重新编译过的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-5 15:36:57 | 显示全部楼层
内核我也是从新编译过的 但是现在的问题是 你要是重新编译个显卡模块 那不是要把以前的删除阿

还有就是 现在我暂时不用 声音 我觉得没有必要加载这些模块 但是编译内核的时候选
回复 支持 反对

使用道具 举报

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

本版积分规则

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