Differences between revisions 7 and 8
Revision 7 as of 2008-01-27 13:01:34
Size: 1952
Editor: FranklinPiat
Comment: use manpages.debian.net + cleanup.
Revision 8 as of 2009-03-16 03:32:36
Size: 1954
Editor: anonymous
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
The ["modprobe"] and depmod utilities are intended to make a Linux modular kernel more manageable for all users, administrators and distribution maintainers. The [[modprobe]] and depmod utilities are intended to make a Linux modular kernel more manageable for all users, administrators and distribution maintainers.
Line 4: Line 4:
Depmod creates a ["Makefile"]-like dependency file, based on the symbols it finds in the set of modules mentioned on the CommandLine 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. Depmod creates a [[Makefile]]-like dependency file, based on the symbols it finds in the set of modules mentioned on the CommandLine 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.
Line 21: Line 21:
 * [http://manpages.debian.net/man/8/depmod depmod manpage].
 * ["modprobe"] command.
 * [[http://manpages.debian.net/man/8/depmod|depmod manpage]].
 * [[modprobe]] command.

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 CommandLine 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 RcFile s 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 more information 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 :