The ["modprobe"] and depmod utilities are intended to make a Linux modular ["kernel"] more manageable for all users, administrators and distribution maintainers.

Depmod creates a "Makefile"-like dependency file, based on the symbols it finds in the set of modules mentioned on the command line or from the directories specified in the configuration file. This dependency file is later used by modprobe to automatically load the correct module or stack of modules.

The normal use of depmod is to include the line

       /sbin/depmod -a

somewhere in the rc-files in /etc/rc.d, so that the correct module dependencies will be available immediately after booting the system. Note that the option -a is now optional. For boot-up purposes, the option -q might be more appropriate since that makes depmod silent about unresolved symbols.

It is also possible to create the dependency file immediately after compiling a new kernel. If you do "depmod -a 2.2.99" when you have compiled kernel 2.2.99 and its modules the first time, while still running e.g. 2.2.98, the file will be created in the correct place. In this case however, the dependencies on the kernel will not be guaranteed to be correct. See the options

  -F, -C and -b 

above for moreinformation on handling this.

While building the relationship between modules and the symbols exported by other modules, depmod does not consider the GPL status of the modules nor of the exported symbols. That is, depmod will not flag an error if a module without a GPL compatible license refers to a GPL only symbol (EXPORT_SYMBOL_GPL in the kernel). However insmod will refuse to resolve GPL only symbols for non-GPL modules so the actual load will fail.

See :