aboutsummaryrefslogtreecommitdiffstats
path: root/doc/modprobe.sgml
blob: fde8ca7b4e6347c61ee045c24c1cd214e334319b (plain)
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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
  <!ENTITY debian  "<productname>Debian GNU/Linux</productname>">
  <!ENTITY docbook "<productname>DocBook</productname>">
  <!ENTITY sgml    "<abbrev>SGML</abbrev>">
]>

<!-- Stolen from manual page for docbook-to-man, DocBook source file
     (C) 1999 W. Borgert debacle@debian.org

     $Id: docbook-to-man.sgml,v 1.8 2002/04/27 15:28:02 debacle Exp $ -->

<refentry>
  <refentryinfo>
    <address>
      <email>rusty@rustcorp.com.au</email>
    </address>
    <author>
      <firstname>Rusty</firstname>
      <surname>Russell</surname>
    </author>
    <date>2002-12-27</date>
  </refentryinfo>
  <refmeta>
    <refentrytitle>modprobe</refentrytitle>
    <manvolnum>8</manvolnum>
  </refmeta>
  <refnamediv>
    <refname>modprobe</refname> <refpurpose>program to add and remove modules from the Linux Kernel</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>modprobe</command>
      <arg><option>-v</option></arg>
      <arg><option>-V</option></arg>
      <arg><option>-C <replaceable>config-file</replaceable></option></arg>
      <arg><option>-n</option></arg>
      <arg><option>-i</option></arg>
      <arg><option>-q</option></arg>
      <arg><option>-b</option></arg>
      <arg><option>-o</option> <replaceable>modulename</replaceable></arg>
      <arg><replaceable>modulename</replaceable></arg>
      <arg rep='repeat'><option><replaceable>module parameters</replaceable></option></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>modprobe</command>
      <arg>-r</arg>
      <arg><option>-v</option></arg>
      <arg><option>-n</option></arg>
      <arg><option>-i</option></arg>
      <arg rep='repeat'><option><replaceable>modulename</replaceable></option></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>modprobe</command>
      <arg>-l</arg>
      <arg>-t <replaceable>dirname</replaceable></arg>
      <arg><option><replaceable>wildcard</replaceable></option></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>modprobe</command>
      <arg>-c</arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>modprobe</command>
      <arg>--dump-modversions</arg> <arg rep='repeat'><replaceable>filename</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
    <title>Description</title>

    <para>
      <command>modprobe</command> intelligently adds or removes a
      module from the Linux kernel: note that for convenience, there
      is no difference between _ and - in module names.
      <command>modprobe</command> looks in the module directory
      <filename>/lib/modules/`uname -r`</filename> for all
      the modules and other files, except for the optional
      <filename>/etc/modprobe.conf</filename> configuration file and
      <filename>/etc/modprobe.d</filename> directory
      (see <citerefentry>
	<refentrytitle>modprobe.conf</refentrytitle><manvolnum>5</manvolnum>
      </citerefentry>). <command>modprobe</command> will also use module
      options specified on the kernel command line in the form of
      &lt;module&gt;.&lt;option&gt;.
    </para>
    <para>
      Note that this version of <command>modprobe</command> 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
      <citerefentry>
	<refentrytitle>dmesg</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>.
    </para>
    <para>
      <command>modprobe</command> expects an up-to-date
      <filename>modules.dep</filename> file, as generated by
      <command>depmod</command> (see <citerefentry>
      <refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>).  This file lists what other modules each
      module needs (if any), and <command>modprobe</command> uses this
      to add or remove these dependencies automatically.  See
      <citerefentry>
      <refentrytitle>modules.dep</refentrytitle><manvolnum>5</manvolnum>
      </citerefentry>).
    </para>
    <para>
      If any arguments are given after the
      <replaceable>modulename</replaceable>, they are passed to the
      kernel (in addition to any options listed in the configuration
      file).
    </para>
  </refsect1>
  <refsect1>
    <title>OPTIONS</title>
    <variablelist>
      <varlistentry>
        <term><option>-v</option> <option>--verbose</option>
        </term>
        <listitem>
          <para>
	    Print messages about what the program is doing.  Usually
	    <command>modprobe</command> only prints messages if
	    something goes wrong.
	  </para>
          <para>
	    This option is passed through <command>install</command>
	    or <command>remove</command> commands to other
	    <command>modprobe</command> commands in the
	    MODPROBE_OPTIONS environment variable.
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-C</option> <option>--config</option>
        </term>
        <listitem>
          <para>This option overrides the default configuration directory/file
		(<filename>/etc/modprobe.d</filename> or 
		<filename>/etc/modprobe.conf</filename>).
	  </para>
          <para>
	    This option is passed through <command>install</command>
	    or <command>remove</command> commands to other
	    <command>modprobe</command> commands in the
	    MODPROBE_OPTIONS environment variable.
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-c</option> <option>--showconfig</option>
        </term>
        <listitem>
          <para>Dump out the effective configuration from the config directory and exit.
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-n</option> <option>--dry-run</option>
        <option>--show</option>
        </term>
        <listitem>
          <para>This option does everything but actually insert or
		delete the modules (or run the install or remove
		commands).  Combined with <option>-v</option>, it is
		useful for debugging problems.
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-i</option> <option>--ignore-install</option> <option>--ignore-remove</option>
        </term>
        <listitem>
          <para>This option causes <command>modprobe</command> to
		ignore <command>install</command> and
		<command>remove</command> 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).
		See <citerefentry>
