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