System Management

After a new .ko file is copied into /lib/modules/$(uname -r)/extra, modprobe still cannot find the module by name. Which command fixes this?

Show the answer

Correct answerA. depmod

AWhy this is right: depmod rebuilds modules.dep and the map files that modprobe uses to find modules by name.

BWhy not this: insmod loads one module from a file path; it does not update the data modprobe searches.

CWhy not this: dracut -f rebuilds the initramfs; it does not refresh modules.dep for the running system.

DWhy not this: modinfo only shows a module's details, and it too finds modules by name through modules.dep.

depmod scans the module tree for the running kernel and regenerates modules.dep and related map files. modprobe relies on these files to locate modules and load their dependencies, so a new module is not usable by name until depmod has run.