Section: Linux Module Support (8)
Updated: October 12, 1999Index
Return to Main Contents
Copyright (c) 1994, 1995 Jacques Gelinas (email@example.com
Copyright (c) 1995, 1999 Bjorn Ekwall (firstname.lastname@example.org
This program is distributed according to the Gnu General Public License.
See the file COPYING in the base distribution directory
depmod - handle dependency descriptions for loadable kernel modules
[-C configfile] [-F kernelsyms] [-b basedirectory] [forced_version]
[-enqsv] [-F kernelsyms] module1.o module2.o ...
Search for modules in all directories specified in the (optional)
Compare file timestamps and, if necessary, act like
-a. This option only updates the dependency file if anything has changed.
Show all the unresolved symbol for each module.
Write the dependency file on stdout instead of in the
Write all error messages via the syslog daemon instead of stderr.
Show the name of each module as it is being processed.
Tell depmod to keep quiet and not to complain about missing symbols.
Show the release version name of
Some users compile modules under a non-root userid then install the
modules as root. This process can leave the modules owned by the
non-root userid, even though the modules directory is owned by root.
If the non-root userid is compromised, an intruder can overwrite
existing modules owned by that userid and use this exposure to
bootstrap up to root access.
By default, modutils will reject attempts to use a module that is not
owned by root. Specifying -r will suppress the error and allow root to
load modules that are not owned by root.
is a major security exposure and is not recommended.
The following options are useful for people managing distributions;
- -b basedirectory
If the directory tree
containing the sub-trees of modules is moved somewhere else in order to
handle modules for a different environment, the
option tells depmod where to find the moved image of the
The file references in the depmod output file that is built,
will not contain the
This means that when the file tree is moved back from
in the final distribution, all references will be correct.
- -C configfile
Use the file
instead of /etc/modules.conf.
The environment variable
can also be used to select a different
configuration file from the default /etc/modules.conf (or
- -F kernelsyms
When building dependency files for a different kernel than the currently
running kernel, it is important that
uses the correct set of kernel symbols to resolve the kernel references
in each module.
These symbols can either be a copy of
from the other kernel,
or a copy of the output from
If your kernel uses versioned symbols, you
use a copy of the
output, since that file contains the symbol versions of the kernel symbols.
utilities are intended
to make a Linux modular kernel manageable for all users,
administrators and distribution maintainers.
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
to automatically load the correct module or stack of modules.
The normal use of
is to include the line
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
now is optional.
For boot-up purposes, the option
might be more appropriate since that make depmod silent about
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.
The behavior of
can be adjusted by the (optional) configuration file
for a complete description.
Each time you compile a new kernel, the command
will create a new directory, but won't change the default.
When you get a module unrelated to the kernel distribution
you should place it in one of the version-independent directories
This is the default strategy, which can be overridden in /etc/modules.conf.
/etc/modules.conf (alternatively but deprecated /etc/modules.conf)
Jacques Gelinas (email@example.com
Bjorn Ekwall (firstname.lastname@example.org
- SEE ALSO