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.2/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><filename>/etc/modules-load.d/*.conf</filename></para>
26    <para><filename>/run/modules-load.d/*.conf</filename></para>
27    <para><filename>/usr/lib/modules-load.d/*.conf</filename></para>
28  </refsynopsisdiv>
29
30  <refsect1>
31    <title>Description</title>
32
33    <para><citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
34    reads files from the above directories which contain kernel
35    modules to load during boot in a static list. Each configuration
36    file is named in the style of
37    <filename>/etc/modules-load.d/<replaceable>program</replaceable>.conf</filename>.
38    Note that it is usually a better idea to rely on the automatic
39    module loading by PCI IDs, USB IDs, DMI IDs or similar triggers
40    encoded in the kernel modules themselves instead of static
41    configuration like this. In fact, most modern kernel modules are
42    prepared for automatic loading already.</para>
43  </refsect1>
44
45  <refsect1>
46    <title>Configuration Format</title>
47
48    <para>The configuration files should simply contain a list of
49    kernel module names to load, separated by newlines. Empty lines
50    and lines whose first non-whitespace character is # or ; are
51    ignored.</para>
52  </refsect1>
53
54  <xi:include href="standard-conf.xml" xpointer="confd" />
55
56  <refsect1>
57    <title>Example</title>
58    <example>
59      <title>/etc/modules-load.d/virtio-net.conf example:</title>
60
61      <programlisting># Load virtio-net.ko at boot
62virtio-net</programlisting>
63    </example>
64  </refsect1>
65
66  <refsect1>
67    <title>See Also</title>
68    <para>
69      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
70      <citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
71      <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
72      <citerefentry project='man-pages'><refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum></citerefentry>
73    </para>
74  </refsect1>
75
76</refentry>
77