1
.\\" auto-generated by docbook2man-spec $Revision: 1.2 $
2
.TH "MODPROBE.CONF" "5" "2010-03-09" "" ""
4
modprobe.d, modprobe.conf \- Configuration directory/file for modprobe
7
Because the \fBmodprobe\fR command can add or
8
remove more than one module, due to modules having dependencies,
9
we need a method of specifying what options are to be used with
10
those modules. All files underneath the
11
\fI/etc/modprobe.d\fR directory which end with the
12
\fI\&.conf\fR extension specify those options as
13
required. (the \fI/etc/modprobe.conf\fR file can
14
also be used if it exists, but that will be removed in a future
15
version). They can also be used to create convenient aliases:
16
alternate names for a module, or they can override the normal
17
\fBmodprobe\fR behavior altogether for those with
18
special requirements (such as inserting more than one module).
20
Note that module and alias names (like other module names) can
21
have - or _ in them: both are interchangable throughout all the
22
module commands as underscore conversion happens automatically.
24
The format of and files under \fImodprobe.d\fR and
25
\fI/etc/modprobe.conf\fR is simple: one
26
command per line, with blank lines and lines starting with '#'
27
ignored (useful for adding comments). A '\\' at the end of a line
28
causes it to continue on the next line, which makes the file a
32
\fBalias \fIwildcard\fB \fImodulename\fB\fR
33
This allows you to give alternate names for a module. For
34
example: "alias my-mod really_long_modulename"
35
means you can use "modprobe my-mod" instead of "modprobe
36
really_long_modulename". You can also use shell-style
37
wildcards, so "alias my-mod* really_long_modulename"
38
means that "modprobe my-mod-something" has the same
39
effect. You can't have aliases to other aliases (that
40
way lies madness), but aliases can have options, which
41
will be added to any other options.
43
Note that modules can also contain their own aliases,
44
which you can see using \fBmodinfo\fR\&. These
45
aliases are used as a last resort (ie. if there is no real
46
module, \fBinstall\fR,
47
\fBremove\fR, or \fBalias\fR
48
command in the configuration).
50
\fBblacklist \fImodulename\fB\fR
51
Modules can contain their own aliases: usually these are
52
aliases describing the devices they support, such as
53
"pci:123...". These "internal" aliases can be overridden
54
by normal "alias" keywords, but there are cases where two
55
or more modules both support the same devices, or a module
56
invalidly claims to support a device that it does not: the
57
\fBblacklist\fR keyword indicates that all of
58
that particular module's internal aliases are to be ignored.
60
\fBinstall \fImodulename\fB \fIcommand...\fB\fR
61
This command instructs \fBmodprobe\fR to run your
62
command instead of inserting the module in the kernel as normal.
63
The command can be any shell command: this allows you to do any
64
kind of complex processing you might wish. For example, if the
65
module "fred" works better with the module "barney"
66
already installed (but it doesn't depend on it, so
67
\fBmodprobe\fR won't automatically load it),
68
you could say "install fred /sbin/modprobe barney;
69
/sbin/modprobe --ignore-install fred", which would do what
70
you wanted. Note the \fB--ignore-install\fR,
71
which stops the second \fBmodprobe\fR from
72
running the same \fBinstall\fR command again.
73
See also \fBremove\fR below.
75
The long term future of this command as a solution to the
76
problem of providing additional module dependencies is not assured
77
and it is intended to replace this command with a warning about
78
its eventual removal or deprecation at some point in a future
79
release. Its use complicates the automated determination of module
80
dependencies by distribution utilities, such as mkinitrd (because
81
these now need to somehow interpret what the
82
\fBinstall\fR commands might be doing.
83
In a perfect world, modules would provide all dependency
84
information without the use of this command and work is underway
85
to implement soft dependency support within the Linux kernel.
87
If you use the string "$CMDLINE_OPTS" in the command, it
88
will be replaced by any options specified on the modprobe
89
command line. This can be useful because users expect
90
"modprobe fred opt=1" to pass the "opt=1" arg to the
91
module, even if there's an install command in the
92
configuration file. So our above example becomes "install
93
fred /sbin/modprobe barney; /sbin/modprobe
94
--ignore-install fred $CMDLINE_OPTS"
96
\fBoptions \fImodulename\fB \fIoption...\fB\fR
97
This command allows you to add options to the module
98
\fImodulename\fR (which might be an
99
alias) every time it is inserted into the kernel: whether
100
directly (using \fBmodprobe\fR
101
\fImodulename\fR or because the
102
module being inserted depends on this module.
104
All options are added together: they can come from an
105
\fBoption\fR for the module itself, for an
106
alias, and on the command line.
108
\fBremove \fImodulename\fB \fIcommand...\fB\fR
109
This is similar to the \fBinstall\fR command
110
above, except it is invoked when "modprobe -r" is run.
112
\fBsoftdep \fImodulename\fB pre: \fImodules...\fB post: \fImodules...\fB\fR
113
The \fBsoftdep\fR command allows you to specify soft,
114
or optional, module dependencies. \fImodulename\fR
115
can be used without these optional modules installed, but usually with
116
some features missing. For example, a driver for a storage HBA might
117
require another module be loaded in order to use management features.
119
pre-deps and post-deps modules are lists of names and/or aliases of other
120
modules that modprobe will attempt to install (or remove) in order
121
before and after the main module given in the
122
\fImodulename\fR argument.
124
Example: Assume "softdep c pre: a b post: d e" is provided in the
125
configuration. Running "modprobe c" is now equivalent to
126
"modprobe a b c d e" without the softdep.
127
Flags such as --use-blacklist are applied to all the specified
128
modules, while module parameters only apply to module c.
130
Note: if there are \fBinstall\fR or
131
\fBremove\fR commands with the same
132
\fImodulename\fR argument,
133
\fBsoftdep\fR takes precedence.
136
A future version of module-init-tools will come with a strong warning
137
to avoid use of the \fBinstall\fR as explained above. This
138
will happen once support for soft dependencies in the kernel is complete.
139
That support will complement the existing softdep support within this
140
utility by providing such dependencies directly within the modules.
143
This manual page originally Copyright 2004, Rusty Russell, IBM
144
Corporation. Maintained by Jon Masters and others.