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?


  • I can see additional new modules can be loaded by putting in this folder: /etc/sysconfig/modules/ .... But I am interested in knowing about Existing modules compiled in the kernel – kumar Dec 11 '13 at 10:28

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.

  • 1
    This is the correct answer. To add to it, the module database is at /lib/modules/$(uname -r)/modules.pcimap and is built by the depmod tool. When modprobe runs it reads the pcimap from the bottom up and loads the first driver it finds which matches the PCI ID which the device registered with. This is also how a third-party driver gets precedence over an in-kernel driver. – suprjami Dec 11 '13 at 12:44

During boot an initrd, an initial RAM disk is loaded whose contents are then available for the second stage boot. See /boot.

That RAM disk typically contains a.o. kernel modules not statically compiled into the kernel and needed for system boot i.e. modular drivers for file system , RAID controllers and network.

man initrd has a much better explanation though.

  • 1
    Actually it's quite rare that network drivers would be in the initrd, at least on an EL/Fedora system. The initrd/initramfs typically only contains the bare minimum needed to get the root filesystem mounted so that init can hand over the boot process from the in-memory filesystem to the on-disk filesystem. – suprjami Dec 11 '13 at 12:46

The first thing you need check is your kernel config file, if your module are builting in your kernel, for example my redhat 5 server

grep -i e1000 /boot/config-$(uname -r) | grep -v ^#

when you insert a e1000 network card, the kernel call modprobe program "kernel.modprobe = /sbin/modprobe" using kernel user mode api

If your module is builting, you can use the modprobe.conf for change the module parameters with options directive, unless the kernel load the module with module defaults parameters

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.