5.6 Weak Update Modules

External modules, such as drivers installed using a driver update disk, are usually installed into /lib/modules/kernel-version/extra. Modules stored in this directory are given preference over matching modules included with the kernel, itself, when you attempt to load them. This means that external drivers and modules can be installed to override kernel modules where hardware issues may need resolution. For each subsequent kernel update, it is important that the external module is made available to each compatible kernel to avoid potential boot issues resulting from driver incompatibilities with the affected hardware.

Since the requirement to load the external module with each compatible kernel update is system critical, a mechanism is in place so that external modules can be loaded as weak update modules for compatible kernels. Weak update modules are made available by creating symbolic links to compatible modules in the /lib/modules/kernel-version/weak-updates directory. The package manager handles this process automatically when it detects driver modules installed in any /lib/modules/kernel-version/extra directories for compatible kernels. For example, installation of the kmod-megaraid_sas-uek driver update package on the Driver Update Disk for the Oracle Linux 7 update 4 release may install:

/lib/modules/4.1.12-61.1.18.el7uek.x86_64/extra/megaraid_sas
/lib/modules/4.1.12-61.1.18.el7uek.x86_64/extra/megaraid_sas/megaraid_sas.ko

The new driver module is installed into the extra directory for the 4.1.12-61.1.18.el7uek.x86_64, which was the kernel version that was originally used to build the module.

A subsequent kernel update means that the system is now running the 4.1.12-112.14.13.el7uek.x86_64 version of the kernel. This kernel is compatible with the module installed for the previous kernel, so the external module is automatically added, as a symbolic link, in the weak-updates directory as part of the installation process:

# ls -l /lib/modules/4.1.12-112.14.13.el7uek.x86_64/weak-updates/megaraid_sas/*.ko
lrwxrwxrwx. 1 root root 76 Jan 30 04:52 /lib/modules/4.1.12-112.14.13.el7uek.x86_64\
    /weak-updates/megaraid_sas/megaraid_sas.ko \
     -> /lib/modules/4.1.12-61.1.18.el7uek.x86_64/extra/megaraid_sas/megaraid_sas.ko

This means that the external module is loaded for subsequent kernel updates.

In most cases, weak updates make sense and ensure that no extra work must be done to carry an external module through subsequent kernel updates. This prevents possible driver related boot issues after kernel upgrades and maintains the predictable running of a system and its hardware.

In some cases you may wish to remove weak update modules for a newer kernel. For instance, if an issue has been resolved for a driver that is shipped in the newer kernel and you would prefer to use this driver over the external module that you installed as part of a driver update.

You can remove weak update modules by removing the symbolic links for each kernel, manually. For example:

# rm -rf /lib/modules/4.1.12-112.14.13.el7uek.x86_64/weak-updates/megaraid_sas/

For more information about external driver modules and driver update disks, see Oracle Linux 7 Installation Guide at:

https://docs.oracle.com/cd/E52668_01/E54695/html/ol7-install-dud.html