1MODPROBE.CONF(5) MODPROBE.CONF(5)
2
3
4
6 modprobe.conf, modprobe.d - Configuration file/directory for modprobe
7
9 Because the modprobe command can add or remove extra more than one mod‐
10 ule, due to module dependencies, we need a method of specifying what
11 options are to be used with those modules. /etc/modprobe.conf (or, if
12 that does not exist, all files under the /etc/modprobe.d directory)
13 specifies those options, as required. It can also be used to create
14 convenient aliases: alternate names for a module. Finally, it can
15 override the normal modprobe behavior altogether, for those with very
16 special requirements (such as inserting more than one module).
17
18 Note that module and alias names (like other module names) can have -
19 or _ in them: both are interchangable throughout all the module com‐
20 mands.
21
22 The format of modprobe.conf and files under modprobe.d is simple: one
23 command per line, with blank lines and lines starting with # ignored
24 (useful for adding comments). A \ at the end of a line causes it to
25 continue on the next line, which makes the file a bit neater.
26
27 The syntax is a simplification of modules.conf, used in 2.4 kernels and
28 earlier.
29
31 alias wildcard modulename
32 This allows you to give alternate names for a module. For exam‐
33 ple: "alias my-mod really_long_modulename" means you can use
34 "modprobe my-mod" instead of "modprobe really_long_modulename".
35 You can also use shell-style wildcards, so "alias my-mod*
36 really_long_modulename" means that "modprobe my-mod-something"
37 has the same effect. You can't have aliases to other aliases
38 (that way lies madness), but aliases can have options, which
39 will be added to any other options.
40
41 Note that modules can also contain their own aliases, which you
42 can see using modinfo. These aliases are used as a last resort
43 (ie. if there is no real module, install, remove, or alias com‐
44 mand in the configuration).
45
46 options modulename option...
47 This command allows you to add options to the module modulename
48 (which might be an alias) every time it is inserted into the
49 kernel: whether directly (using modprobe modulename, or because
50 the module being inserted depends on this module.
51
52 All options are added together: they can come from an option for
53 the module itself, for an alias, and on the command line.
54
55 install modulename command...
56 This is the most powerful primitive in modprobe.conf: it tells
57 modprobe to run your command instead of inserting the module in
58 the kernel as normal. The command can be any shell command:
59 this allows you to do any kind of complex processing you might
60 wish. For example, if the module "fred" worked better with the
61 module "barney" already installed (but it didn't depend on it,
62 so modprobe won't automatically load it), you could say "install
63 fred /sbin/modprobe barney; /sbin/modprobe --ignore-install
64 fred", which would do what you wanted. Note the --ignore-
65 install, which stops the second modprobe from re-running the
66 same install command. See also remove below.
67
68 You can also use install to make up modules which don't other‐
69 wise exist. For example: "install probe-ethernet /sbin/modprobe
70 e100 || /sbin/modprobe eepro100", which will try first the e100
71 driver, then the eepro100 driver, when you do "modprobe probe-
72 ethernet".
73
74 If you use the string "$CMDLINE_OPTS" in the command, it will be
75 replaced by any options specified on the modprobe command line.
76 This can be useful because users expect "modprobe fred opt=1" to
77 pass the "opt=1" arg to the module, even if there's an install
78 command in the configuration file. So our above example becomes
79 "install fred /sbin/modprobe barney; /sbin/modprobe --ignore-
80 install fred $CMDLINE_OPTS"
81
82 remove modulename command...
83 This is similar to the install command above, except it is
84 invoked when "modprobe -r" is run. The removal counterparts to
85 the two examples above would be: "remove fred /sbin/modprobe -r
86 --ignore-remove fred && /sbin/modprobe -r barney", and "remove
87 probe-ethernet /sbin/modprobe -r eepro100 || /sbin/modprobe -r
88 e100".
89
90 include filename
91 Using this command, you can include other configuration files,
92 or whole directories, which is occasionally useful. Note that
93 aliases in the included file will override aliases previously
94 declared in the current file.
95
96 blacklist modulename
97 Modules can contain their own aliases: usually these are aliases
98 describing the devices they support, such as "pci:123...".
99 These "internal" aliases can be overridden by normal "alias"
100 keywords, but there are cases where two or more modules both
101 support the same devices, or a module invalidly claims to sup‐
102 port a device: the blacklist keyword indicates that all of that
103 particular module's internal aliases are to be ignored.
104
106 There is a generate_modprobe.conf program which should do a reasonable
107 job of generating modprobe.conf from your current (2.4 or 2.2) modules
108 setup.
109
110 Although the syntax is similar to the older /etc/modules.conf, there
111 are many features missing. There are two reasons for this: firstly,
112 install and remove commands can do just about anything, and secondly,
113 the module-init-tools modprobe is designed to be simple enough that it
114 can be easily replaced.
115
116 With the complexity of actual module insertion reduced to three system
117 calls (open, read, init_module), and the modules.dep file being simple
118 and open, producing a more powerful modprobe variant can be done inde‐
119 pendently if there is a need.
120
122 This manual page Copyright 2004, Rusty Russell, IBM Corporation.
123
125 modprobe(8), modules.dep(5)
126
127
128
129 22 March 2007 MODPROBE.CONF(5)