Posted on behalf of Paniraja KM from Dell's Enterprise Linux Engineering Team
Dell distributes driver update RPMs for Red Hat Enterprise Linux v5 and Suse Linux Enterprise Server 10 service packs packaged as Dynamic Kernel Module Support (
DKMS) packages. DKMS RPM help users manage the driver updates seamlessly on their systems.
DKMS driver modules by default, get installed in the "
/lib/modules/<Kernel version>/extra" directory. The kernel modules installed in "extra" directory will be loaded before the "
built-in" modules in the
"/lib/modules/<kernel_version>/kernel" directory, based on the search order policy defined in
"/etc/depmod.d/depmod.conf.dist" file file (see the depmod man page for details).
Kernel Upgrade scenarios:
When we (or standard distro change management tools) upgrade the kernel on a system (like in the case of an bug-fix/security errata), where DKMS driver updates are already installed, a sym-link of all the kernel modules from
old kernel's "extra" directory to the
new kernel "
weak-updates" directory will be created (this is assuming that the new kernel satisfies the symbol dependencies of the driver). This ensures that all the installed DKMS driver updates are available to the newly installed kernel.
But the DKMS update modules placed in "
weak-updates" directory of a new kernel will have a lower loading precedence compared to the "built-in" modules, because of the default search order. This might result in the native version of the driver being preferred and loaded over the DKMS version. In the case of an errata kernel update, this might cause hardware to stop functioning (use of older native driver) or bugs to surface (that have already been addressed in the updated driver).
It is possible to override the default depmod search policy that will ensure that DKMS modules for new kernel are preferred over the native version, by over-riding the defaults for the specific driver/s in question:
- Create a file "<dkms_module_name>.conf " in /etc/depmod.d/ directory
- Add "override <module_name> <kernel_version> <modules_directory>"
- Repeat this for each DKMS driver module that is installed on the system
- Run "depmod –a" command to update the rules
For example, to override the rules for bnx2 driver, create a file called bnx2.conf in /etc.depmod.d/ with the below contents:
- override bnx2 <Upgrade_Kernel_Version> weak-updates
This would ensure that the DKMS driver module would be preferred over the native version.