About Kernel Modules
The boot loader loads the kernel into memory. You can add new code to the kernel by including the source files in the kernel source tree and recompiling the kernel. Kernel modules provide device drivers that enable the kernel to access new hardware, support different file system types, and extend its functionality in other ways. The modules can be dynamically loaded and unloaded on demand. To avoid wasting memory on unused device drivers, Oracle Linux supports loadable kernel modules (LKMs), which enable a system to run with only the device drivers and kernel code that are required to be loaded into memory. See Managing Kernel Modules to see more information on how to manage kernel modules on Oracle Linux.
Note:
From UEK R7 onward, kernel packaging changes are applied to provide a more streamlined
kernel. Kernel modules that are required for most server configurations are provided in the
kernel-uek-modules
package, while optional kernel modules for hardware
less often found in server configurations, such as Bluetooth, Wi-Fi, and video capture
cards, can be found in the kernel-uek-modules-extra
package. Note that both
of these packages require the linux-firmware
package to be installed.
You can view the contents of these packages by running:
dnf repoquery -l kernel-uek-modules
dnf repoquery -l kernel-uek-modules-extra
sudo dnf install -y kernel-uek-modules kernel-uek-modules-extra linux-firmware
See Unbreakable Enterprise Kernel Release 7: Release Notes (5.15.0-0.30).
Kernel modules can be signed to protect the system from running malicious code at boot time. When UEFI Secure Boot is enabled, only kernel modules that contain the correct signature information can be loaded. See Oracle Linux: Working With UEFI Secure Boot for more information.
About Weak Update Modules
External modules, such as drivers that are installed by using a driver update disk or that
are installed from an independent package, are typically installed in the
/lib/modules/kernel-version/extra
directory. Modules
that are stored in this directory are preferred over any matching modules that are
included with the kernel when these modules are being loaded. Installed external drivers and
modules can override existing kernel modules to resolve hardware issues. For each kernel
update, these external modules must be made available to each compatible kernel so that
potential boot issues resulting from driver incompatibilities with the affected hardware can
be avoided.
Because the requirement to load the external module with each compatible kernel update is system critical, a mechanism exists for external modules to be loaded as weak update modules for compatible kernels.
You make weak update modules 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 that are
installed in the /lib/modules/kernel-version/extra
directories for any compatible kernels.
For example, if a newer kernel is compatible with a module that was installed for the
previous kernel, an external module (such as kmod-kvdo
) is automatically
added as a symbolic link in the weak-updates
directory as part of the
installation process, as shown in the following command output:
ls -l /lib/modules/5.15.0-208.159.3.2.el8.x86_64/weak-updates/kmod-kvdo/uds
lrwxrwxrwx. 1 root root 68 Jul 8 07:57 uds.ko ->
/lib/modules/5.15.0-208.159.3.2.el8.x86_64/extra/kmod-kvdo/uds/uds.ko
ls -l /lib/modules/5.15.0-208.159.3.2.el8.x86_64/weak-updates/kmod-kvdo/vdo
lrwxrwxrwx. 1 root root 68 Jul 8 07:57 uds.ko ->
/lib/modules/5.15.0-208.159.3.2.el8.x86_64/extra/kmod-kvdo/uds/uds.ko
The symbolic link enables the external module to load for kernel updates.
Weak updates are beneficial and ensure that no extra work is required to carry an external module through kernel updates. Any potential driver-related boot issues after kernel upgrades are prevented, so this approach provides a more predictable running of a system and its hardware.
You can remove weak update modules if a kernel version provides a superior or preferred driver or module version. See Removing Weak Update Modules for more information.
For more information about external driver modules and driver update disks, see Oracle Linux 8: Installing Oracle Linux.