UNIX/LINUX Command – depmod


depmod, modprobe—Handle loadable modules automatically


depmod [–a]
depmod module1.o module2.o …
modprobe module.o [symbol=value …]
modprobe –t tag pattern
modprobe –a –t tag pattern modprobe –l [ –t tag ] pattern
modprobe –r module
modprobe –c


These utilities are intended to make a Linux modular kernel 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 in a default place). This dependency file can later be used by modprobe to automatically load the relevant module(s).

modprobe is used to load a set of modules—either a single module, a stack of dependent modules, or all modules that are marked with a specified tag.

modprobe will automatically load all base modules needed in a module stack, as described by the dependency file modules.dep.

If the loading of one of these modules fails, the whole current stack of modules will be unloaded (by rmmod) automatically.

modprobe has two ways of loading modules. One way (the probe mode) will try to load a module out of a list (defined by pattern). It stops loading as soon as one module load successfully. This can be used to autoload one Ethernet driver out of a list, for example. The other way is to load all modules from a list. This can be used to load some modules at boot time.

With the option -r, modprobe will automatically unload a stack of modules, similar to the way rmmod -r does.

Option -l combined with option -t lists all available modules of a certain type. An enhanced mount command could use the command:

modprobe -l -t fs
to get the list of all file system drivers available and on request load the proper one. So, the mount command could become more generic as well. (The kerneld solves this without changing the mount utility.)

Option -c will print all configuration (default + configuration file).

The normal use of depmod is to include the line /sbin/depmod –a in one of the rc-files in /etc/rc.d, so that the correct module dependencies will be available immediately after booting the system.

Option -d puts depmod in debug mode. It outputs all commands it is issuing.

Option -e outputs the list of unresolved symbol for each module, Normally, depmod only outputs the list of unloadable modules.

Option -v outputs the list of all processed modules.

Modules may be located at different place in the filesystem, but there will always be some need to override this, especially for module developers. We expect some official standard will emerge, defined by the FSSTND. Until that time, you might as well use this suggested directory structure.

Related Posts

UNIX/LINUX Command – rsync

UNIX/LINUX Command – rsync

NAME rsync – a fast, versatile, remote (and local) file-copying tool rsync Command SYNOPSIS Local: rsync [OPTION…] SRC… [DEST] Access via remote shell:Pull: rsync [OPTION…] [[email protected]]HOST:SRC… [DEST]Push: rsync [OPTION…] SRC… [[email protected]]HOST:DEST Access via rsync...

UNIX/LINUX Command – strip

UNIX/LINUX Command – strip

NAME strip—Discard symbols from object files. SYNOPSIS strip [ -Fbfdname|–target=bfdname ] [ -Ibfdname|–input-target=bfdname ] [ -Obfdname|–output-target=bfdname ] [-Rsectionname|–remove-section=sectionname ] [ -s|–strip-all ] [-S|-g|–strip-debug ][-x|–discard-all...

UNIX/LINUX Command – expand

UNIX/LINUX Command – expand

NAME expand—Convert tabs to spaces SYNOPSIS expand [–tab1[,tab2[,…]]] [–t tab1[,tab2[,…]]] [–i] [—tabs=tab1[,tab2[,…]]] [–initial] [–help] [–version] [file…] DESCRIPTION This manual page documents the GNU version of expand. expand writes the contents of each given...

UNIX/LINUX Command – uuencode

UNIX/LINUX Command – uuencode

NAME uuencode—Encode a binary fileuudecode—Decode a file created by uuencode SYNOPSIS uuencode [-m] [ file ] nameuudecode [-o outfile] [ file ]… DESCRIPTION uuencode and uudecode are used to transmit binary files over transmission mediums that do not support other...

Follow Us

Our Communities

The Ultimate Managed Hosting Platform
Load WordPress Sites in as fast as 37ms!



Submit a Comment

Your email address will not be published.

1 + 11 =