如何让系统启动时不要加载某些硬件的驱动,如声卡驱动(我是做服务器哦)
是不是要重新编译内核,除此之外有没有其他优雅点的办法?
debian:/sys/devices# lsmod
Module Size Used by
nls_utf8 1760 1
cifs 208948 1
nls_base 6820 2 nls_utf8,cifs
nfsd 186928 1
lockd 54568 1 nfsd
nfs_acl 2912 1 nfsd
auth_rpcgss 33952 1 nfsd
sunrpc 162528 4 nfsd,lockd,nfs_acl,auth_rpcgss
exportfs 3936 1 nfsd
ipv6 235396 12
loop 12748 0
evdev 8000 0
snd_mpu401 6152 0
snd_cs4232 11380 0
snd_opl3_lib 9344 1 snd_cs4232
snd_hwdep 6212 1 snd_opl3_lib
snd_cs4231_lib 20512 1 snd_cs4232
ns558 3712 0
snd_mpu401_uart 6368 2 snd_mpu401,snd_cs4232
gameport 10700 2 ns558
snd_rawmidi 18496 1 snd_mpu401_uart
snd_seq_device 6380 2 snd_opl3_lib,snd_rawmidi
parport_pc 22500 0
parport 30988 1 parport_pc
snd_intel8x0 26268 0
snd_ac97_codec 88452 1 snd_intel8x0
ac97_bus 1728 1 snd_ac97_codec
snd_pcm 62660 3 snd_cs4231_lib,snd_intel8x0,snd_ac97_codec
i2c_i801 7920 0
snd_timer 17800 3 snd_opl3_lib,snd_cs4231_lib,snd_pcm
i2c_core 19828 1 i2c_i801
pcspkr 2432 0
shpchp 25528 0
pci_hotplug 23460 1 shpchp
snd 45636 12 snd_mpu401,snd_cs4232,snd_opl3_lib,snd_hwdep,snd_cs4231_lib,snd_mpu401_uart,snd_rawmidi,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
soundcore 6368 1 snd
snd_page_alloc 7816 3 snd_cs4231_lib,snd_intel8x0,snd_pcm
rng_core 3940 0
button 6096 0
intel_agp 22524 1
agpgart 28808 1 intel_agp
ext3 105576 2
jbd 39476 1 ext3
mbcache 7108 1 ext3
ide_disk 10496 4
ide_pci_generic 3908 0 [permanent]
piix 6568 0 [permanent]
ide_core 96168 3 ide_disk,ide_pci_generic,piix
ata_generic 4676 0
8139too 20384 0
8139cp 16800 0
mii 4896 2 8139too,8139cp
libata 140448 1 ata_generic
scsi_mod 129548 1 libata
dock 8304 1 libata
thermal 15228 0
processor 32576 1 thermal
fan 4196 0
thermal_sys 10856 3 thermal,processor,fan
debian:/sys/devices/system# lspci
00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 03)
00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 82)
00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC‘97 Audio Controller (rev 02)
01:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
如果有可能USB驱动也是不要的?
重新编译内核,但是lsmod加载的不是模块吗??
将不必要的模块删除
假设网卡应该加载r8168的驱动,为什么加载了r8169的驱动??
驱动的加载应该是谁嗅探出来的??
有些系统根本就没有/etc/modules这个文件夹,更别提/etc/modprobe.conf文件啦!
原文地址:http://5228690.blog.51cto.com/5218690/1548083