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