1MODULES-LOAD.D(5) modules-load.d MODULES-LOAD.D(5)
2
3
4
6 modules-load.d - Configure kernel modules to load at boot
7
9 /etc/modules-load.d/*.conf
10
11 /run/modules-load.d/*.conf
12
13 /usr/lib/modules-load.d/*.conf
14
16 systemd-modules-load.service(8) reads files from the above directories
17 which contain kernel modules to load during boot in a static list. Each
18 configuration file is named in the style of
19 /etc/modules-load.d/program.conf. Note that it is usually a better idea
20 to rely on the automatic module loading by PCI IDs, USB IDs, DMI IDs or
21 similar triggers encoded in the kernel modules themselves instead of
22 static configuration like this. In fact, most modern kernel modules are
23 prepared for automatic loading already.
24
26 The configuration files should simply contain a list of kernel module
27 names to load, separated by newlines. Empty lines and lines whose first
28 non-whitespace character is # or ; are ignored.
29
31 Configuration files are read from directories in /etc/, /run/,
32 /usr/local/lib/, and /usr/lib/, in order of precedence, as listed in
33 the SYNOPSIS section above. Files must have the ".conf" extension.
34 Files in /etc/ override files with the same name in /run/,
35 /usr/local/lib/, and /usr/lib/. Files in /run/ override files with the
36 same name under /usr/.
37
38 All configuration files are sorted by their filename in lexicographic
39 order, regardless of which of the directories they reside in. If
40 multiple files specify the same option, the entry in the file with the
41 lexicographically latest name will take precedence. Thus, the
42 configuration in a certain file may either be replaced completely (by
43 placing a file with the same name in a directory with higher priority),
44 or individual settings might be changed (by specifying additional
45 settings in a file with a different name that is ordered later).
46
47 Packages should install their configuration files in /usr/lib/
48 (distribution packages) or /usr/local/lib/ (local installs). Files in
49 /etc/ are reserved for the local administrator, who may use this logic
50 to override the configuration files installed by vendor packages. It is
51 recommended to prefix all filenames with a two-digit number and a dash,
52 to simplify the ordering of the files.
53
54 If the administrator wants to disable a configuration file supplied by
55 the vendor, the recommended way is to place a symlink to /dev/null in
56 the configuration directory in /etc/, with the same filename as the
57 vendor configuration file. If the vendor configuration file is included
58 in the initrd image, the image has to be regenerated.
59
61 Example 1. /etc/modules-load.d/virtio-net.conf example:
62
63 # Load virtio-net.ko at boot
64 virtio-net
65
67 systemd(1), systemd-modules-load.service(8), systemd-delta(1),
68 modprobe(8)
69
70
71
72systemd 254 MODULES-LOAD.D(5)