MAN page from Other modutils-2.4.7-1.i386.rpm
DEPMOD
Section: Linux Module Support (8)
Updated: August 15, 2001
Index NAME
depmod - handle dependency descriptions for loadable kernel modules
SYNOPSIS
depmod-[aA] [-enqsvVru][-C configfile] [-F kernelsyms] [-b basedirectory] [forced_version]
depmod[-enqsvru] [-F kernelsyms] module1.o module2.o ...
OPTIONS
- -a
- Search for modules in all directories specified in the (optional)configuration file/etc/modules.conf.
- -A
- Compare file timestamps and, if necessary, act likedepmod-a. This option only updates the dependency file if anything has changed.
- -e
- Show all the unresolved symbol for each module.
- -n
- Write the dependency file on stdout instead of in the/lib/modulestree.
- -s
- Write all error messages via the syslog daemon instead of stderr.
- -v
- Show the name of each module as it is being processed.
- -q
- Tell depmod to keep quiet and not to complain about missing symbols.
- -V
- Show the release version name ofdepmod
- -r
- Some users compile modules under a non-root userid then install themodules as root. This process can leave the modules owned by thenon-root userid, even though the modules directory is owned by root.If the non-root userid is compromised, an intruder can overwriteexisting modules owned by that userid and use this exposure tobootstrap up to root access.
- By default, modutils will reject attempts to use a module that is notowned by root. Specifying -r will suppress the error and allow root toload modules that are not owned by root.
- Use of-ris a major security exposure and is not recommended.
- -u
- depmod 2.4 does not set a return code when there are any unresolvedsymbols, the next major release of modutils (2.5) will set a returncode for unresolved symbols. Some distributions want a non-zero returncode in modutils 2.4 but that change might cause problems for users whoexpect the old behaviour. If you want a non-zero return code in depmod2.4, specify-u.depmod 2.5 will silently ignore the-uflag and will always give a non-zero return code for unresolvedsymbols.
The following options are useful for people managing distributions;
- -b basedirectory
- If the directory tree/lib/modulescontaining the sub-trees of modules is moved somewhere else in order tohandle modules for a different environment, thebasedirectoryoption tells depmod where to find the moved image of the/lib/modulestree.The file references in the depmod output file that is built,modules.dep,will not contain thebasedirectorypath.This means that when the file tree is moved back frombasedirectory/lib/modulesinto/lib/modulesin the final distribution, all references will be correct.
- -C configfile
- Use the fileconfigfileinstead of /etc/modules.conf.
The environment variableMODULECONFcan also be used to select a differentconfiguration file from the default /etc/modules.conf (or/etc/conf.modules (deprecated)). - -F kernelsyms
- When building dependency files for a different kernel than the currentlyrunning kernel, it is important thatdepmoduses the correct set of kernel symbols to resolve the kernel referencesin each module.These symbols can either be a copy ofSystem.mapfrom the other kernel,or a copy of the output from/proc/ksyms.If your kernel uses versioned symbols, youmustuse a copy of the/proc/ksymsoutput, since that file contains the symbol versions of the kernel symbols.
DESCRIPTION
The
depmodand
modprobeutilities are intendedto make a Linux modular kernel manageable for all users,administrators and distribution maintainers.
Depmodcreates a "Makefile"-like dependency file, based on the symbols it findsin the set of modules mentioned on the command lineor from the directories specified in the configuration file.This dependency file is later used bymodprobeto automatically load the correct module or stack of modules.
The normal use ofdepmodis to include the line/sbin/depmod -asomewhere in the rc-filesin /etc/rc.d, so that the correct module dependencies will be availableimmediately after booting the system.
Note that the option-anow is optional.For boot-up purposes, the option-qmight be more appropriate since that make depmod silent aboutunresolved symbols.
It is also possible to create the dependency file immediatelyafter compiling a new kernel.If you do "depmod -a 2.2.99" when you have compiled kernel 2.2.99 andits modules the first time, while still running e.g. 2.2.98, the file willbe 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 -babove for more information on handling this.
CONFIGURATION
The behavior of
depmodand
modprobecan be adjusted by the (optional) configuration file
/etc/modules.confSee
modprobe(8)and
modules.conf(5)for a complete description.
STRATEGY
Each time you compile a new kernel, the command
make modules_installwill create a new directory, but won't change the default.
When you get a module unrelated to the kernel distributionyou should place it in one of the version-independent directoriesunder /lib/modules.
This is the default strategy, which can be overridden in /etc/modules.conf.
FILES
/etc/modules.conf (alternatively but deprecated /etc/conf.modules)/lib/modules/*/modules.dep,/lib/modules/*
SEE ALSO
modules.conf(5),
modprobe(8),
modinfo(8),
lsmod(8),
ksyms(8)
AUTHOR
Jacques Gelinas (jackAATTsolucorp.qc.ca)
Bjorn Ekwall (bj0rnAATTblox.se)
Index
- NAME
- SYNOPSIS
- OPTIONS
- DESCRIPTION
- CONFIGURATION
- STRATEGY
- FILES
- SEE ALSO
- AUTHOR
This document was created byman2html,using the manual pages.