1<?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.de.marchi@gmail.com</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 configuration files in the 84 <filename>/etc/modprobe.d</filename> directory 85 (see <citerefentry> 86 <refentrytitle>modprobe.d</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 <module>.<option> and blacklists in the form of 90 modprobe.blacklist=<module>. 91 </para> 92 <para> 93 Note that unlike in 2.4 series Linux kernels (which are not supported 94 by this tool) this version of <command>modprobe</command> does not 95 do anything to the module itself: the work of resolving symbols 96 and understanding parameters is done inside the kernel. So 97 module failure is sometimes accompanied by a kernel message: see 98 <citerefentry> 99 <refentrytitle>dmesg</refentrytitle><manvolnum>8</manvolnum> 100 </citerefentry>. 101 </para> 102 <para> 103 <command>modprobe</command> expects an up-to-date 104 <filename>modules.dep.bin</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> 124 <option>-a</option> 125 </term> 126 <term> 127 <option>--all</option> 128 </term> 129 <listitem> 130 <para>Insert all module names on the command line.</para> 131 </listitem> 132 </varlistentry> 133 <varlistentry> 134 <term> 135 <option>-b</option> 136 </term> 137 <term> 138 <option>--use-blacklist</option> 139 </term> 140 <listitem> 141 <para> 142 This option causes <command>modprobe</command> to apply the 143 <command>blacklist</command> commands in the configuration files 144 (if any) to module names as well. It is usually used by 145 <citerefentry> 146 <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum> 147 </citerefentry>. 148 </para> 149 </listitem> 150 </varlistentry> 151 <varlistentry> 152 <term> 153 <option>-C</option> 154 </term> 155 <term> 156 <option>--config</option> 157 </term> 158 <listitem> 159 <para>This option overrides the default configuration directory 160 (<filename>/etc/modprobe.d</filename>). 161 </para> 162 <para> 163 This option is passed through <command>install</command> 164 or <command>remove</command> commands to other 165 <command>modprobe</command> commands in the 166 MODPROBE_OPTIONS environment variable. 167 </para> 168 </listitem> 169 </varlistentry> 170 <varlistentry> 171 <term> 172 <option>-c</option> 173 </term> 174 <term> 175 <option>--showconfig</option> 176 </term> 177 <listitem> 178 <para> 179 Dump out the effective configuration from the config directory and 180 exit. 181 </para> 182 </listitem> 183 </varlistentry> 184 <varlistentry> 185 <term> 186 <option>--dump-modversions</option> 187 </term> 188 <listitem> 189 <para> 190 Print out a list of module versioning information required by a 191 module. This option is commonly used by distributions in order to 192 package up a Linux kernel module using module versioning deps. 193 </para> 194 </listitem> 195 </varlistentry> 196 <varlistentry> 197 <term> 198 <option>-d</option> 199 </term> 200 <term> 201 <option>--dirname</option> 202 </term> 203 <listitem> 204 <para> 205 Root directory for modules, <filename>/</filename> by default. 206 </para> 207 </listitem> 208 </varlistentry> 209 <varlistentry> 210 <term> 211 <option>--first-time</option> 212 </term> 213 <listitem> 214 <para> 215 Normally, <command>modprobe</command> will succeed (and do 216 nothing) if told to insert a module which is already 217 present or to remove a module which isn't present. This is 218 ideal for simple scripts; however, more complicated scripts often 219 want to know whether <command>modprobe</command> really 220 did something: this option makes modprobe fail in the 221 case that it actually didn't do anything. 222 </para> 223 </listitem> 224 </varlistentry> 225 <varlistentry> 226 <term> 227 <option>--force-vermagic</option> 228 </term> 229 <listitem> 230 <para> 231 Every module contains a small string containing important 232 information, such as the kernel and compiler versions. If a module 233 fails to load and the kernel complains that the "version magic" 234 doesn't match, you can use this option to remove it. Naturally, 235 this check is there for your protection, so using this option is 236 dangerous unless you know what you're doing. 237 </para> 238 <para> 239 This applies to any modules inserted: both the module (or alias) on 240 the command line and any modules on which it depends. 241 </para> 242 </listitem> 243 </varlistentry> 244 <varlistentry> 245 <term> 246 <option>--force-modversion</option> 247 </term> 248 <listitem> 249 <para> 250 When modules are compiled with CONFIG_MODVERSIONS set, a section 251 detailing the versions of every interfaced used by (or supplied by) 252 the module is created. If a module fails to load and the kernel 253 complains that the module disagrees about a version of some 254 interface, you can use "--force-modversion" to remove the version 255 information altogether. Naturally, this check is there for your 256 protection, so using this option is dangerous unless you know what 257 you're doing. 258 </para> 259 <para> 260 This applies any modules inserted: both the module (or alias) on 261 the command line and any modules on which it depends. 262 </para> 263 </listitem> 264 </varlistentry> 265 <varlistentry> 266 <term> 267 <option>-f</option> 268 </term> 269 <term> 270 <option>--force</option> 271 </term> 272 <listitem> 273 <para> 274 Try to strip any versioning information from the module which might 275 otherwise stop it from loading: this is the same as using both 276 <option>--force-vermagic</option> and 277 <option>--force-modversion</option>. Naturally, these checks are 278 there for your protection, so using this option is dangerous unless 279 you know what you are doing. 280 </para> 281 <para> 282 This applies to any modules inserted: both the module (or alias) on 283 the command line and any modules it on which it depends. 284 </para> 285 </listitem> 286 </varlistentry> 287 <varlistentry> 288 <term> 289 <option>-i</option> 290 </term> 291 <term> 292 <option>--ignore-install</option> 293 </term> 294 <term> 295 <option>--ignore-remove</option> 296 </term> 297 <listitem> 298 <para> 299 This option causes <command>modprobe</command> to ignore 300 <command>install</command> and <command>remove</command> commands 301 in the configuration file (if any) for the module specified on the 302 command line (any dependent modules are still subject to commands 303 set for them in the configuration file). Both 304 <command>install</command> and <command>remove</command> commands 305 will currently be ignored when this option is used regardless of 306 whether the request was more specifically made with only one or 307 other (and not both) of <option>--ignore-install</option> or 308 <option>--ignore-remove</option>. See <citerefentry> 309 <refentrytitle>modprobe.d</refentrytitle><manvolnum>5</manvolnum> 310 </citerefentry>. 311 </para> 312 </listitem> 313 </varlistentry> 314 <varlistentry> 315 <term> 316 <option>-n</option> 317 </term> 318 <term> 319 <option>--dry-run</option> 320 </term> 321 <term> 322 <option>--show</option> 323 </term> 324 <listitem> 325 <para> 326 This option does everything but actually insert or delete the 327 modules (or run the install or remove commands). Combined with 328 <option>-v</option>, it is useful for debugging problems. For 329 historical reasons both <option>--dry-run</option> and 330 <option>--show</option> actually mean the same thing and are 331 interchangeable. 332 </para> 333 </listitem> 334 </varlistentry> 335 <varlistentry> 336 <term> 337 <option>-q</option> 338 </term> 339 <term> 340 <option>--quiet</option> 341 </term> 342 <listitem> 343 <para> 344 With this flag, <command>modprobe</command> won't print an error 345 message if you try to remove or insert a module it can't find (and 346 isn't an alias or 347 <command>install</command>/<command>remove</command> command). 348 However, it will still return with a non-zero exit status. The 349 kernel uses this to opportunistically probe for modules which might 350 exist using request_module. 351 </para> 352 </listitem> 353 </varlistentry> 354 <varlistentry> 355 <term> 356 <option>-R</option> 357 </term> 358 <term> 359 <option>--resolve-alias</option> 360 </term> 361 <listitem> 362 <para> 363 Print all module names matching an alias. This can be useful for 364 debugging module alias problems. 365 </para> 366 </listitem> 367 </varlistentry> 368 <varlistentry> 369 <term> 370 <option>-r</option> 371 </term> 372 <term> 373 <option>--remove</option> 374 </term> 375 <listitem> 376 <para> 377 This option causes <command>modprobe</command> to remove rather 378 than insert a module. If the modules it depends on are also 379 unused, <command>modprobe</command> will try to remove them too. 380 Unlike insertion, more than one module can be specified on the 381 command line (it does not make sense to specify module parameters 382 when removing modules). 383 </para> 384 <para> 385 There is usually no reason to remove modules, but some buggy 386 modules require it. Your distribution kernel may not have been 387 built to support removal of modules at all. 388 </para> 389 </listitem> 390 </varlistentry> 391 <varlistentry> 392 <term> 393 <option>-w</option> 394 </term> 395 <term> 396 <option>--wait=</option>TIMEOUT_MSEC 397 </term> 398 <listitem> 399 <para> 400 This option causes <command>modprobe -r</command> to continue trying to 401 remove a module if it fails due to the module being busy, i.e. its refcount 402 is not 0 at the time the call is made. Modprobe tries to remove the module 403 with an incremental sleep time between each tentative up until the maximum 404 wait time in milliseconds passed in this option. 405 </para> 406 </listitem> 407 </varlistentry> 408 <varlistentry> 409 <term> 410 <option>-S</option> 411 </term> 412 <term> 413 <option>--set-version</option> 414 </term> 415 <listitem> 416 <para> 417 Set the kernel version, rather than using 418 <citerefentry><refentrytitle>uname</refentrytitle><manvolnum>2</manvolnum></citerefentry> 419 to decide on the kernel version (which dictates where to find the 420 modules). 421 </para> 422 </listitem> 423 </varlistentry> 424 <varlistentry> 425 <term> 426 <option>--show-depends</option> 427 </term> 428 <listitem> 429 <para> 430 List the dependencies of a module (or alias), including the module 431 itself. This produces a (possibly empty) set of module filenames, 432 one per line, each starting with "insmod" and is typically used by 433 distributions to determine which modules to include when generating 434 initrd/initramfs images. <command>Install</command> commands which 435 apply are shown prefixed by "install". It does not run any of the 436 install commands. Note that 437 <citerefentry><refentrytitle>modinfo</refentrytitle><manvolnum>8</manvolnum></citerefentry> 438 can be used to extract dependencies of a module from the module 439 itself, but knows nothing of aliases or install commands. 440 </para> 441 </listitem> 442 </varlistentry> 443 <varlistentry> 444 <term> 445 <option>-s</option> 446 </term> 447 <term> 448 <option>--syslog</option> 449 </term> 450 <listitem> 451 <para> 452 This option causes any error messages to go through the syslog 453 mechanism (as LOG_DAEMON with level LOG_NOTICE) rather than to 454 standard error. This is also automatically enabled when stderr is 455 unavailable. 456 </para> 457 <para> 458 This option is passed through <command>install</command> or 459 <command>remove</command> commands to other 460 <command>modprobe</command> commands in the MODPROBE_OPTIONS 461 environment variable. 462 </para> 463 </listitem> 464 </varlistentry> 465 <varlistentry> 466 <term> 467 <option>-V</option> 468 </term> 469 <term> 470 <option>--version</option> 471 </term> 472 <listitem> 473 <para>Show version of program and exit.</para> 474 </listitem> 475 </varlistentry> 476 <varlistentry> 477 <term> 478 <option>-v</option> 479 </term> 480 <term> 481 <option>--verbose</option> 482 </term> 483 <listitem> 484 <para> 485 Print messages about what the program is doing. Usually 486 <command>modprobe</command> only prints messages if something goes 487 wrong. 488 </para> 489 <para> 490 This option is passed through <command>install</command> or 491 <command>remove</command> commands to other 492 <command>modprobe</command> commands in the MODPROBE_OPTIONS 493 environment variable. 494 </para> 495 </listitem> 496 </varlistentry> 497 </variablelist> 498 </refsect1> 499 500 <refsect1><title>ENVIRONMENT</title> 501 <para> 502 The MODPROBE_OPTIONS environment variable can also be used to pass 503 arguments to <command>modprobe</command>. 504 </para> 505 </refsect1> 506 507 <refsect1><title>COPYRIGHT</title> 508 <para> 509 This manual page originally Copyright 2002, Rusty Russell, IBM 510 Corporation. Maintained by Jon Masters and others. 511 </para> 512 </refsect1> 513 514 <refsect1> 515 <title>SEE ALSO</title> 516 <para> 517 <citerefentry> 518 <refentrytitle>modprobe.d</refentrytitle><manvolnum>5</manvolnum> 519 </citerefentry>, 520 <citerefentry> 521 <refentrytitle>insmod</refentrytitle><manvolnum>8</manvolnum> 522 </citerefentry>, 523 <citerefentry> 524 <refentrytitle>rmmod</refentrytitle><manvolnum>8</manvolnum> 525 </citerefentry>, 526 <citerefentry> 527 <refentrytitle>lsmod</refentrytitle><manvolnum>8</manvolnum> 528 </citerefentry>, 529 <citerefentry> 530 <refentrytitle>modinfo</refentrytitle><manvolnum>8</manvolnum> 531 </citerefentry> 532 <citerefentry> 533 <refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum> 534 </citerefentry> 535 </para> 536 </refsect1> 537</refentry> 538