Kernel modules, drivers and firmware
Quick answer
A driver manages a device or subsystem; a kernel module is a loadable unit of kernel code. Firmware is code or data used by a device or platform.
A driver can be built into the kernel instead of appearing as a loaded module. Firmware may still be required by the device. Absence from the loaded-module list therefore does not prove missing driver support; correlate device binding and kernel messages.
Prepare the practice environment
Run python3 lab-fixtures/kernel/setup.py from the extracted root as an ordinary user. Enter the printed fresh private path and check pwd. Use fresh fixtures, Bash with set -e -o pipefail, LC_ALL=C and umask 077. Run each snippet in a separate Bash process, not your interactive shell. Only private files are used; optional examples require an authorized snapshot VM. Do not write kernel attributes, load modules, or change boot settings. Supplied records are fictional; read only the selected non-sensitive live fields. Review the lab guide.
Prerequisites
Review: Kernel synchronization and RCU.
How it works
A driver may be built into the kernel or delivered as a module. Modules run with kernel privileges, so compatibility, provenance, signatures and distribution policy matter. Firmware may be stored on a device or requested by a driver from userspace. udev processes device events and manages device-node properties in userspace; it is not the driver. lsmod formats the loaded module list from procfs; built-in drivers are not listed as loaded modules. modinfo inspects available module metadata, not proof of loading or compatibility. A container may see neither the module tree nor /proc/modules. Kernel internal APIs and build configurations evolve; use matching headers and distribution-supported builds in a snapshot VM only.
Try the examples
These fictional records illustrate fields; they are not real module files.
Expected stdout:
filename: demo_driver.kofirmware: demo/device.binOptional read-only inspection in a disposable VM exposing /proc/modules. The current container lacks it.
Manual example; not executed locally. Follow its stated environment restrictions.
Optional VM with matching module tree and an available loop module; built-in configurations may not provide this field. No module is loaded.
Manual example; not executed locally. Follow its stated environment restrictions.
Common mistakes
Never load an unknown module or use forced loading to resolve compatibility. Metadata alone is not a trust decision.
Practice
Classify the fictional driver and firmware records, then explain why an empty or unavailable module list cannot establish hardware support.
Related references
Study: lsmod, modinfo. These are reference names, not deployed links.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Kernel modules, drivers and firmware — Knowledge Check
Apply kernel concepts to read-only observations and synthetic models.
Can a driver be built into the kernel?
Does modinfo prove a module is loaded?
What does udev primarily do?
What is a module compatibility consideration?