| 1 |
<?xml version="1.0"?> |
| 2 |
<!--*-nxml-*--> |
| 3 |
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
| 4 |
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> |
| 5 |
<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
| 6 |
<refentry id="modules-load.d" conditional='HAVE_KMOD' |
| 7 |
xmlns:xi="http://www.w3.org/2001/XInclude"> |
| 8 |
|
| 9 |
<refentryinfo> |
| 10 |
<title>modules-load.d</title> |
| 11 |
<productname>systemd</productname> |
| 12 |
</refentryinfo> |
| 13 |
|
| 14 |
<refmeta> |
| 15 |
<refentrytitle>modules-load.d</refentrytitle> |
| 16 |
<manvolnum>5</manvolnum> |
| 17 |
</refmeta> |
| 18 |
|
| 19 |
<refnamediv> |
| 20 |
<refname>modules-load.d</refname> |
| 21 |
<refpurpose>Configure kernel modules to load at boot</refpurpose> |
| 22 |
</refnamediv> |
| 23 |
|
| 24 |
<refsynopsisdiv> |
| 25 |
<para><simplelist> |
| 26 |
<member><filename>/etc/modules-load.d/*.conf</filename></member> |
| 27 |
<member><filename>/run/modules-load.d/*.conf</filename></member> |
| 28 |
<member><filename>/usr/local/lib/modules-load.d/*.conf</filename></member> |
| 29 |
<member><filename>/usr/lib/modules-load.d/*.conf</filename></member> |
| 30 |
</simplelist></para> |
| 31 |
</refsynopsisdiv> |
| 32 |
|
| 33 |
<refsect1> |
| 34 |
<title>Description</title> |
| 35 |
|
| 36 |
<para><citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
| 37 |
reads files from the above directories which contain kernel |
| 38 |
modules to load during boot in a static list. Each configuration |
| 39 |
file is named in the style of |
| 40 |
<filename>/etc/modules-load.d/<replaceable>program</replaceable>.conf</filename>. |
| 41 |
Note that it is usually a better idea to rely on the automatic |
| 42 |
module loading by PCI IDs, USB IDs, DMI IDs or similar triggers |
| 43 |
encoded in the kernel modules themselves instead of static |
| 44 |
configuration like this. In fact, most modern kernel modules are |
| 45 |
prepared for automatic loading already.</para> |
| 46 |
</refsect1> |
| 47 |
|
| 48 |
<refsect1> |
| 49 |
<title>Configuration Format</title> |
| 50 |
|
| 51 |
<para>The configuration files should simply contain a list of |
| 52 |
kernel module names to load, separated by newlines. Empty lines |
| 53 |
and lines whose first non-whitespace character is # or ; are |
| 54 |
ignored.</para> |
| 55 |
</refsect1> |
| 56 |
|
| 57 |
<xi:include href="standard-conf.xml" xpointer="confd" /> |
| 58 |
|
| 59 |
<refsect1> |
| 60 |
<title>Example</title> |
| 61 |
<example> |
| 62 |
<title>/etc/modules-load.d/virtio-net.conf example:</title> |
| 63 |
|
| 64 |
<programlisting># Load virtio-net.ko at boot |
| 65 |
virtio-net</programlisting> |
| 66 |
</example> |
| 67 |
</refsect1> |
| 68 |
|
| 69 |
<refsect1> |
| 70 |
<title>See Also</title> |
| 71 |
<para><simplelist type="inline"> |
| 72 |
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 73 |
<member><citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> |
| 74 |
<member><citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 75 |
<member><citerefentry project='man-pages'><refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> |
| 76 |
</simplelist></para> |
| 77 |
</refsect1> |
| 78 |
|
| 79 |
</refentry> |