How to prevent certain hardware drivers from being loaded during system startup

Source: Internet
Author: User
Tags nfsd

How to make the system do not load certain hardware drivers, such as sound card drivers (I am a server)
Is there any other elegant way to re-compile the kernel?

Debian:/sys/devices # lsmod
Module size used
Nls_utf8 1760 1
CIFS 208948 1
Nls_base 6820 2 nls_utf8, CIFS
NFSD 186928 1
Lock 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
Partport 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_i80 1 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_hotplug23460 1 shpchp
SND 45636 12 snd_mpu401, snd_cs4232, small, snd_hwdep, snd_cs4231_lib, snd_mpu401_uart, snd_rawmidi, snd_seq_device, large, small, 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
Mbcached 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
Docker 8304 1 libata
Thermal0 15228
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)
0:04. 0 Ethernet controller: RealTek semiconduco., Ltd. RTL-8139/8139c/8139c + (Rev 10)


If there is a possibility that the USB driver is not required?

  1. Re-compile the kernel, but isn't lsmod loaded a module ??

  2. Delete unnecessary modules

  3. Suppose the NIC should be loaded with the r8168 driver. Why is the r8169 driver loaded ??

    Who sniffed out driver loading ??

  4. Some systems do not have the/etc/modules folder, let alone the/etc/modprobe. conf file!

How to prevent certain hardware drivers from being loaded during system startup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.