1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
|
'\" t
.\" Title: modprobe
.\" Author: Jon Masters <jcm@jonmasters.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 12/06/2023
.\" Manual: modprobe
.\" Source: kmod
.\" Language: English
.\"
.TH "MODPROBE" "8" "12/06/2023" "kmod" "modprobe"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
modprobe \- Add and remove modules from the Linux Kernel
.SH "SYNOPSIS"
.HP \w'\fBmodprobe\fR\ 'u
\fBmodprobe\fR [\fB\-v\fR] [\fB\-V\fR] [\fB\-C\ \fR\fB\fIconfig\-file\fR\fR] [\fB\-n\fR] [\fB\-i\fR] [\fB\-q\fR] [\fB\-b\fR] [\fImodulename\fR] [\fB\fImodule\ parameters\fR\fR...]
.HP \w'\fBmodprobe\fR\ 'u
\fBmodprobe\fR [\-r] [\fB\-v\fR] [\fB\-n\fR] [\fB\-i\fR] [\fB\fImodulename\fR\fR...]
.HP \w'\fBmodprobe\fR\ 'u
\fBmodprobe\fR [\-c]
.HP \w'\fBmodprobe\fR\ 'u
\fBmodprobe\fR [\-\-dump\-modversions] [\fIfilename\fR]
.SH "DESCRIPTION"
.PP
\fBmodprobe\fR
intelligently adds or removes a module from the Linux kernel: note that for convenience, there is no difference between _ and \- in module names (automatic underscore conversion is performed)\&.
\fBmodprobe\fR
looks in the module directory
/usr/lib/modules/`uname \-r`
for all the modules and other files, except for the optional configuration files in the
/etc/modprobe\&.d
directory (see
\fBmodprobe.d\fR(5))\&.
\fBmodprobe\fR
will also use module options specified on the kernel command line in the form of <module>\&.<option> and blacklists in the form of modprobe\&.blacklist=<module>\&.
.PP
Note that unlike in 2\&.4 series Linux kernels (which are not supported by this tool) this version of
\fBmodprobe\fR
does not do anything to the module itself: the work of resolving symbols and understanding parameters is done inside the kernel\&. So module failure is sometimes accompanied by a kernel message: see
\fBdmesg\fR(8)\&.
.PP
\fBmodprobe\fR
expects an up\-to\-date
modules\&.dep\&.bin
file as generated by the corresponding
\fBdepmod\fR
utility shipped along with
\fBmodprobe\fR
(see
\fBdepmod\fR(8))\&. This file lists what other modules each module needs (if any), and
\fBmodprobe\fR
uses this to add or remove these dependencies automatically\&.
.PP
If any arguments are given after the
\fImodulename\fR, they are passed to the kernel (in addition to any options listed in the configuration file)\&.
.PP
When loading modules,
\fImodulename\fR
can also be a path to the module\&. If the path is relative, it must explicitly start with "\&./"\&. Note that this may fail when using a path to a module with dependencies not matching the installed depmod database\&.
.SH "OPTIONS"
.PP
\fB\-a\fR, \fB\-\-all\fR
.RS 4
Insert all module names on the command line\&.
.RE
.PP
\fB\-b\fR, \fB\-\-use\-blacklist\fR
.RS 4
This option causes
\fBmodprobe\fR
to apply the
\fBblacklist\fR
commands in the configuration files (if any) to module names as well\&. It is usually used by
\fBudev\fR(7)\&.
.RE
.PP
\fB\-C\fR, \fB\-\-config\fR
.RS 4
This option overrides the default configuration directory (/etc/modprobe\&.d)\&.
.sp
This option is passed through
\fBinstall\fR
or
\fBremove\fR
commands to other
\fBmodprobe\fR
commands in the MODPROBE_OPTIONS environment variable\&.
.RE
.PP
\fB\-c\fR, \fB\-\-showconfig\fR
.RS 4
Dump out the effective configuration from the config directory and exit\&.
.RE
.PP
\fB\-\-dump\-modversions\fR
.RS 4
Print out a list of module versioning information required by a module\&. This option is commonly used by distributions in order to package up a Linux kernel module using module versioning deps\&.
.RE
.PP
\fB\-d\fR, \fB\-\-dirname\fR
.RS 4
Root directory for modules,
/
by default\&.
.RE
.PP
\fB\-\-first\-time\fR
.RS 4
Normally,
\fBmodprobe\fR
will succeed (and do nothing) if told to insert a module which is already present or to remove a module which isn\*(Aqt present\&. This is ideal for simple scripts; however, more complicated scripts often want to know whether
\fBmodprobe\fR
really did something: this option makes modprobe fail in the case that it actually didn\*(Aqt do anything\&.
.RE
.PP
\fB\-\-force\-vermagic\fR
.RS 4
Every module contains a small string containing important information, such as the kernel and compiler versions\&. If a module fails to load and the kernel complains that the "version magic" doesn\*(Aqt match, you can use this option to remove it\&. Naturally, this check is there for your protection, so using this option is dangerous unless you know what you\*(Aqre doing\&.
.sp
This applies to any modules inserted: both the module (or alias) on the command line and any modules on which it depends\&.
.RE
.PP
\fB\-\-force\-modversion\fR
.RS 4
When modules are compiled with CONFIG_MODVERSIONS set, a section detailing the versions of every interfaced used by (or supplied by) the module is created\&. If a module fails to load and the kernel complains that the module disagrees about a version of some interface, you can use "\-\-force\-modversion" to remove the version information altogether\&. Naturally, this check is there for your protection, so using this option is dangerous unless you know what you\*(Aqre doing\&.
.sp
This applies any modules inserted: both the module (or alias) on the command line and any modules on which it depends\&.
.RE
.PP
\fB\-f\fR, \fB\-\-force\fR
.RS 4
Try to strip any versioning information from the module which might otherwise stop it from loading: this is the same as using both
\fB\-\-force\-vermagic\fR
and
\fB\-\-force\-modversion\fR\&. Naturally, these checks are there for your protection, so using this option is dangerous unless you know what you are doing\&.
.sp
This applies to any modules inserted: both the module (or alias) on the command line and any modules it on which it depends\&.
.RE
.PP
\fB\-i\fR, \fB\-\-ignore\-install\fR, \fB\-\-ignore\-remove\fR
.RS 4
This option causes
\fBmodprobe\fR
to ignore
\fBinstall\fR
and
\fBremove\fR
commands in the configuration file (if any) for the module specified on the command line (any dependent modules are still subject to commands set for them in the configuration file)\&. Both
\fBinstall\fR
and
\fBremove\fR
commands will currently be ignored when this option is used regardless of whether the request was more specifically made with only one or other (and not both) of
\fB\-\-ignore\-install\fR
or
\fB\-\-ignore\-remove\fR\&. See
\fBmodprobe.d\fR(5)\&.
.RE
.PP
\fB\-n\fR, \fB\-\-dry\-run\fR, \fB\-\-show\fR
.RS 4
This option does everything but actually insert or delete the modules (or run the install or remove commands)\&. Combined with
\fB\-v\fR, it is useful for debugging problems\&. For historical reasons both
\fB\-\-dry\-run\fR
and
\fB\-\-show\fR
actually mean the same thing and are interchangeable\&.
.RE
.PP
\fB\-q\fR, \fB\-\-quiet\fR
.RS 4
With this flag,
\fBmodprobe\fR
won\*(Aqt print an error message if you try to remove or insert a module it can\*(Aqt find (and isn\*(Aqt an alias or
\fBinstall\fR/\fBremove\fR
command)\&. However, it will still return with a non\-zero exit status\&. The kernel uses this to opportunistically probe for modules which might exist using request_module\&.
.RE
.PP
\fB\-R\fR, \fB\-\-resolve\-alias\fR
.RS 4
Print all module names matching an alias\&. This can be useful for debugging module alias problems\&.
.RE
.PP
\fB\-r\fR, \fB\-\-remove\fR
.RS 4
This option causes
\fBmodprobe\fR
to remove rather than insert a module\&. If the modules it depends on are also unused,
\fBmodprobe\fR
will try to remove them too\&. Unlike insertion, more than one module can be specified on the command line (it does not make sense to specify module parameters when removing modules)\&.
.sp
There is usually no reason to remove modules, but some buggy modules require it\&. Your distribution kernel may not have been built to support removal of modules at all\&.
.RE
.PP
\fB\-w\fR, \fB\-\-wait=\fRTIMEOUT_MSEC
.RS 4
This option causes
\fBmodprobe \-r\fR
to continue trying to remove a module if it fails due to the module being busy, i\&.e\&. its refcount is not 0 at the time the call is made\&. Modprobe tries to remove the module with an incremental sleep time between each tentative up until the maximum wait time in milliseconds passed in this option\&.
.RE
.PP
\fB\-S\fR, \fB\-\-set\-version\fR
.RS 4
Set the kernel version, rather than using
\fBuname\fR(2)
to decide on the kernel version (which dictates where to find the modules)\&.
.RE
.PP
\fB\-\-show\-depends\fR
.RS 4
List the dependencies of a module (or alias), including the module itself\&. This produces a (possibly empty) set of module filenames, one per line, each starting with "insmod" and is typically used by distributions to determine which modules to include when generating initrd/initramfs images\&.
\fBInstall\fR
commands which apply are shown prefixed by "install"\&. It does not run any of the install commands\&. Note that
\fBmodinfo\fR(8)
can be used to extract dependencies of a module from the module itself, but knows nothing of aliases or install commands\&.
.RE
.PP
\fB\-s\fR, \fB\-\-syslog\fR
.RS 4
This option causes any error messages to go through the syslog mechanism (as LOG_DAEMON with level LOG_NOTICE) rather than to standard error\&. This is also automatically enabled when stderr is unavailable\&.
.sp
This option is passed through
\fBinstall\fR
or
\fBremove\fR
commands to other
\fBmodprobe\fR
commands in the MODPROBE_OPTIONS environment variable\&.
.RE
.PP
\fB\-V\fR, \fB\-\-version\fR
.RS 4
Show version of program and exit\&.
.RE
.PP
\fB\-v\fR, \fB\-\-verbose\fR
.RS 4
Print messages about what the program is doing\&. Usually
\fBmodprobe\fR
only prints messages if something goes wrong\&.
.sp
This option is passed through
\fBinstall\fR
or
\fBremove\fR
commands to other
\fBmodprobe\fR
commands in the MODPROBE_OPTIONS environment variable\&.
.RE
.SH "ENVIRONMENT"
.PP
The MODPROBE_OPTIONS environment variable can also be used to pass arguments to
\fBmodprobe\fR\&.
.SH "COPYRIGHT"
.PP
This manual page originally Copyright 2002, Rusty Russell, IBM Corporation\&. Maintained by Jon Masters and others\&.
.SH "SEE ALSO"
.PP
\fBmodprobe.d\fR(5),
\fBinsmod\fR(8),
\fBrmmod\fR(8),
\fBlsmod\fR(8),
\fBmodinfo\fR(8)
\fBdepmod\fR(8)
.SH "AUTHORS"
.PP
\fBJon Masters\fR <\&jcm@jonmasters\&.org\&>
.RS 4
Developer
.RE
.PP
\fBRobby Workman\fR <\&rworkman@slackware\&.com\&>
.RS 4
Developer
.RE
.PP
\fBLucas De Marchi\fR <\&lucas\&.de\&.marchi@gmail\&.com\&>
.RS 4
Developer
.RE
|