blob: 0b3b01d7a272d0ea89015e2842cf8c09b72580ff [file] [log] [blame]
Lucas De Marchif57497c2012-01-12 14:12:27 -02001<?xml version='1.0'?>
2<!--*-nxml-*-->
3<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5<refentry id="modprobe">
6 <refentryinfo>
7 <title>modprobe</title>
8 <productname>kmod</productname>
9
10 <authorgroup>
11 <author>
12 <contrib>Developer</contrib>
13 <firstname>Jon</firstname>
14 <surname>Masters</surname>
15 <email>jcm@jonmasters.org</email>
16 </author>
17 <author>
18 <contrib>Developer</contrib>
19 <firstname>Robby</firstname>
20 <surname>Workman</surname>
21 <email>rworkman@slackware.com</email>
22 </author>
23 <author>
24 <contrib>Developer</contrib>
25 <firstname>Lucas</firstname>
26 <surname>De Marchi</surname>
27 <email>lucas.demarchi@profusion.mobi</email>
28 </author>
29 </authorgroup>
30 </refentryinfo>
31
32 <refmeta>
33 <refentrytitle>modprobe</refentrytitle>
34 <manvolnum>8</manvolnum>
35 </refmeta>
36
37 <refnamediv>
38 <refname>modprobe</refname>
39 <refpurpose>Add and remove modules from the Linux Kernel</refpurpose>
40 </refnamediv>
41
42 <refsynopsisdiv>
43 <cmdsynopsis>
44 <command>modprobe</command>
45 <arg><option>-v</option></arg>
46 <arg><option>-V</option></arg>
47 <arg><option>-C <replaceable>config-file</replaceable></option></arg>
48 <arg><option>-n</option></arg>
49 <arg><option>-i</option></arg>
50 <arg><option>-q</option></arg>
51 <arg><option>-b</option></arg>
52 <arg><replaceable>modulename</replaceable></arg>
53 <arg rep='repeat'><option><replaceable>module parameters</replaceable></option></arg>
54 </cmdsynopsis>
55 <cmdsynopsis>
56 <command>modprobe</command>
57 <arg>-r</arg>
58 <arg><option>-v</option></arg>
59 <arg><option>-n</option></arg>
60 <arg><option>-i</option></arg>
61 <arg rep='repeat'><option><replaceable>modulename</replaceable></option></arg>
62 </cmdsynopsis>
63 <cmdsynopsis>
64 <command>modprobe</command>
65 <arg>-c</arg>
66 </cmdsynopsis>
67 <cmdsynopsis>
68 <command>modprobe</command>
69 <arg>--dump-modversions</arg> <arg><replaceable>filename</replaceable></arg>
70 </cmdsynopsis>
71 </refsynopsisdiv>
72 <refsect1>
73 <title>Description</title>
74
75 <para>
76 <command>modprobe</command> intelligently adds or removes a
77 module from the Linux kernel: note that for convenience, there
78 is no difference between _ and - in module names (automatic
79 underscore conversion is performed).
80 <command>modprobe</command> looks in the module directory
81 <filename>/lib/modules/`uname -r`</filename> for all
82 the modules and other files, except for the optional
83 <filename>/etc/modprobe.conf</filename> configuration file and
84 <filename>/etc/modprobe.d</filename> directory
85 (see <citerefentry>
86 <refentrytitle>modprobe.conf</refentrytitle><manvolnum>5</manvolnum>
87 </citerefentry>). <command>modprobe</command> will also use module
88 options specified on the kernel command line in the form of
89 &lt;module&gt;.&lt;option&gt;.
90 </para>
91 <para>
92 Note that unlike in 2.4 series Linux kernels (which are not supported
93 by this tool) this version of <command>modprobe</command> does not
94 do anything to the module itself: the work of resolving symbols
95 and understanding parameters is done inside the kernel. So
96 module failure is sometimes accompanied by a kernel message: see
97 <citerefentry>
98 <refentrytitle>dmesg</refentrytitle><manvolnum>8</manvolnum>
99 </citerefentry>.
100 </para>
101 <para>
102 <command>modprobe</command> expects an up-to-date
103 <filename>modules.dep.bin</filename> file (or fallback human
104 readable <filename>modules.dep</filename> file), as generated
105 by the corresponding <command>depmod</command> utility shipped
106 along with <command>modprobe</command> (see
107 <citerefentry><refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum>
108 </citerefentry>). This file lists what other modules each
109 module needs (if any), and <command>modprobe</command> uses this
110 to add or remove these dependencies automatically.
111 </para>
112 <para>
113 If any arguments are given after the
114 <replaceable>modulename</replaceable>, they are passed to the
115 kernel (in addition to any options listed in the configuration
116 file).
117 </para>
118 </refsect1>
119
120 <refsect1><title>OPTIONS</title>
121 <variablelist>
122 <varlistentry>
123 <term><option>-a</option> <option>--all</option></term>
124 <listitem>
125 <para>Insert all module names on the command line.</para>
126 </listitem>
127 </varlistentry>
128 <varlistentry>
129 <term><option>-b</option> <option>--use-blacklist</option></term>
130 <listitem>
131 <para>
132 This option causes <command>modprobe</command> to apply the
133 <command>blacklist</command> commands in the configuration files
134 (if any) to module names as well. It is usually used by
135 <citerefentry>
136 <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
137 </citerefentry>.
138 </para>
139 </listitem>
140 </varlistentry>
141 <varlistentry>
142 <term><option>-C</option> <option>--config</option></term>
143 <listitem>
144 <para>This option overrides the default configuration directory
145 (<filename>/etc/modprobe.d</filename>).
146 </para>
147 <para>
148 This option is passed through <command>install</command>
149 or <command>remove</command> commands to other
150 <command>modprobe</command> commands in the
151 MODPROBE_OPTIONS environment variable.
152 </para>
153 </listitem>
154 </varlistentry>
155 <varlistentry>
156 <term><option>-c</option> <option>--showconfig</option></term>
157 <listitem>
158 <para>
159 Dump out the effective configuration from the config directory and
160 exit.
161 </para>
162 </listitem>
163 </varlistentry>
164 <varlistentry>
165 <term><option>--dump-modversions</option>
166 </term>
167 <listitem>
168 <para>
169 Print out a list of module versioning information required by a
170 module. This option is commonly used by distributions in order to
171 package up a Linux kernel module using module versioning deps.
172 </para>
173 </listitem>
174 </varlistentry>
175 <varlistentry>
176 <term><option>-d</option> <option>--dirname</option></term>
177 <listitem>
178 <para>
179 Directory where modules can be found,
180 <filename>/lib/modules/<replaceable>RELEASE</replaceable></filename>
181 by default.
182 </para>
183 </listitem>
184 </varlistentry>
185 <varlistentry>
186 <term><option>--first-time</option></term>
187 <listitem>
188 <para>
189 Normally, <command>modprobe</command> will succeed (and do
190 nothing) if told to insert a module which is already
191 present or to remove a module which isn't present. This is
192 ideal for simple scripts; however, more complicated scripts often
193 want to know whether <command>modprobe</command> really
194 did something: this option makes modprobe fail in the
195 case that it actually didn't do anything.
196 </para>
197 </listitem>
198 </varlistentry>
199 <varlistentry>
200 <term><option>--force-vermagic</option></term>
201 <listitem>
202 <para>
203 Every module contains a small string containing important
204 information, such as the kernel and compiler versions. If a module
205 fails to load and the kernel complains that the "version magic"
206 doesn't match, you can use this option to remove it. Naturally,
207 this check is there for your protection, so this using option is
208 dangerous unless you know what you're doing.
209 </para>
210 <para>
211 This applies to any modules inserted: both the module (or alias) on
212 the command line and any modules on which it depends.
213 </para>
214 </listitem>
215 </varlistentry>
216 <varlistentry>
217 <term><option>--force-modversion</option></term>
218 <listitem>
219 <para>
220 When modules are compiled with CONFIG_MODVERSIONS set, a section
221 detailing the versions of every interfaced used by (or supplied by)
222 the module is created. If a module fails to load and the kernel
223 complains that the module disagrees about a version of some
224 interface, you can use "--force-modversion" to remove the version
225 information altogether. Naturally, this check is there for your
226 protection, so using this option is dangerous unless you know what
227 you're doing.
228 </para>
229 <para>
230 This applies any modules inserted: both the module (or alias) on
231 the command line and any modules on which it depends.
232 </para>
233 </listitem>
234 </varlistentry>
235 <varlistentry>
236 <term><option>-f</option> <option>--force</option></term>
237 <listitem>
238 <para>
239 Try to strip any versioning information from the module which might
240 otherwise stop it from loading: this is the same as using both
241 <option>--force-vermagic</option> and
242 <option>--force-modversion</option>. Naturally, these checks are
243 there for your protection, so using this option is dangerous unless
244 you know what you are doing.
245 </para>
246 <para>
247 This applies to any modules inserted: both the module (or alias) on
248 the command line and any modules it on which it depends.
249 </para>
250 </listitem>
251 </varlistentry>
252 <varlistentry>
253 <term>
254 <option>-i</option>
255 <option>--ignore-install</option>
256 <option>--ignore-remove</option>
257 </term>
258 <listitem>
259 <para>
260 This option causes <command>modprobe</command> to ignore
261 <command>install</command> and <command>remove</command> commands
262 in the configuration file (if any) for the module specified on the
263 command line (any dependent modules are still subject to commands
264 set for them in the configuration file). Both
265 <command>install</command> and <command>remove</command> commands
266 will currently be ignored when this option is used regardless of
267 whether the request was more specifically made with only one or
268 other (and not both) of <option>--ignore-install</option> or
269 <option>--ignore-remove</option>. See <citerefentry>
270 <refentrytitle>modprobe.d</refentrytitle><manvolnum>5</manvolnum>
271 </citerefentry>.
272 </para>
273 </listitem>
274 </varlistentry>
275 <varlistentry>
276 <term>
277 <option>-n</option>
278 <option>--dry-run</option>
279 <option>--show</option>
280 </term>
281 <listitem>
282 <para>
283 This option does everything but actually insert or delete the
284 modules (or run the install or remove commands). Combined with
285 <option>-v</option>, it is useful for debugging problems. For
286 historical reasons both <option>--dry-run</option> and
287 <option>--show</option> actually mean the same thing and are
288 interchangeable.
289 </para>
290 </listitem>
291 </varlistentry>
292 <varlistentry>
293 <term>
294 <option>-q</option>
295 <option>--quiet</option>
296 </term>
297 <listitem>
298 <para>
299 With this flag, <command>modprobe</command> won't print an error
300 message if you try to remove or insert a module it can't find (and
301 isn't an alias or
302 <command>install</command>/<command>remove</command> command).
303 However, it will still return with a non-zero exit status. The
304 kernel uses this to opportunistically probe for modules which might
305 exist using request_module.
306 </para>
307 </listitem>
308 </varlistentry>
309 <varlistentry>
310 <term>
311 <option>-R</option>
312 <option>--resolve-alias</option>
313 </term>
314 <listitem>
315 <para>
316 Print all module names matching an alias. This can be useful for
317 debugging module alias problems.
318 </para>
319 </listitem>
320 </varlistentry>
321 <varlistentry>
322 <term>
323 <option>-r</option>
324 <option>--remove</option>
325 </term>
326 <listitem>
327 <para>
328 This option causes <command>modprobe</command> to remove rather
329 than insert a module. If the modules it depends on are also
330 unused, <command>modprobe</command> will try to remove them too.
331 Unlike insertion, more than one module can be specified on the
332 command line (it does not make sense to specify module parameters
333 when removing modules).
334 </para>
335 <para>
336 There is usually no reason to remove modules, but some buggy
337 modules require it. Your distribution kernel may not have been
338 built to support removal of modules at all.
339 </para>
340 </listitem>
341 </varlistentry>
342 <varlistentry>
343 <term>
344 <option>-S</option>
345 <option>--set-version</option>
346 </term>
347 <listitem>
348 <para>
349 Set the kernel version, rather than using
350 <citerefentry><refentrytitle>uname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
351 to decide on the kernel version (which dictates where to find the
352 modules).
353 </para>
354 </listitem>
355 </varlistentry>
356 <varlistentry>
357 <term>
358 <option>--show-depends</option>
359 </term>
360 <listitem>
361 <para>
362 List the dependencies of a module (or alias), including the module
363 itself. This produces a (possibly empty) set of module filenames,
364 one per line, each starting with "insmod" and is typically used by
365 distributions to determine which modules to include when generating
366 initrd/initramfs images. <command>Install</command> commands which
367 apply are shown prefixed by "install". It does not run any of the
368 install commands. Note that
369 <citerefentry><refentrytitle>modinfo</refentrytitle><manvolnum>8</manvolnum></citerefentry>
370 can be used to extract dependencies of a module from the module
371 itself, but knows nothing of aliases or install commands.
372 </para>
373 </listitem>
374 </varlistentry>
375 <varlistentry>
376 <term>
377 <option>-s</option>
378 <option>--syslog</option>
379 </term>
380 <listitem>
381 <para>
382 This option causes any error messages to go through the syslog
383 mechanism (as LOG_DAEMON with level LOG_NOTICE) rather than to
384 standard error. This is also automatically enabled when stderr is
385 unavailable.
386 </para>
387 <para>
388 This option is passed through <command>install</command> or
389 <command>remove</command> commands to other
390 <command>modprobe</command> commands in the MODPROBE_OPTIONS
391 environment variable.
392 </para>
393 </listitem>
394 </varlistentry>
395 <varlistentry>
396 <term>
397 <option>-V</option>
398 <option>--version</option>
399 </term>
400 <listitem>
401 <para>Show version of program and exit.</para>
402 </listitem>
403 </varlistentry>
404 <varlistentry>
405 <term>
406 <option>-v</option>
407 <option>--verbose</option>
408 </term>
409 <listitem>
410 <para>
411 Print messages about what the program is doing. Usually
412 <command>modprobe</command> only prints messages if something goes
413 wrong.
414 </para>
415 <para>
416 This option is passed through <command>install</command> or
417 <command>remove</command> commands to other
418 <command>modprobe</command> commands in the MODPROBE_OPTIONS
419 environment variable.
420 </para>
421 </listitem>
422 </varlistentry>
423 </variablelist>
424 </refsect1>
425
426 <refsect1><title>ENVIRONMENT</title>
427 <para>
428 The MODPROBE_OPTIONS environment variable can also be used to pass
429 arguments to <command>modprobe</command>.
430 </para>
431 </refsect1>
432
433 <refsect1><title>COPYRIGHT</title>
434 <para>
435 This manual page originally Copyright 2002, Rusty Russell, IBM
436 Corporation. Maintained by Jon Masters and others.
437 </para>
438 </refsect1>
439
440 <refsect1>
441 <title>SEE ALSO</title>
442 <para>
443 <citerefentry>
444 <refentrytitle>modprobe.d</refentrytitle><manvolnum>5</manvolnum>
445 </citerefentry>,
446 <citerefentry>
447 <refentrytitle>insmod</refentrytitle><manvolnum>8</manvolnum>
448 </citerefentry>,
449 <citerefentry>
450 <refentrytitle>rmmod</refentrytitle><manvolnum>8</manvolnum>
451 </citerefentry>,
452 <citerefentry>
453 <refentrytitle>lsmod</refentrytitle><manvolnum>8</manvolnum>
454 </citerefentry>,
455 <citerefentry>
456 <refentrytitle>modinfo</refentrytitle><manvolnum>8</manvolnum>
457 </citerefentry>
458 </para>
459 </refsect1>
460</refentry>