1DRACUT.CONF(5) dracut DRACUT.CONF(5)
2
3
4
6 dracut.conf - configuration file(s) for dracut
7
9 /etc/dracut.conf /etc/dracut.conf.d/*.conf
10 /usr/lib/dracut/dracut.conf.d/*.conf
11
13 dracut.conf is loaded during the initialisation phase of dracut.
14 Command line parameter will override any values set here.
15
16 *.conf files are read from /usr/lib/dracut/dracut.conf.d and
17 /etc/dracut.conf.d. Files with the same name in /etc/dracut.conf.d will
18 replace files in /usr/lib/dracut/dracut.conf.d. The files are then read
19 in alphanumerical order and will override parameters set in
20 /etc/dracut.conf. Each line specifies an attribute and a value. A #
21 indicates the beginning of a comment; following characters, up to the
22 end of the line are not interpreted.
23
24 dracut command line options will override any values set here.
25
26 Configuration files must have the extension .conf; other extensions are
27 ignored.
28
29 add_dracutmodules+=" <dracut modules> "
30 Add a space-separated list of dracut modules to call when building
31 the initramfs. Modules are located in /usr/lib/dracut/modules.d.
32
33 force_add_dracutmodules+=" <dracut modules> "
34 Force to add a space-separated list of dracut modules to the
35 default set of modules, when host-only mode is specified. This
36 parameter can be specified multiple times.
37
38 omit_dracutmodules+=" <dracut modules> "
39 Omit a space-separated list of dracut modules to call when building
40 the initramfs. Modules are located in /usr/lib/dracut/modules.d.
41
42 dracutmodules+=" <dracut modules> "
43 Specify a space-separated list of dracut modules to call when
44 building the initramfs. Modules are located in
45 /usr/lib/dracut/modules.d. This option forces dracut to only
46 include the specified dracut modules. In most cases the
47 "add_dracutmodules" option is what you want to use.
48
49 add_drivers+=" <kernel modules> "
50 Specify a space-separated list of kernel modules to add to the
51 initramfs. The kernel modules have to be specified without the
52 ".ko" suffix.
53
54 force_drivers+=" <list of kernel modules> "
55 See add_drivers above. But in this case it is ensured that the
56 drivers are tried to be loaded early via modprobe.
57
58 omit_drivers+=" <kernel modules> "
59 Specify a space-separated list of kernel modules not to add to the
60 initramfs. The kernel modules have to be specified without the
61 ".ko" suffix.
62
63 drivers+=" <kernel modules> "
64 Specify a space-separated list of kernel modules to exclusively
65 include in the initramfs. The kernel modules have to be specified
66 without the ".ko" suffix.
67
68 filesystems+=" <filesystem names> "
69 Specify a space-separated list of kernel filesystem modules to
70 exclusively include in the generic initramfs.
71
72 drivers_dir="<kernel modules directory>"
73 Specify the directory where to look for kernel modules.
74
75 fw_dir+=" :<dir>[:<dir> ...] "
76 Specify additional colon-separated list of directories where to
77 look for firmware files.
78
79 libdirs+=" <dir>[ <dir> ...] "
80 Specify a space-separated list of directories where to look for
81 libraries.
82
83 install_items+=" <file>[ <file> ...] "
84 Specify additional files to include in the initramfs, separated by
85 spaces.
86
87 install_optional_items+=" <file>[ <file> ...] "
88 Specify additional files to include in the initramfs, separated by
89 spaces, if they exist.
90
91 compress="{cat|bzip2|lzma|xz|gzip|lzo|lz4|zstd|<compressor [args
92 ...]>}"
93 Compress the generated initramfs using the passed compression
94 program. If you pass it just the name of a compression program, it
95 will call that program with known-working arguments. If you pass
96 arguments, it will be called with exactly those arguments.
97 Depending on what you pass, this may result in an initramfs that
98 the kernel cannot decompress. To disable compression, use "cat".
99
100 squash_compress="{<compressor [args ...]>}"
101 Compress the squashfs image using the passed compressor and
102 compressor specific options for mksquashfs. You can refer to
103 mksquashfs manual for supported compressors and compressor specific
104 options. If squash module is not called when building the
105 initramfs, this option will not take effect.
106
107 do_strip="{yes|no}"
108 Strip binaries in the initramfs (default=yes).
109
110 aggresive_strip="{yes|no}"
111 Strip more than just debug symbol and sections, for a smaller
112 initramfs build. The "do_strip=yes" option must also be specified
113 (default=no).
114
115 do_hardlink="{yes|no}"
116 Hardlink files in the initramfs (default=yes).
117
118 prefix=" <directory> "
119 Prefix initramfs files with <directory>.
120
121 hostonly="{yes|no}"
122 Host-only mode: Install only what is needed for booting the local
123 host instead of a generic host and generate host-specific
124 configuration (default=no).
125
126 hostonly_mode="{sloppy|strict}"
127 Specify the host-only mode to use (default=sloppy). In "sloppy"
128 host-only mode, extra drivers and modules will be installed, so
129 minor hardware change won’t make the image unbootable (e.g. changed
130 keyboard), and the image is still portable among similar hosts.
131 With "strict" mode enabled, anything not necessary for booting the
132 local host in its current state will not be included, and modules
133 may do some extra job to save more space. Minor change of hardware
134 or environment could make the image unbootable.
135
136 hostonly_cmdline="{yes|no}"
137 If set to "yes", store the kernel command line arguments needed in
138 the initramfs. If hostonly="yes" and this option is not configured,
139 it’s automatically set to "yes".
140
141 hostonly_nics+=" [<nic>[ <nic> ...]] "
142 Only enable listed NICs in the initramfs. The list can be empty, so
143 other modules can install only the necessary network drivers.
144
145 persistent_policy="<policy>"
146 Use <policy> to address disks and partitions. <policy> can be any
147 directory name found in /dev/disk. E.g. "by-uuid", "by-label"
148
149 tmpdir="<temporary directory>"
150 Specify temporary directory to use.
151
152 Warning
153 If chrooted to another root other than the real root device, use
154 --fstab and provide a valid /etc/fstab.
155
156 use_fstab="{yes|no}"
157 Use /etc/fstab instead of /proc/self/mountinfo (default=no).
158
159 add_fstab+=" <filename> "
160 Add entries of <filename> to the initramfs /etc/fstab.
161
162 add_device+=" <device> "
163 Bring up <device> in initramfs, <device> should be the device name.
164 This can be useful in host-only mode for resume support when your
165 swap is on LVM an encrypted partition.
166
167 mdadmconf="{yes|no}"
168 Include local /etc/mdadm.conf (default=no).
169
170 lvmconf="{yes|no}"
171 Include local /etc/lvm/lvm.conf (default=no).
172
173 fscks=" <fsck tools> "
174 Add a space-separated list of fsck tools. If nothing is specified,
175 the default is: "umount mount /sbin/fsck* xfs_db xfs_check
176 xfs_repair e2fsck jfs_fsck reiserfsck btrfsck". The installation is
177 opportunistic (non-existing tools are ignored).
178
179 nofscks="{yes|no}"
180 If specified, inhibit installation of any fsck tools (default=no).
181
182 ro_mnt="{yes|no}"
183 Mount / and /usr read-only by default (default=no).
184
185 kernel_cmdline="parameters"
186 Specify default kernel command line parameters.
187
188 kernel_only="{yes|no}"
189 Only install kernel drivers and firmware files (default=no).
190
191 no_kernel="{yes|no}"
192 Do not install kernel drivers and firmware files (default=no).
193
194 acpi_override="{yes|no}"
195 [WARNING] ONLY USE THIS IF YOU KNOW WHAT YOU ARE DOING!
196
197 Override BIOS provided ACPI tables. For further documentation read
198 Documentation/acpi/initrd_table_override.txt in the kernel sources.
199 Search for ACPI table files (must have .aml suffix) in
200 acpi_table_dir= directory (see below) and add them to a separate
201 uncompressed cpio archive. This cpio archive gets glued
202 (concatenated, uncompressed one must be the first one) to the
203 compressed cpio archive. The first, uncompressed cpio archive is
204 for data which the kernel must be able to access very early (and
205 cannot make use of uncompress algorithms yet) like microcode or
206 ACPI tables (default=no).
207
208 acpi_table_dir="<dir>"
209 Directory to search for ACPI tables if acpi_override= is set to
210 yes.
211
212 early_microcode="{yes|no}"
213 Combine early microcode with ramdisk (default=yes).
214
215 stdloglvl="{0-6}"
216 Specify logging level for standard error (default=4).
217
218 Note
219 Logging levels:
220
221 0 - suppress any messages
222 1 - only fatal errors
223 2 - all errors
224 3 - warnings
225 4 - info
226 5 - debug info (here starts lots of output)
227 6 - trace info (and even more)
228
229 sysloglvl="{0-6}"
230 Specify logging level for syslog (default=0).
231
232 fileloglvl="{0-6}"
233 Specify logging level for logfile (default=4).
234
235 logfile="<file>"
236 Path to logfile.
237
238 sshkey="<file>"
239 SSH key file used with ssh-client module.
240
241 show_modules="{yes|no}"
242 Print the name of the included modules to standard output during
243 build (default=no).
244
245 i18n_vars="<variable mapping>"
246 Distribution specific variable mapping. See
247 dracut/modules.d/10i18n/README for a detailed description.
248
249 i18n_default_font="<fontname>"
250 The font <fontname> to install, if not specified otherwise. Default
251 is "eurlatgr".
252
253 i18n_install_all="{yes|no}"
254 Install everything regardless of generic or host-only mode
255 (default=no).
256
257 reproducible="{yes|no}"
258 Create reproducible images (default=no).
259
260 noimageifnotneeded="{yes|no}"
261 Do not create an image in host-only mode, if no kernel driver is
262 needed and no /etc/cmdline/*.conf will be generated into the
263 initramfs (default=no).
264
265 loginstall="<directory>"
266 Log all files installed from the host to <directory>.
267
268 uefi="{yes|no}"
269 Instead of creating an initramfs image, dracut will create an UEFI
270 executable, which can be executed by an UEFI BIOS (default=no). The
271 default output filename is
272 <EFI>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi. <EFI>
273 might be /efi, /boot or /boot/efi depending on where the ESP
274 partition is mounted. The <BUILD_ID> is taken from BUILD_ID in
275 /usr/lib/os-release or if it exists /etc/os-release and is left
276 out, if BUILD_ID is non-existant or empty.
277
278 machine_id="{yes|no}"
279 Affects the default output filename of the UEFI executable,
280 including the <MACHINE_ID> part (default=yes).
281
282 uefi_stub="<file>"
283 Specifies the UEFI stub loader, which will load the attached
284 kernel, initramfs and kernel command line and boots the kernel. The
285 default is
286 /lib/systemd/boot/efi/linux<EFI-MACHINE-TYPE-NAME>.efi.stub.
287
288 uefi_splash_image="<file>"
289 Specifies the UEFI stub loader’s splash image. Requires bitmap
290 (.bmp) image format.
291
292 uefi_secureboot_cert="<file>", uefi_secureboot_key="<file>"
293 Specifies a certificate and corresponding key, which are used to
294 sign the created UEFI executable. Requires both certificate and key
295 need to be specified and sbsign to be installed.
296
297 kernel_image="<file>"
298 Specifies the kernel image, which to include in the UEFI
299 executable. The default is /lib/modules/<KERNEL-VERSION>/vmlinuz or
300 /boot/vmlinuz-<KERNEL-VERSION>.
301
302 enhanced_cpio="{yes|no}"
303 Attempt to use the dracut-cpio binary, which optimizes archive
304 creation for copy-on-write filesystems (default=no). When
305 specified, initramfs archives are also padded to ensure optimal
306 data alignment for extent sharing. To retain reflink data
307 deduplication benefits, this should be used alongside the
308 compress="cat" and do_strip="no" parameters, with initramfs source
309 files, tmpdir staging area and destination all on the same
310 copy-on-write capable filesystem.
311
312 parallel="{yes|no}"
313 If set to yes, try to execute tasks in parallel (currently only
314 supported for --regenerate-all).
315
317 /etc/dracut.conf
318 Old configuration file. You better use your own file in
319 /etc/dracut.conf.d/.
320
321 /etc/dracut.conf.d/
322 Any /etc/dracut.conf.d/*.conf file can override the values in
323 /etc/dracut.conf. The configuration files are read in
324 alphanumerical order.
325
327 Harald Hoyer
328
330 dracut(8) dracut.cmdline(7)
331
332
333
334dracut 057-4-gb46b3749 07/01/2022 DRACUT.CONF(5)