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