Why is a third-party driver module used over the in-kernel driver module?

Solution Unverified - Updated -

Environment

  • Red Hat Enterprise Linux
  • Third-party kernel module previously in-use

Issue

  • We previously had a third-party kernel module installed. We have removed the third-party driver RPM, and modified /etc/modprobe.conf to alias the in-kernel driver, however the third-party driver was still loaded on reboot.
  • We found third-party module files in /lib/modules/<kernel-version>/extra/ and /lib/modules/<kernel-version>/weak-updates/. We found we had to delete the third-party module files for the in-kernel driver to load.
  • Why is a third-party driver module used over the in-kernel driver module?

Resolution

  • The third-party module could have been built into the initrd, in which case it would have been loaded before the kernel started reading files from the rest of the filesystem.

    If you wish to inspect the contents of your initrd, you are able to uncompress it by following instructions located at
    https://access.redhat.com/knowledge/solutions/24029

  • The third-party module could have been given priority over the in-kernel module in the /lib/modules/<kernel-version>/modules.alias file.

    This file is generated by the depmod command, and is read by modprobe when it loads a driver module for a PCI device. Modules are loaded by their PCI id, in reverse order, so an entry lower in the file is given precedence over an entry higher in the file.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments