LFCS · Question #776
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, located in the kernel modules directory, contains a list specifying which kernel modules depend on other kernel modules.
Question
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
(44 responses)- B5% (2)
- D93% (41)
- E2% (1)
Why each option
The `modules.dep` file, located in the kernel modules directory, contains a list specifying which kernel modules depend on other kernel modules.
While it concerns modules, `modules.dep` lists dependencies, not simply all modules compiled for the kernel; other files like `modules.builtin` or `modules.order` might list all modules.
`modules.dep` details relationships between modules rather than providing a general list of all modules the kernel needs to operate.
The file provides dependency information, not just a plain list of all available modules; it describes how they relate to each other.
The `modules.dep` file is generated by `depmod` and stores a dependency tree for kernel modules. This file is critical for utilities like `modprobe` to automatically load all necessary prerequisite modules when a specific kernel module is requested, ensuring proper module functionality.
This file maps module dependencies, not devices to their respective modules; device mapping is typically handled by `udev` or through `modinfo`.
Concept tested: Linux kernel module dependencies
Source: https://man7.org/linux/man-pages/man8/depmod.8.html
Topics
Community Discussion
No community discussion yet for this question.