]> git.ipfire.org Git - thirdparty/dracut.git/blob - dracut.8.asc
Merge pull request #286 from rldleblanc/bonding_mtu_fix
[thirdparty/dracut.git] / dracut.8.asc
1 DRACUT(8)
2 =========
3 :doctype: manpage
4 :man source: dracut
5 :man manual: dracut
6
7 NAME
8 ----
9 dracut - low-level tool for generating an initramfs/initrd image
10
11 SYNOPSIS
12 --------
13 *dracut* [__OPTION...__] [__<image>__ [__<kernel version>__]]
14
15 DESCRIPTION
16 -----------
17
18 Create an initramfs <image> for the kernel with the version <kernel version>.
19 If <kernel version> is omitted, then the version of the actual running
20 kernel is used. If <image> is omitted or empty, then the default location
21 /boot/initramfs-<kernel version>.img is used.
22
23 dracut creates an initial image used by the kernel for preloading the block
24 device modules (such as IDE, SCSI or RAID) which are needed to access the root
25 filesystem, mounting the root filesystem and booting into the real system.
26
27 At boot time, the kernel unpacks that archive into RAM disk, mounts and uses it
28 as initial root file system. All finding of the root device happens in this
29 early userspace.
30
31 Initramfs images are also called "initrd".
32
33 For a complete list of kernel command line options see *dracut.cmdline*(7).
34
35 If you are dropped to an emergency shell, while booting your initramfs,
36 the file _/run/initramfs/rdsosreport.txt_ is created, which can be saved to a
37 (to be mounted by hand) partition (usually /boot) or a USB stick.
38 Additional debugging info can be produced by adding **rd.debug** to the kernel
39 command line. _/run/initramfs/rdsosreport.txt_ contains all logs and the output
40 of some tools. It should be attached to any report about dracut problems.
41
42 USAGE
43 -----
44
45 include::dracut.usage.asc[]
46
47 OPTIONS
48 -------
49 **--kver** _<kernel version>_::
50 set the kernel version. This enables to specify the kernel version, without
51 specifying the location of the initramfs image. For example:
52 ----
53 # dracut --kver 3.5.0-0.rc7.git1.2.fc18.x86_64
54 ----
55
56 **-f, --force**::
57 overwrite existing initramfs file.
58
59 **-a, --add** _<list of dracut modules>_::
60 add a space-separated list of dracut modules to the default set of modules.
61 This parameter can be specified multiple times.
62 +
63 [NOTE]
64 ===============================
65 If [LIST] has multiple arguments, then you have to put these in quotes. For
66 example:
67 ----
68 # dracut --add "module1 module2" ...
69 ----
70 ===============================
71
72 **--force-add** _<list of dracut modules>_::
73 force to add a space-separated list of dracut modules to the default set of
74 modules, when -H is specified. This parameter can be specified multiple
75 times.
76 +
77 [NOTE]
78 ===============================
79 If [LIST] has multiple arguments, then you have to put these in quotes. For
80 example:
81 ----
82 # dracut --force-add "module1 module2" ...
83 ----
84 ===============================
85
86 **-o, --omit** _<list of dracut modules>_::
87 omit a space-separated list of dracut modules. This parameter can be
88 specified multiple times.
89 +
90 [NOTE]
91 ===============================
92 If [LIST] has multiple arguments, then you have to put these in quotes. For
93 example:
94 ----
95 # dracut --omit "module1 module2" ...
96 ----
97 ===============================
98
99 **-m, --modules** _<list of dracut modules>_::
100 specify a space-separated list of dracut modules to call when building the
101 initramfs. Modules are located in _/usr/lib/dracut/modules.d_. This
102 parameter can be specified multiple times.
103 This option forces dracut to only include the specified dracut modules.
104 In most cases the "--add" option is what you want to use.
105 +
106 [NOTE]
107 ===============================
108 If [LIST] has multiple arguments, then you have to put these in quotes. For
109 example:
110 ----
111 # dracut --modules "module1 module2" ...
112 ----
113 ===============================
114
115 **-d, --drivers** _<list of kernel modules>_::
116 specify a space-separated list of kernel modules to exclusively include
117 in the initramfs. The kernel modules have to be specified without the ".ko"
118 suffix. This parameter can be specified multiple times.
119 +
120 [NOTE]
121 ===============================
122 If [LIST] has multiple arguments, then you have to put these in quotes. For
123 example:
124 ----
125 # dracut --drivers "kmodule1 kmodule2" ...
126 ----
127 ===============================
128
129 **--add-drivers** _<list of kernel modules>_::
130 specify a space-separated list of kernel modules to add to the initramfs.
131 The kernel modules have to be specified without the ".ko" suffix. This
132 parameter can be specified multiple times.
133 +
134 [NOTE]
135 ===============================
136 If [LIST] has multiple arguments, then you have to put these in quotes. For
137 example:
138 ----
139 # dracut --add-drivers "kmodule1 kmodule2" ...
140 ----
141 ===============================
142
143 **--force-drivers** _<list of kernel modules>_::
144 See add-drivers above. But in this case it is ensured that the drivers
145 are tried to be loaded early via modprobe.
146 +
147 [NOTE]
148 ===============================
149 If [LIST] has multiple arguments, then you have to put these in quotes. For
150 example:
151 ----
152 # dracut --force-drivers "kmodule1 kmodule2" ...
153 ----
154 ===============================
155
156 **--omit-drivers** _<list of kernel modules>_::
157 specify a space-separated list of kernel modules not to add to the
158 initramfs.
159 The kernel modules have to be specified without the ".ko" suffix. This
160 parameter can be specified multiple times.
161 +
162 [NOTE]
163 ===============================
164 If [LIST] has multiple arguments, then you have to put these in quotes. For
165 example:
166 ----
167 # dracut --omit-drivers "kmodule1 kmodule2" ...
168 ----
169 ===============================
170
171 **--filesystems** _<list of filesystems>_::
172 specify a space-separated list of kernel filesystem modules to exclusively
173 include in the generic initramfs. This parameter can be specified multiple
174 times.
175 +
176 [NOTE]
177 ===============================
178 If [LIST] has multiple arguments, then you have to put these in quotes. For
179 example:
180 ----
181 # dracut --filesystems "filesystem1 filesystem2" ...
182 ----
183 ===============================
184
185 **-k, --kmoddir** _<kernel directory>_::
186 specify the directory, where to look for kernel modules
187
188 **--fwdir** _<dir>[:<dir>...]++_::
189 specify additional directories, where to look for firmwares. This parameter
190 can be specified multiple times.
191
192 **--kernel-cmdline <parameters>**::
193 specify default kernel command line parameters
194
195
196 **--kernel-only**::
197 only install kernel drivers and firmware files
198
199 **--no-kernel**::
200 do not install kernel drivers and firmware files
201
202 **--early-microcode**::
203 Combine early microcode with ramdisk
204
205 **--no-early-microcode**::
206 Do not combine early microcode with ramdisk
207
208 **--print-cmdline**::
209 print the kernel command line for the current disk layout
210
211 **--mdadmconf**::
212 include local _/etc/mdadm.conf_
213
214 **--nomdadmconf**::
215 do not include local _/etc/mdadm.conf_
216
217 **--lvmconf**::
218 include local _/etc/lvm/lvm.conf_
219
220 **--nolvmconf**::
221 do not include local _/etc/lvm/lvm.conf_
222
223 **--fscks** [LIST]::
224 add a space-separated list of fsck tools, in addition to _dracut.conf_'s
225 specification; the installation is opportunistic (non-existing tools are
226 ignored)
227 +
228 [NOTE]
229 ===============================
230 If [LIST] has multiple arguments, then you have to put these in quotes. For
231 example:
232 ----
233 # dracut --fscks "fsck.foo barfsck" ...
234 ----
235 ===============================
236
237 **--nofscks**::
238 inhibit installation of any fsck tools
239
240 **--strip**::
241 strip binaries in the initramfs (default)
242
243 **--nostrip**::
244 do not strip binaries in the initramfs
245
246 **--prelink**::
247 prelink binaries in the initramfs (default)
248
249 **--noprelink**::
250 do not prelink binaries in the initramfs
251
252 **--hardlink**::
253 hardlink files in the initramfs (default)
254
255 **--nohardlink**::
256 do not hardlink files in the initramfs
257
258 **--prefix** _<dir>_::
259 prefix initramfs files with the specified directory
260
261 **--noprefix**::
262 do not prefix initramfs files (default)
263
264 **-h, --help**::
265 display help text and exit.
266
267 **--debug**::
268 output debug information of the build process
269
270 **-v, --verbose**::
271 increase verbosity level (default is info(4))
272
273 **-q, --quiet**:: decrease verbosity level (default is info(4))
274
275 **-c, --conf** _<dracut configuration file>_::
276 specify configuration file to use.
277 +
278 Default:
279 _/etc/dracut.conf_
280
281 **--confdir** _<configuration directory>_::
282 specify configuration directory to use.
283 +
284 Default:
285 _/etc/dracut.conf.d_
286
287 **--tmpdir** _<temporary directory>_::
288 specify temporary directory to use.
289 +
290 Default:
291 _/var/tmp_
292
293 **--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module.
294
295 **--logfile** _<logfile>_:: logfile to use; overrides any setting from
296 the configuration files.
297 +
298 Default:
299 _/var/log/dracut.log_
300
301 **-l, --local**::
302 activates the local mode. dracut will use modules from the current working
303 directory instead of the system-wide installed modules in
304 _/usr/lib/dracut/modules.d_.
305 This is useful when running dracut from a git checkout.
306
307 **-H, --hostonly**::
308 Host-Only mode: Install only what is needed for booting the local host
309 instead of a generic host and generate host-specific configuration.
310 +
311 [WARNING]
312 ====
313 If chrooted to another root other than the real root device, use "--fstab" and
314 provide a valid _/etc/fstab_.
315 ====
316
317 **-N, --no-hostonly**::
318 Disable Host-Only mode
319
320 **--hostonly-cmdline**:
321 Store kernel command line arguments needed in the initramfs
322
323 **--no-hostonly-cmdline**:
324 Do not store kernel command line arguments needed in the initramfs
325
326 **--no-hostonly-default-device**:
327 Do not generate implicit host devices like root, swap, fstab, etc.
328 Use "--mount" or "--add-device" to explicitly add devices as needed.
329
330 **--hostonly-i18n**:
331 Install only needed keyboard and font files according to the host configuration (default).
332
333 **--no-hostonly-i18n**:
334 Install all keyboard and font files available.
335
336 **--persistent-policy** _<policy>_::
337 Use _<policy>_ to address disks and partitions.
338 _<policy>_ can be any directory name found in /dev/disk.
339 E.g. "by-uuid", "by-label"
340
341 **--fstab**::
342 Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
343
344 **--add-fstab** _<filename>_::
345 Add entries of _<filename>_ to the initramfs /etc/fstab.
346
347 **--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ [_<filesystem options>_ [_<dump frequency>_ [_<fsck order>_]]]"::
348 Mount _<device>_ on _<mountpoint>_ with _<filesystem type>_ in the
349 initramfs. _<filesystem options>_, _<dump options>_ and _<fsck order>_ can
350 be specified, see fstab manpage for the details.
351 The default _<filesystem options>_ is "defaults".
352 The default _<dump frequency>_ is "0".
353 the default _<fsck order>_ is "2".
354
355 **--mount** "_<mountpoint>_"::
356 Like above, but _<device>_, _<filesystem type>_ and _<filesystem options>_
357 are determined by looking at the current mounts.
358
359 **--add-device** _<device>_ ::
360 Bring up _<device>_ in initramfs, _<device>_ should be the device name.
361 This can be useful in hostonly mode for resume support when your swap is on
362 LVM or an encrypted partition.
363 [NB --device can be used for compatibility with earlier releases]
364
365 **-i, --include** _<SOURCE>_ _<TARGET>_::
366 include the files in the SOURCE directory into the
367 TARGET directory in the final initramfs. If SOURCE is a file, it will be
368 installed to TARGET in the final initramfs. This parameter can be specified
369 multiple times.
370
371 **-I, --install** _<file list>_::
372 install the space separated list of files into the initramfs.
373 +
374 [NOTE]
375 ===============================
376 If [LIST] has multiple arguments, then you have to put these in quotes. For
377 example:
378 ----
379 # dracut --install "/bin/foo /sbin/bar" ...
380 ----
381 ===============================
382
383 **--install-optional** _<file list>_::
384 install the space separated list of files into the initramfs, if they exist.
385
386 **--gzip**::
387 Compress the generated initramfs using gzip. This will be done by default,
388 unless another compression option or --no-compress is passed. Equivalent to
389 "--compress=gzip -9"
390
391 **--bzip2**::
392 Compress the generated initramfs using bzip2.
393 +
394 [WARNING]
395 ====
396 Make sure your kernel has bzip2 decompression support compiled in, otherwise you
397 will not be able to boot. Equivalent to "--compress=bzip2"
398 ====
399
400 **--lzma**::
401 Compress the generated initramfs using lzma.
402 +
403 [WARNING]
404 ====
405 Make sure your kernel has lzma decompression support compiled in, otherwise you
406 will not be able to boot. Equivalent to "lzma --compress=lzma -9"
407 ====
408
409 **--xz**::
410 Compress the generated initramfs using xz.
411 +
412 [WARNING]
413 ====
414 Make sure your kernel has xz decompression support compiled in, otherwise you
415 will not be able to boot. Equivalent to
416 "lzma --compress=xz --check=crc32 --lzma2=dict=1MiB"
417 ====
418
419 **--lzo**::
420 Compress the generated initramfs using lzop.
421 [WARNING]
422 ====
423 Make sure your kernel has lzo decompression support compiled in, otherwise you
424 will not be able to boot.
425 ====
426
427 **--lz4**::
428 Compress the generated initramfs using lz4.
429 [WARNING]
430 ====
431 Make sure your kernel has lz4 decompression support compiled in, otherwise you
432 will not be able to boot.
433 ====
434
435 **--zstd**::
436 Compress the generated initramfs using Zstandard.
437 [WARNING]
438 ====
439 Make sure your kernel has zstd decompression support compiled in, otherwise you
440 will not be able to boot.
441 ====
442
443 **--compress** _<compressor>_::
444 Compress the generated initramfs using the passed compression program. If
445 you pass it just the name of a compression program, it will call that
446 program with known-working arguments. If you pass a quoted string with
447 arguments, it will be called with exactly those arguments. Depending on what
448 you pass, this may result in an initramfs that the kernel cannot decompress.
449 The default value can also be set via the _INITRD_COMPRESS_ environment variable.
450
451 **--no-compress**::
452 Do not compress the generated initramfs. This will override any other
453 compression options.
454
455 **--reproducible**::
456 Create reproducible images.
457
458 **--no-reproducible**::
459 Do not create reproducible images.
460
461 **--list-modules**::
462 List all available dracut modules.
463
464 **-M, --show-modules**::
465 Print included module's name to standard output during build.
466
467 **--keep**::
468 Keep the initramfs temporary directory for debugging purposes.
469
470 **--printsize**::
471 Print out the module install size
472
473 **--profile**:
474 Output profile information of the build process
475
476 **--ro-mnt**:
477 Mount / and /usr read-only by default.
478
479 **-L, --stdlog** _<level>_::
480 [0-6] Specify logging level (to standard error)
481 ----
482 0 - suppress any messages
483 1 - only fatal errors
484 2 - all errors
485 3 - warnings
486 4 - info
487 5 - debug info (here starts lots of output)
488 6 - trace info (and even more)
489 ----
490
491 **--regenerate-all**::
492 Regenerate all initramfs images at the default location with the kernel
493 versions found on the system. Additional parameters are passed through.
494
495 **--loginstall _<DIR>_**::
496 Log all files installed from the host to _<DIR>_.
497
498 **--uefi**::
499 Instead of creating an initramfs image, dracut will create an UEFI executable,
500 which can be executed by an UEFI BIOS. The default output filename is
501 _<EFI>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi_. <EFI> might be
502 _/efi_, _/boot_ or _/boot/efi_ depending on where the ESP partition is mounted.
503 The <BUILD_ID> is taken from BUILD_ID in _/usr/lib/os-release_ or if it exists
504 _/etc/os-release_ and is left out, if BUILD_ID is non-existant or empty.
505
506 **--no-machineid**::
507 affects the default output filename of **--uefi** and will discard the <MACHINE_ID>
508 part.
509
510 **--uefi-stub _<FILE>_**::
511 Specifies the UEFI stub loader, which will load the attached kernel, initramfs and
512 kernel command line and boots the kernel. The default is
513 _$prefix/lib/systemd/boot/efi/linux<EFI-MACHINE-TYPE-NAME>.efi.stub_
514 or _$prefix/lib/gummiboot/linux<EFI-MACHINE-TYPE-NAME>.efi.stub_
515
516 **--kernel-image _<FILE>_**::
517 Specifies the kernel image, which to include in the UEFI executable. The default is
518 _/lib/modules/<KERNEL-VERSION>/vmlinuz_ or _/boot/vmlinuz-<KERNEL-VERSION>_
519
520 ENVIRONMENT
521 -----------
522
523 _INITRD_COMPRESS_::
524 sets the default compression program. See **--compress**.
525
526 FILES
527 -----
528 _/var/log/dracut.log_::
529 logfile of initramfs image creation
530
531 _/tmp/dracut.log_::
532 logfile of initramfs image creation, if _/var/log/dracut.log_ is not
533 writable
534
535 _/etc/dracut.conf_::
536 see dracut.conf5
537
538 _/etc/dracut.conf.d/*.conf_::
539 see dracut.conf5
540
541 _/usr/lib/dracut/dracut.conf.d/*.conf_::
542 see dracut.conf5
543
544 Configuration in the initramfs
545 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
546 _/etc/conf.d/_::
547 Any files found in _/etc/conf.d/_ will be sourced in the initramfs to
548 set initial values. Command line options will override these values
549 set in the configuration files.
550
551 _/etc/cmdline_::
552 Can contain additional command line options. Deprecated, better use
553 /etc/cmdline.d/*.conf.
554
555 _/etc/cmdline.d/*.conf_::
556 Can contain additional command line options.
557
558 AVAILABILITY
559 ------------
560 The dracut command is part of the dracut package and is available from
561 link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
562
563 AUTHORS
564 -------
565 Harald Hoyer
566
567 Victor Lowther
568
569 Philippe Seewer
570
571 Warren Togami
572
573 Amadeusz Żołnowski
574
575 Jeremy Katz
576
577 David Dillow
578
579 Will Woods
580
581 SEE ALSO
582 --------
583 *dracut.cmdline*(7) *dracut.conf*(5) *lsinitrd*(1)