LinuxSir.cn,穿越时空的Linuxsir!

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

如何让一些内核模块不要在启动的时候加载

[复制链接]
发表于 2006-9-11 23:00:31 | 显示全部楼层 |阅读模式
发现内核加载了一大堆的模块,而且很多模块都被使用
有什么办法可以让这些模块不被自动的加载?
随便问一下,debian是通过哪种方式加载内核模块?kernel module loader,kerneld还是脚本一次性全部加载?
谢谢
发表于 2006-9-11 23:14:29 | 显示全部楼层
Post by icoming
发现内核加载了一大堆的模块,而且很多模块都被使用
有什么办法可以让这些模块不被自动的加载?
随便问一下,debian是通过哪种方式加载内核模块?kernel module loader,kerneld还是脚本一次性全部加载?
谢谢

编辑 /etc/modules
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-11 23:40:03 | 显示全部楼层
Post by bbmd
编辑 /etc/modules

这个文件并没有列出所有的模块。
我的系统中加载的模块比这个文件中列出来的模块多得多
回复 支持 反对

使用道具 举报

发表于 2006-9-12 00:00:27 | 显示全部楼层
Post by bbmd
编辑 /etc/modules


如果是gentoo模块就在这里面了

我也想知道debian是怎样加载的
回复 支持 反对

使用道具 举报

发表于 2006-9-12 04:20:28 | 显示全部楼层
把不要加载的模块写入/etc/modprobe.d/blacklist
回复 支持 反对

使用道具 举报

发表于 2006-9-12 07:38:43 | 显示全部楼层
Post by faxian
把不要加载的模块写入/etc/modprobe.d/blacklist

我还没有在debian下编译过内核
请问Debian的内核模块是放在哪里的,这样我才知道有哪些模块
回复 支持 反对

使用道具 举报

发表于 2006-9-12 07:45:55 | 显示全部楼层
You may locate them in /lib/modules/<your-kernel-version>
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-12 13:17:39 | 显示全部楼层
但是debian是怎么加载模块的呢?
是不是用kernel module loader加载的?
也没有看到有kerneld进程阿
回复 支持 反对

使用道具 举报

发表于 2006-9-12 13:26:55 | 显示全部楼层
重新编译内核,把不用的模块都去掉
PS:我一般是在 /etc/modules 文件中加载需要的模块,在 /etc/modprobe.d/blacklist 文件中去掉不需要的模块。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-12 15:04:38 | 显示全部楼层
在编译内核的时候总是会把自己不认识的功能编译成模块的,因为自己也不知道会不会用到。
现在看了一下居然有这么多的模块。Used by显示为0的模块是不是都可以加到/etc/modprobe.d/blacklist中去阿?
zhengda@debian:~$ lsmod
Module                  Size  Used by
ipt_TCPMSS              4608  1
xt_tcpmss               2560  1
xt_tcpudp               3712  1
pppoe                  13760  2
pppox                   4104  1 pppoe
snd_pcm_oss            43168  0
vmnet                  32556  13
vmmon                 182412  0
snd_mixer_oss          19328  3 snd_pcm_oss
ipv6                  259552  12
af_packet              22280  4
joydev                 10048  0
parport_pc             36420  0
parport                37960  1 parport_pc
floppy                 60804  0
irda                  187580  0
pcspkr                  3200  0
8139cp                 22656  0
8250_pci               21120  0
8250                   24276  1 8250_pci
serial_core            22144  1 8250
snd_intel8x0           34076  2
snd_ac97_codec         94752  1 snd_intel8x0
snd_ac97_bus            2432  1 snd_ac97_codec
snd_pcm                89352  3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec
snd_timer              24836  1 snd_pcm
snd                    53988  6 snd_pcm_oss,snd_mixer_oss,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
soundcore              10464  3 snd
snd_page_alloc         10632  2 snd_intel8x0,snd_pcm
generic                 4740  0 [permanent]
shpchp                 41496  0
pci_hotplug            14852  1 shpchp
sd_mod                 20112  0
intel_agp              23324  1
agpgart                35504  1 intel_agp
ehci_hcd               31496  0
usbhid                 40928  0
usb_storage            68032  0
eth1394                20100  0
uhci_hcd               23436  0
usbcore               132480  5 ehci_hcd,usbhid,usb_storage,uhci_hcd
piix                   10884  0 [permanent]
8139too                26880  0
mii                     6016  2 8139cp,8139too
ohci1394               36016  0
ntfs                  230292  1
nls_cp936             126720  3
nls_cp437               6016  2
vfat                   13312  2
fat                    53788  1 vfat
iptable_filter          3200  1
ip_tables              14552  1 iptable_filter
x_tables               14468  4 ipt_TCPMSS,xt_tcpmss,xt_tcpudp,ip_tables
fbcon                  42016  0
tileblit                2816  1 fbcon
crc32                   4480  3 8139cp,8139too,fbcon
font                    8448  1 fbcon
bitblit                 6272  1 fbcon
softcursor              2432  1 bitblit
sha1                    2688  0
arc4                    2176  0
ppp_mppe                7556  0
ppp_async              11264  0
ppp_generic            25364  8 pppoe,pppox,ppp_mppe,ppp_async
slhc                    7168  1 ppp_generic
crc_ccitt               2304  2 irda,ppp_async
sr_mod                 17316  0
sbp2                   24968  0
scsi_mod              144904  4 sd_mod,usb_storage,sr_mod,sbp2
ieee1394              312632  3 eth1394,ohci1394,sbp2
ide_cd                 42884  0
cdrom                  42656  2 sr_mod,ide_cd
rtc                    13748  0
unix                   28080  158
回复 支持 反对

使用道具 举报

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

本版积分规则

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