]>
Commit | Line | Data |
---|---|---|
a7c64469 LP |
1 | <?xml version="1.0"?> |
2 | <!--*-nxml-*--> | |
3 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | |
4 | <!-- | |
5 | This file is part of systemd. | |
6 | ||
c91faef3 | 7 | Copyright 2011 Lennart Poettering |
a7c64469 LP |
8 | |
9 | systemd is free software; you can redistribute it and/or modify it | |
5430f7f2 LP |
10 | under the terms of the GNU Lesser General Public License as published by |
11 | the Free Software Foundation; either version 2.1 of the License, or | |
a7c64469 LP |
12 | (at your option) any later version. |
13 | ||
14 | systemd is distributed in the hope that it will be useful, but | |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
5430f7f2 | 17 | Lesser General Public License for more details. |
a7c64469 | 18 | |
5430f7f2 | 19 | You should have received a copy of the GNU Lesser General Public License |
a7c64469 LP |
20 | along with systemd; If not, see <http://www.gnu.org/licenses/>. |
21 | --> | |
22 | <refentry id="modules-load.d"> | |
23 | ||
24 | <refentryinfo> | |
25 | <title>modules-load.d</title> | |
26 | <productname>systemd</productname> | |
27 | ||
28 | <authorgroup> | |
29 | <author> | |
30 | <contrib>Developer</contrib> | |
31 | <firstname>Lennart</firstname> | |
32 | <surname>Poettering</surname> | |
33 | <email>lennart@poettering.net</email> | |
34 | </author> | |
35 | </authorgroup> | |
36 | </refentryinfo> | |
37 | ||
38 | <refmeta> | |
39 | <refentrytitle>modules-load.d</refentrytitle> | |
40 | <manvolnum>5</manvolnum> | |
41 | </refmeta> | |
42 | ||
43 | <refnamediv> | |
44 | <refname>modules-load.d</refname> | |
45 | <refpurpose>Configure kernel modules to load at boot</refpurpose> | |
46 | </refnamediv> | |
47 | ||
48 | <refsynopsisdiv> | |
49 | <para><filename>/etc/modules-load.d/*.conf</filename></para> | |
db1413d7 | 50 | <para><filename>/run/modules-load.d/*.conf</filename></para> |
fc1a2e06 | 51 | <para><filename>/usr/lib/modules-load.d/*.conf</filename></para> |
a7c64469 LP |
52 | </refsynopsisdiv> |
53 | ||
54 | <refsect1> | |
55 | <title>Description</title> | |
56 | ||
0e25e94e KS |
57 | <para><citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
58 | reads files from the above directories which contain | |
59 | kernel modules to load during boot in a static list. | |
60 | Each configuration file is named in the style of | |
61 | <filename>/etc/modules-load.d/<program>.conf</filename>. Note | |
62 | that it is usually a better idea to rely on the | |
63 | automatic module loading by PCI IDs, USB IDs, DMI IDs | |
64 | or similar triggers encoded in the kernel modules | |
65 | themselves instead of static configuration like | |
66 | this. In fact, most modern kernel modules are prepared | |
67 | for automatic loading already.</para> | |
a7c64469 LP |
68 | </refsect1> |
69 | ||
70 | <refsect1> | |
0e25e94e | 71 | <title>Configuration Format</title> |
a7c64469 | 72 | |
0e25e94e KS |
73 | <para>The configuration files should simply contain a |
74 | list of kernel module names to load, separated by | |
75 | newlines. Empty lines and lines whose first | |
76 | non-whitespace character is # or ; are ignored.</para> | |
a7c64469 | 77 | |
9393a877 LP |
78 | <para>Each configuration file shall be named in the |
79 | style of <filename><program>.conf</filename>. | |
80 | Files in <filename>/etc/</filename> override files | |
81 | with the same name in <filename>/usr/lib/</filename> | |
82 | and <filename>/run/</filename>. Files in | |
83 | <filename>/run/</filename> override files with the | |
84 | same name in <filename>/usr/lib/</filename>. Packages | |
85 | should install their configuration files in | |
86 | <filename>/usr/lib/</filename>, files in | |
87 | <filename>/etc/</filename> are reserved for the local | |
88 | administrator, who may use this logic to override the | |
89 | configuration files installed from vendor | |
90 | packages.</para> | |
91 | ||
92 | <para>If the administrator wants to disable a | |
93 | configuration file supplied by the vendor the | |
94 | recommended way is to place a symlink to | |
95 | <filename>/dev/null</filename> in | |
96 | <filename>/etc/modules-load.d/</filename> bearing the | |
97 | same file name.</para> | |
a7c64469 LP |
98 | </refsect1> |
99 | ||
100 | <refsect1> | |
101 | <title>Example</title> | |
102 | <example> | |
7602c46f | 103 | <title>/etc/modules-load.d/virtio-net.conf example:</title> |
a7c64469 | 104 | |
7602c46f LP |
105 | <programlisting># Load virtio-net.ko at boot |
106 | virtio-net</programlisting> | |
a7c64469 LP |
107 | </example> |
108 | </refsect1> | |
109 | ||
110 | <refsect1> | |
111 | <title>See Also</title> | |
112 | <para> | |
113 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
9393a877 LP |
114 | <citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
115 | <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
a7c64469 LP |
116 | <citerefentry><refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
117 | </para> | |
118 | </refsect1> | |
119 | ||
120 | </refentry> |