LX0-103 · Question #176
What information does the file modules.dep provide?
The correct answer is D. A list of modules required by each module.. The modules.dep file maps each kernel module to the other modules it depends on, enabling modprobe to automatically resolve and load prerequisites.
Question
What information does the file modules.dep provide?
Options
- AA list of all modules compiled for this kernel.
- BA list of modules the kernel needs to run.
- CA list of all modules available to the kernel.
- DA list of modules required by each module.
- EA list of devices and their module name.
How the community answered
(30 responses)- A7% (2)
- C3% (1)
- D87% (26)
- E3% (1)
Why each option
The modules.dep file maps each kernel module to the other modules it depends on, enabling modprobe to automatically resolve and load prerequisites.
A list of all modules compiled for a kernel is part of the build artifacts such as .config or the modules directory tree, not the specific purpose of modules.dep.
Modules required by the kernel core at boot are compiled as built-ins and are not tracked in modules.dep.
The set of all available loadable modules is represented by the files present under /lib/modules/<version>/, not specifically by modules.dep.
modules.dep (located in /lib/modules/<kernel-version>/) contains a dependency map where each module is listed alongside the full paths of modules it requires to function. When modprobe loads a module, it reads modules.dep to determine and load all prerequisite modules in the correct order. This file is generated and updated by the depmod utility.
Device-to-module mappings are stored in modules.alias and modules.pcimap (or modules.usbmap), not in modules.dep.
Concept tested: Linux kernel modules.dep dependency file purpose
Source: https://linux.die.net/man/5/modules.dep
Topics
Community Discussion
No community discussion yet for this question.