<refentrytitle>modprobe.conf</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>.
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-q</option> <option>--quiet</option>
        </term>
        <listitem>
          <para>
	    Normally <command>modprobe</command> will report an error
	    if you try to remove or insert a module it can't find (and
	    isn't an alias or
	    <command>install</command>/<command>remove</command>
	    command).  With this flag, <command>modprobe</command>
	    will simply ignore any bogus names (the kernel uses this
	    to opportunistically probe for modules which might exist).
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-r</option> <option>--remove</option>
        </term>
        <listitem>
          <para>
	    This option causes <command>modprobe</command> to remove
	    rather than insert a module.  If the modules it depends on
	    are also unused, <command>modprobe</command> 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).
	  </para>
	  <para>
	    There is usually no reason to remove modules, but some
	    buggy modules require it.  Your kernel may not support
	    removal of modules.
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-V</option> <option>--version</option>
        </term>
        <listitem>
          <para>Show version of program and exit.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-f</option> <option>--force</option>
        </term>
        <listitem>
          <para>
	    Try to strip any versioning information from the module
	    which might otherwise stop it from loading: this is the
	    same as using both <option>--force-vermagic</option> and
	    <option>--force-modversion</option>.  Naturally, these
	    checks are there for your protection, so using this option
	    is dangerous.
	 </para>
	 <para>
	    This applies to any modules inserted: both the module (or
	    alias) on the command line and any modules it on which it depends.
	 </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--force-vermagic</option>
        </term>
        <listitem>
          <para>
	    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't match, you can use this option to
	    remove it.  Naturally, this check is there for your
	    protection, so this using option is dangerous.
	 </para>
	 <para>
	    This applies to any modules inserted: both the module (or
	    alias) on the command line and any modules on which it depends.
	 </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--force-modversion</option>
        </term>
        <listitem>
          <para>
	    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.
	 </para>
	 <para>
	    This applies any modules inserted: both the module (or
	    alias) on the command line and any modules on which it depends.
	 </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-l</option> <option>--list</option>
        </term>
        <listitem>
          <para>List all modules matching the given wildcard (or "*"
		if no wildcard is given).  This option is provided for
		backwards compatibility: see
	    <citerefentry>
	      <refentrytitle>find</refentrytitle><manvolnum>1</manvolnum>
	    </citerefentry> and
	    <citerefentry>
	      <refentrytitle>basename</refentrytitle><manvolnum>1</manvolnum>
	    </citerefentry> for a more flexible alternative.
	 </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-a</option> <option>--all</option>
        </term>
        <listitem>
          <para>Insert all module names on the command line.
	 </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-t</option> <option>--type</option>
        </term>
        <listitem>
          <para>Restrict <option>-l</option> to modules
		in directories matching the
		<replaceable>dirname</replaceable> given.  This option
		is provided for backwards compatibility: see
	    <citerefentry>
	      <refentrytitle>find</refentrytitle><manvolnum>1</manvolnum>
	    </citerefentry>
	    and
	    <citerefentry>
	      <refentrytitle>basename</refentrytitle><manvolnum>1</manvolnum>
	    </citerefentry> for a more flexible alternative.
	 </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-s</option> <option>--syslog</option>
        </term>
        <listitem>
          <para>
	    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.
	  </para>
          <para>
	    This option is passed through <command>install</command>
	    or <command>remove</command> commands to other
	    <command>modprobe</command> commands in the
	    MODPROBE_OPTIONS environment variable.
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-S</option> <option>--set-version</option>
        </term>
        <listitem>
          <para>
	    Set the kernel version, rather than using
	    <citerefentry><refentrytitle>uname</refentrytitle><manvolnum>2</manvolnum></citerefentry> to decide on the kernel version (which dictates where to
	    find the modules).
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--show-depends</option>
        </term>
        <listitem>
          <para>
	    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".  Install commands which apply are shown prefixed by
	    "install".  It does not run any of the install commands.  Note that
	    <citerefentry><refentrytitle>modinfo</refentrytitle><manvolnum>8</manvolnum></citerefentry>
	    can be used to extract dependencies of a module from the
	    module itself, but knows nothing of aliases or install commands.
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-o</option> <option>--name</option>
        </term>
        <listitem>
          <para>
	    This option tries to rename the module which is being
	    inserted into the kernel.  Some testing modules can
	    usefully be inserted multiple times, but the kernel
	    refuses to have two modules of the same name.  Normally,
	    modules should not require multiple insertions, as that
	    would make them useless if there were no module support.
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--first-time</option>
        </term>
        <listitem>
          <para>
	    Normally, <command>modprobe</command> will succeed (and do
	    nothing) if told to insert a module which is already
	    present or to remove a module which isn't present.  This is
	    ideal for
	    simple scripts; however, more complicated scripts often
	    want to know whether <command>modprobe</command> really
	    did something: this option makes modprobe fail for that
	    case.
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--dump-modversions</option>
        </term>
        <listitem>
          <para>
            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.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-b</option> <option>--use-blacklist</option>
        </term>
        <listitem>
	  <para>
	    This option causes <command>modprobe</command> to apply the
	    <command>blacklist</command> commands in the configuration files (if
	    any) to module names as well.  It is usually used by <citerefentry>
	    <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
	    </citerefentry>.
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-d</option> <option>--dirname</option>
        </term>
        <listitem>
          <para>
            Directory where modules can be found, <filename>/lib/modules/<replaceable>RELEASE</replaceable></filename>
            by default.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>
  <refsect1>
    <title>ENVIRONMENT</title>
    <para>
      The MODPROBE_OPTIONS environment variable can also be used to
      pass arguments to <command>modprobe</command>.
    </para>
  </refsect1>
  <refsect1>
    <title>COPYRIGHT</title>
    <para>
      This manual page Copyright 2002, Rusty Russell, IBM Corporation.
    </para>
  </refsect1>
  <refsect1>
    <title>SEE ALSO</title>
    <para>
      <citerefentry>
	<refentrytitle>modprobe.conf</refentrytitle><manvolnum>5</manvolnum>
      </citerefentry>,
      <citerefentry>
	<refentrytitle>lsmod</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>,
      <citerefentry>
	<refentrytitle>modinfo</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>
    </para>
  </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->