modules-load.d.html 5.22 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>modules-load.d</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
    a.headerlink {
      color: #c60f0f;
      font-size: 0.8em;
      padding: 0 4px 0 4px;
      text-decoration: none;
      visibility: hidden;
    }

    a.headerlink:hover {
      background-color: #c60f0f;
      color: white;
    }

    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
      visibility: visible;
    }
  </style><a href="index.html">Index </a>·
  <a href="systemd.directives.html">Directives </a>·
  <a href="../python-systemd/index.html">Python </a>·
  <a href="../libudev/index.html">libudev </a>·
22
  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="modules-load.d"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>modules-load.d — Configure kernel modules to load at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/modules-load.d/*.conf</code></p><p><code class="filename">/run/modules-load.d/*.conf</code></p><p><code class="filename">/usr/lib/modules-load.d/*.conf</code></p></div><div class="refsect1"><a name="idm214196413376"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a>
23 24 25 26 27 28 29 30 31
                reads files from the above directories which contain
                kernel modules to load during boot in a static list.
                Each configuration file is named in the style of
                <code class="filename">/etc/modules-load.d/<em class="replaceable"><code>program</code></em>.conf</code>. Note
                that it is usually a better idea to rely on the
                automatic module loading by PCI IDs, USB IDs, DMI IDs
                or similar triggers encoded in the kernel modules
                themselves instead of static configuration like
                this. In fact, most modern kernel modules are prepared
32
                for automatic loading already.</p></div><div class="refsect1"><a name="idm214196437360"></a><h2 id="Configuration Format">Configuration Format<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Format"></a></h2><p>The configuration files should simply contain a
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
                list of kernel module names to load, separated by
                newlines. Empty lines and lines whose first
                non-whitespace character is # or ; are ignored.</p><p>Each configuration file shall be named in the
                style of <code class="filename"><em class="replaceable"><code>program</code></em>.conf</code>.
                Files in <code class="filename">/etc/</code> override files
                with the same name in <code class="filename">/usr/lib/</code>
                and <code class="filename">/run/</code>. Files in
                <code class="filename">/run/</code> override files with the
                same name in <code class="filename">/usr/lib/</code>. Packages
                should install their configuration files in
                <code class="filename">/usr/lib/</code>, files in
                <code class="filename">/etc/</code> are reserved for the local
                administrator, who may use this logic to override the
                configuration files installed from vendor
                packages.</p><p>If the administrator wants to disable a
48
                configuration file supplied by the vendor, the
49 50 51
                recommended way is to place a symlink to
                <code class="filename">/dev/null</code> in
                <code class="filename">/etc/modules-load.d/</code> bearing the
52 53
                same filename.</p></div><div class="refsect1"><a name="idm214192640896"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example"></a></h2><div class="example"><a name="idm214192640224"></a><p class="title"><b>Example 1. /etc/modules-load.d/virtio-net.conf example:</b></p><div class="example-contents"><pre class="programlisting"># Load virtio-net.ko at boot
virtio-net</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214192638576"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
54 55 56 57 58
                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                        <a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a>,
                        <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>,
                        <a href="modprobe.html"><span class="citerefentry"><span class="refentrytitle">modprobe</span>(8)</span></a>
                </p></div></div></body></html>