How (linux kernel) network modules gets loaded without modprobe.conf

fedorakernel-modulesstartup-scripts

how (linux kernel) network modules gets loaded without modprobe.conf
I have fedora distribution installed and can see e1000e module loaded automatically in the system.

Is there a configuration which specifies to load this module automatically ??

I have referred modprobe.conf, BUT no such entry exists. for that matter, I have grep'd entire /etc/ directory to check any entry to load this module, but no avail.

Please let me know
1. whether any configuration file mention about loaded specific modules automatically during bootup time ?
2. If there is not config file, how the modules are picked up by the system?

Thanks!

Best Answer

They are loaded based on hardware detection. In the case of your e1000e module the hardware in your machine, whether it is on board or a plugin card, will identify itself with a PCI vendor ID and device ID pair and those will be matched against the available modules and any module identifying itself with that ID will be loaded.

You can see the IDs associated with the e1000e module by running modinfo e1000e which will report something like this:

filename:       /lib/modules/3.9.5-301.fc19.x86_64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko
version:        2.2.14-k
license:        GPL
description:    Intel(R) PRO/1000 Network Driver
author:         Intel Corporation, <linux.nics@intel.com>
srcversion:     28B371A0E50A24E26204016
alias:          pci:v00008086d00001559sv*sd*bc*sc*i*
alias:          pci:v00008086d0000155Asv*sd*bc*sc*i*
alias:          pci:v00008086d0000153Bsv*sd*bc*sc*i*
alias:          pci:v00008086d0000153Asv*sd*bc*sc*i*
...

Only with a much long list of alias lines, each of which identifies a specific PCI device that the module is able to support.

As devices appear the linux kernel will announce them to userspace using uevents, and the udev daemon will match the device IDs against the module database and load the correct modules.