1DRACUT(8) dracut DRACUT(8)
2
3
4
6 dracut - low-level tool for generating an initramfs image
7
9 dracut [OPTION...] [<image> [<kernel version>]]
10
12 Create an initramfs <image> for the kernel with the version <kernel
13 version>. If <kernel version> is omitted, then the version of the
14 actual running kernel is used. If <image> is omitted or empty, then the
15 default location /boot/initramfs-<kernel version>.img is used.
16
17 dracut creates an initial image used by the kernel for preloading the
18 block device modules (such as IDE, SCSI or RAID) which are needed to
19 access the root filesystem, mounting the root filesystem and booting
20 into the real system.
21
22 At boot time, the kernel unpacks that archive into RAM disk, mounts and
23 uses it as initial root file system. All finding of the root device
24 happens in this early userspace.
25
26 For a complete list of kernel command line options see
27 dracut.cmdline(7).
28
29 If you are dropped to an emergency shell, while booting your initramfs,
30 the file /run/initramfs/rdsosreport.txt is created, which can be safed
31 to a (to be mounted by hand) partition (usually /boot) or a USB stick.
32 Additional debugging info can be produced by adding rd.debug to the
33 kernel command line. /run/initramfs/rdsosreport.txt contains all logs
34 and the output of some tools. It should be attached to any report about
35 dracut problems.
36
38 To create a initramfs image, the most simple command is:
39
40 # dracut
41
42 This will generate a general purpose initramfs image, with all possible
43 functionality resulting of the combination of the installed dracut
44 modules and system tools. The image is /boot/initramfs-<kernel
45 version>.img and contains the kernel modules of the currently active
46 kernel with version <kernel version>.
47
48 If the initramfs image already exists, dracut will display an error
49 message, and to overwrite the existing image, you have to use the
50 --force option.
51
52 # dracut --force
53
54 If you want to specify another filename for the resulting image you
55 would issue a command like:
56
57 # dracut foobar.img
58
59 To generate an image for a specific kernel version, the command would
60 be:
61
62 # dracut foobar.img 2.6.40-1.rc5.f20
63
64 A shortcut to generate the image at the default location for a specific
65 kernel version is:
66
67 # dracut --kver 2.6.40-1.rc5.f20
68
69 If you want to create lighter, smaller initramfs images, you may want
70 to specify the --hostonly or -H option. Using this option, the
71 resulting image will contain only those dracut modules, kernel modules
72 and filesystems, which are needed to boot this specific machine. This
73 has the drawback, that you can’t put the disk on another controller or
74 machine, and that you can’t switch to another root filesystem, without
75 recreating the initramfs image.
76
77 Note
78 On RHEL-7 the hostonly mode is the default mode. Generic
79 "non-hostonly" images are created, if the dracut-config-generic rpm
80 is installed. The rescue kernel entry in the bootloader menu is
81 also a generic image.
82
83 Inspecting the Contents
84 To see the contents of the image created by dracut, you can use the
85 lsinitrd tool.
86
87 # lsinitrd | less
88
89 To display the contents of a file in the initramfs also use the
90 lsinitrd tool:
91
92 # lsinitrd -f /etc/ld.so.conf
93 include ld.so.conf.d/*.conf
94
95 Adding dracut Modules
96 Some dracut modules are turned off by default and have to be activated
97 manually. You can do this by adding the dracut modules to the
98 configuration file /etc/dracut.conf or /etc/dracut.conf.d/myconf.conf.
99 See dracut.conf(5). You can also add dracut modules on the command line
100 by using the -a or --add option:
101
102 # dracut --add bootchart initramfs-bootchart.img
103
104 To see a list of available dracut modules, use the --list-modules
105 option:
106
107 # dracut --list-modules
108
109 Omitting dracut Modules
110 Sometimes you don’t want a dracut module to be included for reasons of
111 speed, size or functionality. To do this, either specify the
112 omit_dracutmodules variable in the dracut.conf or
113 /etc/dracut.conf.d/myconf.conf configuration file (see dracut.conf(5)),
114 or use the -o or --omit option on the command line:
115
116 # dracut -o "multipath lvm" no-multipath-lvm.img
117
118 Adding Kernel Modules
119 If you need a special kernel module in the initramfs, which is not
120 automatically picked up by dracut, you have the use the --add-drivers
121 option on the command line or the drivers vaiable in the
122 /etc/dracut.conf or /etc/dracut.conf.d/myconf.conf configuration file
123 (see dracut.conf(5)):
124
125 # dracut --add-drivers mymod initramfs-with-mymod.img
126
127 Boot parameters
128 An initramfs generated without the "hostonly" mode, does not contain
129 any system configuration files (except for some special exceptions), so
130 the configuration has to be done on the kernel command line. With this
131 flexibility, you can easily boot from a changed root partition, without
132 the need to recompile the initramfs image. So, you could completly
133 change your root partition (move it inside a md raid with encryption
134 and LVM on top), as long as you specify the correct filesystem LABEL or
135 UUID on the kernel command line for your root device, dracut will find
136 it and boot from it.
137
138 The kernel command line usually can be configured in
139 /boot/grub2/grub.cfg (or /boot/efi/EFI/redhat/grub.cfg for EFI
140 systems), if grub2 is your bootloader and it also can be edited in the
141 real boot process in the grub menu.
142
143 The kernel command line can also be provided by the dhcp server with
144 the root-path option. See the section called “Network Boot”.
145
146 For a full reference of all kernel command line parameters, see
147 dracut.cmdline(5).
148
149 To get a quick start for the suitable kernel command line on your
150 system, use the --print-cmdline option:
151
152 # dracut --print-cmdline
153 root=UUID=8b8b6f91-95c7-4da2-831b-171e12179081 rootflags=rw,relatime,discard,data=ordered rootfstype=ext4
154
155 Specifying the root Device
156 This is the only option dracut really needs to boot from your root
157 partition. Because your root partition can live in various
158 environments, there are a lot of formats for the root= option. The
159 most basic one is root=<path to device node>:
160
161 root=/dev/sda2
162
163 Because device node names can change, dependent on the drive
164 ordering, you are encouraged to use the filesystem identifier
165 (UUID) or filesystem label (LABEL) to specify your root partition:
166
167 root=UUID=19e9dda3-5a38-484d-a9b0-fa6b067d0331
168
169 or
170
171 root=LABEL=myrootpartitionlabel
172
173 To see all UUIDs or LABELs on your system, do:
174
175 # ls -l /dev/disk/by-uuid
176
177 or
178
179 # ls -l /dev/disk/by-label
180
181 If your root partition is on the network see the section called
182 “Network Boot”.
183
184 Keyboard Settings
185 If you have to input passwords for encrypted disk volumes, you
186 might want to set the keyboard layout and specify a display font.
187
188 A typical german kernel command would contain:
189
190 rd.vconsole.font=latarcyrheb-sun16 rd.vconsole.keymap=de-latin1-nodeadkeys rd.locale.LANG=de_DE.UTF-8
191
192 Setting these options can override the setting stored on your
193 system, if you use a modern init system, like systemd.
194
195 Blacklisting Kernel Modules
196 Sometimes it is required to prevent the automatic kernel module
197 loading of a specific kernel module. To do this, just add
198 rd.blacklist=<kernel module name>, with <kernel module name> not
199 containing the .ko suffix, to the kernel command line. For example:
200
201 rd.driver.blacklist=mptsas rd.driver.blacklist=nouveau
202
203 The option can be specified multiple times on the kernel command
204 line.
205
206 Speeding up the Boot Process
207 If you want to speed up the boot process, you can specify as much
208 information for dracut on the kernel command as possible. For
209 example, you can tell dracut, that you root partition is not on a
210 LVM volume or not on a raid partition, or that it lives inside a
211 specific crypto LUKS encrypted volume. By default, dracut searches
212 everywhere. A typical dracut kernel command line for a plain
213 primary or logical partition would contain:
214
215 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0
216
217 This turns off every automatic assembly of LVM, MD raids, DM raids
218 and crypto LUKS.
219
220 Of course, you could also omit the dracut modules in the initramfs
221 creation process, but then you would lose the posibility to turn it
222 on on demand.
223
224 Injecting custom Files
225 To add your own files to the initramfs image, you have several
226 possibilities.
227
228 The --include option let you specify a source path and a target path.
229 For example
230
231 # dracut --include cmdline-preset /etc/cmdline.d/mycmdline.conf initramfs-cmdline-pre.img
232
233 will create an initramfs image, where the file cmdline-preset will be
234 copied inside the initramfs to /etc/cmdline.d/mycmdline.conf. --include
235 can only be specified once.
236
237 # mkdir -p rd.live.overlay/etc/cmdline.d
238 # mkdir -p rd.live.overlay/etc/conf.d
239 # echo "ip=dhcp" >> rd.live.overlay/etc/cmdline.d/mycmdline.conf
240 # echo export FOO=testtest >> rd.live.overlay/etc/conf.d/testvar.conf
241 # echo export BAR=testtest >> rd.live.overlay/etc/conf.d/testvar.conf
242 # tree rd.live.overlay/
243 rd.live.overlay/
244 `-- etc
245 |-- cmdline.d
246 | `-- mycmdline.conf
247 `-- conf.d
248 `-- testvar.conf
249
250 # dracut --include rd.live.overlay / initramfs-rd.live.overlay.img
251
252 This will put the contents of the rd.live.overlay directory into the
253 root of the initramfs image.
254
255 The --install option let you specify several files, which will get
256 installed in the initramfs image at the same location, as they are
257 present on initramfs creation time.
258
259 # dracut --install 'strace fsck.ext3 ssh' initramfs-dbg.img
260
261 This will create an initramfs with the strace, fsck.ext3 and ssh
262 executables, together with the libraries needed to start those. The
263 --install option can be specified multiple times.
264
265 Network Boot
266 If your root partition is on a network drive, you have to have the
267 network dracut modules installed to create a network aware initramfs
268 image.
269
270 On a Red Hat Enterprise Linux or Fedora system, this means, you have to
271 install the dracut-network rpm package:
272
273 # yum install dracut-network
274
275 The resulting initramfs image can be served by a boot manager residing
276 on your local hard drive or it can be served by a PXE/TFTP server.
277
278 How to setup your PXE/TFTP server can be found in the Red Hat
279 Enterprise Linux Storage Administration Guide[1].
280
281 If you specify ip=dhcp on the kernel command line, then dracut asks a
282 dhcp server about the ip adress for the machine. The dhcp server can
283 also serve an additional root-path, which will set the root device for
284 dracut. With this mechanism, you have static configuration on your
285 client machine and a centralized boot configuration on your TFTP/DHCP
286 server. If you can’t pass a kernel command line, then you can inject
287 /etc/cmdline.d/mycmdline.conf, with a method described in the section
288 called “Injecting custom Files”.
289
290 Reducing the Image Size
291 To reduce the size of the initramfs, you should create it with by
292 ommitting all dracut modules, which you know, you don’t need to
293 boot the machine.
294
295 You can also specify the exact dracut and kernel modules to produce
296 a very tiny initramfs image.
297
298 For example for a NFS image, you would do:
299
300 # dracut -m "nfs network base" initramfs-nfs-only.img
301
302 Then you would boot from this image with your target machine and
303 reduce the size once more by creating it on the target machine with
304 the --host-only option:
305
306 # dracut -m "nfs network base" --host-only initramfs-nfs-host-only.img
307
308 This will reduce the size of the initramfs image significantly.
309
311 If the boot process does not succeed, you have several options to debug
312 the situation. Some of the basic operations are covered here. For more
313 information you should also visit:
314 http://fedoraproject.org/wiki/How_to_debug_Dracut_problems
315
316 Identifying your problem area
317 1. Remove 'rhgb' and 'quiet' from the kernel command line
318
319 2. Add 'rd.shell' to the kernel command line. This will present a
320 shell should dracut be unable to locate your root device
321
322 3. Add 'rd.shell rd.debug log_buf_len=1M' to the kernel command line
323 so that dracut shell commands are printed as they are executed
324
325 4. The file /run/initramfs/rdsosreport.txt is generated, which
326 contains all the logs and the output of all significant tools,
327 which are mentioned later.
328
329 If you want to save that output, simply mount /boot by hand or insert
330 an USB stick and mount that. Then you can store the output for later
331 inspection.
332
333 Information to include in your report
334 All bug reports
335 In all cases, the following should be mentioned and attached to
336 your bug report:
337
338 · The exact kernel command-line used. Typically from the
339 bootloader configuration file (e.g. /boot/grub2/grub.cfg (or
340 /boot/efi/EFI/redhat/grub.cfg for EFI systems)) or from
341 /proc/cmdline.
342
343 · A copy of your disk partition information from /etc/fstab,
344 which might be obtained booting an old working initramfs or a
345 rescue medium.
346
347 · Turn on dracut debugging (see the debugging dracut section),
348 and attach the file /run/initramfs/rdsosreport.txt.
349
350 · If you use a dracut configuration file, please include
351 /etc/dracut.conf and all files in /etc/dracut.conf.d/*.conf
352
353 Network root device related problems
354 This section details information to include when experiencing
355 problems on a system whose root device is located on a network
356 attached volume (e.g. iSCSI, NFS or NBD). As well as the
357 information from the section called “All bug reports”, include the
358 following information:
359
360 · Please include the output of
361
362 # /sbin/ifup <interfacename>
363 # ip addr show
364
365 Debugging dracut
366 Configure a serial console
367 Successfully debugging dracut will require some form of console
368 logging during the system boot. This section documents configuring
369 a serial console connection to record boot messages.
370
371 1. In /boot/grub2/grub.cfg (or /boot/efi/EFI/redhat/grub.cfg for
372 EFI systems), add the following boot arguments to the 'linux16'
373 line:
374
375 console=tty0 console=ttyS0,9600
376
377 2. More detailed information on how to configure the kernel for
378 console output can be found at
379 http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL.
380
381 Using the dracut shell
382 dracut offers a shell for interactive debugging in the event dracut
383 fails to locate your root filesystem. To enable the shell:
384
385 1. Add the boot parameter 'rd.shell' to your bootloader
386 configuration file (e.g. /boot/grub2/grub.cfg (or
387 /boot/efi/EFI/redhat/grub.cfg for EFI systems))
388
389 2. Remove the boot arguments 'rhgb' and 'quiet'
390
391 A sample grub.cfg bootloader configuration file snippet is
392 listed below.
393
394 menuentry 'Red Hat Enterprise Linux Server (3.10.0-308.el7.x86_64) 7.0 (Maipo)' [...] {
395 [...]
396 linux16 /vmlinuz-3.10.0-308.el7.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell
397 initrd16 /initramfs-3.10.0-308.el7.x86_64.img
398 [...]
399 }
400
401 3. If system boot fails, you will be dropped into a shell as seen
402 in the example below.
403
404 No root device found
405 Dropping to debug shell.
406
407 #
408
409 4. Use this shell prompt to gather the information requested above
410 (see the section called “All bug reports”).
411
412 Accessing the root volume from the dracut shell
413 From the dracut debug shell, you can manually perform the task of
414 locating and preparing your root volume for boot. The required
415 steps will depend on how your root volume is configured. Common
416 scenarios include:
417
418 · A block device (e.g. /dev/sda7)
419
420 · A LVM logical volume (e.g. /dev/VolGroup00/LogVol00)
421
422 · An encrypted device (e.g.
423 /dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83)
424
425 · A network attached device (e.g.
426 netroot=iscsi:@192.168.0.4::3260::iqn.2009-02.org.example:for.all)
427
428 The exact method for locating and preparing will vary. However, to
429 continue with a successful boot, the objective is to locate your
430 root volume and create a symlink /dev/root which points to the file
431 system. For example, the following example demonstrates accessing
432 and booting a root volume that is an encrypted LVM Logical volume.
433
434 1. Inspect your partitions using parted
435
436 # parted /dev/sda -s p
437 Model: ATA HTS541060G9AT00 (scsi)
438 Disk /dev/sda: 60.0GB
439 Sector size (logical/physical): 512B/512B
440 Partition Table: msdos
441 Number Start End Size Type File system Flags
442 1 32.3kB 10.8GB 107MB primary ext4 boot
443 2 10.8GB 55.6GB 44.7GB logical lvm
444
445 2. You recall that your root volume was a LVM logical volume. Scan
446 and activate any logical volumes.
447
448 # lvm vgscan
449 # lvm vgchange -ay
450
451 3. You should see any logical volumes now using the command blkid:
452
453 # blkid
454 /dev/sda1: UUID="3de247f3-5de4-4a44-afc5-1fe179750cf7" TYPE="ext4"
455 /dev/sda2: UUID="Ek4dQw-cOtq-5MJu-OGRF-xz5k-O2l8-wdDj0I" TYPE="LVM2_member"
456 /dev/mapper/linux-root: UUID="def0269e-424b-4752-acf3-1077bf96ad2c" TYPE="crypto_LUKS"
457 /dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext3"
458 /dev/mapper/linux-swap: UUID="47b4d329-975c-4c08-b218-f9c9bf3635f1" TYPE="swap"
459
460 4. From the output above, you recall that your root volume exists
461 on an encrypted block device. Following the guidance disk
462 encryption guidance from the Installation Guide, you unlock
463 your encrypted root volume.
464
465 # UUID=$(cryptsetup luksUUID /dev/mapper/linux-root)
466 # cryptsetup luksOpen /dev/mapper/linux-root luks-$UUID
467 Enter passphrase for /dev/mapper/linux-root:
468 Key slot 0 unlocked.
469
470 5. Next, make a symbolic link to the unlocked root volume
471
472 # ln -s /dev/mapper/luks-$UUID /dev/root
473
474 6. With the root volume available, you may continue booting the
475 system by exiting the dracut shell
476
477 # exit
478
479 Additional dracut boot parameters
480 For more debugging options, see dracut.cmdline(7).
481
482 Debugging dracut on shutdown
483 To debug the shutdown sequence on systemd systems, you can rd.break
484 on pre-shutdown or shutdown.
485
486 To do this from an already booted system:
487
488 # mkdir -p /run/initramfs/etc/cmdline.d
489 # echo "rd.break=pre-shutdown" > /run/initramfs/etc/cmdline.d/debug.conf
490 # touch /run/initramfs/.need_shutdown
491
492 This will give you a dracut shell after the system pivot’ed back in
493 the initramfs.
494
496 --kver <kernel version>
497 set the kernel version. This enables to specify the kernel version,
498 without specifying the location of the initramfs image. For
499 example:
500
501 # dracut --kver 3.5.0-0.rc7.git1.2.fc18.x86_64
502
503 -f, --force
504 overwrite existing initramfs file.
505
506 -m, --modules <list of dracut modules>
507 specify a space-separated list of dracut modules to call when
508 building the initramfs. Modules are located in
509 /usr/lib/dracut/modules.d. This parameter can be specified multiple
510 times.
511
512 Note
513 If [LIST] has multiple arguments, then you have to put these in
514 quotes. For example:
515
516 # dracut --modules "module1 module2" ...
517
518 -o, --omit <list of dracut modules>
519 omit a space-separated list of dracut modules. This parameter can
520 be specified multiple times.
521
522 Note
523 If [LIST] has multiple arguments, then you have to put these in
524 quotes. For example:
525
526 # dracut --omit "module1 module2" ...
527
528 -a, --add <list of dracut modules>
529 add a space-separated list of dracut modules to the default set of
530 modules. This parameter can be specified multiple times.
531
532 Note
533 If [LIST] has multiple arguments, then you have to put these in
534 quotes. For example:
535
536 # dracut --add "module1 module2" ...
537
538 --force-add <list of dracut modules>
539 force to add a space-separated list of dracut modules to the
540 default set of modules, when -H is specified. This parameter can be
541 specified multiple times.
542
543 Note
544 If [LIST] has multiple arguments, then you have to put these in
545 quotes. For example:
546
547 # dracut --force-add "module1 module2" ...
548
549 -d, --drivers <list of kernel modules>
550 specify a space-separated list of kernel modules to exclusively
551 include in the initramfs. The kernel modules have to be specified
552 without the ".ko" suffix. This parameter can be specified multiple
553 times.
554
555 Note
556 If [LIST] has multiple arguments, then you have to put these in
557 quotes. For example:
558
559 # dracut --drivers "kmodule1 kmodule2" ...
560
561 --add-drivers <list of kernel modules>
562 specify a space-separated list of kernel modules to add to the
563 initramfs. The kernel modules have to be specified without the
564 ".ko" suffix. This parameter can be specified multiple times.
565
566 Note
567 If [LIST] has multiple arguments, then you have to put these in
568 quotes. For example:
569
570 # dracut --add-drivers "kmodule1 kmodule2" ...
571
572 --force-drivers <list of kernel modules>
573 See add-drivers above. But in this case it is ensured that the
574 drivers are tried to be loaded early via modprobe.
575
576 Note
577 If [LIST] has multiple arguments, then you have to put these in
578 quotes. For example:
579
580 # dracut --force-drivers "kmodule1 kmodule2" ...
581
582 --omit-drivers <list of kernel modules>
583 specify a space-separated list of kernel modules not to add to the
584 initramfs. The kernel modules have to be specified without the
585 ".ko" suffix. This parameter can be specified multiple times.
586
587 Note
588 If [LIST] has multiple arguments, then you have to put these in
589 quotes. For example:
590
591 # dracut --omit-drivers "kmodule1 kmodule2" ...
592
593 --filesystems <list of filesystems>
594 specify a space-separated list of kernel filesystem modules to
595 exclusively include in the generic initramfs. This parameter can be
596 specified multiple times.
597
598 Note
599 If [LIST] has multiple arguments, then you have to put these in
600 quotes. For example:
601
602 # dracut --filesystems "filesystem1 filesystem2" ...
603
604 -k, --kmoddir <kernel directory>
605 specify the directory, where to look for kernel modules
606
607 --fwdir <dir>[:<dir>...]++
608 specify additional directories, where to look for firmwares. This
609 parameter can be specified multiple times.
610
611 --kernel-cmdline <parameters>
612 specify default kernel command line parameters
613
614 --kernel-only
615 only install kernel drivers and firmware files
616
617 --no-kernel
618 do not install kernel drivers and firmware files
619
620 --early-microcode
621 Combine early microcode with ramdisk
622
623 --no-early-microcode
624 Do not combine early microcode with ramdisk
625
626 --print-cmdline
627 print the kernel command line for the current disk layout
628
629 --mdadmconf
630 include local /etc/mdadm.conf
631
632 --nomdadmconf
633 do not include local /etc/mdadm.conf
634
635 --lvmconf
636 include local /etc/lvm/lvm.conf
637
638 --nolvmconf
639 do not include local /etc/lvm/lvm.conf
640
641 --fscks [LIST]
642 add a space-separated list of fsck tools, in addition to
643 dracut.conf's specification; the installation is opportunistic
644 (non-existing tools are ignored)
645
646 Note
647 If [LIST] has multiple arguments, then you have to put these in
648 quotes. For example:
649
650 # dracut --fscks "fsck.foo barfsck" ...
651
652 --nofscks
653 inhibit installation of any fsck tools
654
655 --strip
656 strip binaries in the initramfs (default)
657
658 --nostrip
659 do not strip binaries in the initramfs
660
661 --prelink
662 prelink binaries in the initramfs (default)
663
664 --noprelink
665 do not prelink binaries in the initramfs
666
667 --hardlink
668 hardlink files in the initramfs (default)
669
670 --nohardlink
671 do not hardlink files in the initramfs
672
673 --prefix <dir>
674 prefix initramfs files with the specified directory
675
676 --noprefix
677 do not prefix initramfs files (default)
678
679 -h, --help
680 display help text and exit.
681
682 --debug
683 output debug information of the build process
684
685 -v, --verbose
686 increase verbosity level (default is info(4))
687
688 -q, --quiet
689 decrease verbosity level (default is info(4))
690
691 -c, --conf <dracut configuration file>
692 specify configuration file to use.
693
694 Default: /etc/dracut.conf
695
696 --confdir <configuration directory>
697 specify configuration directory to use.
698
699 Default: /etc/dracut.conf.d
700
701 --tmpdir <temporary directory>
702 specify temporary directory to use.
703
704 Default: /var/tmp
705
706 --sshkey <sshkey file>
707 ssh key file used with ssh-client module.
708
709 --logfile <logfile>
710 logfile to use; overrides any setting from the configuration files.
711
712 Default: /var/log/dracut.log
713
714 -l, --local
715 activates the local mode. dracut will use modules from the current
716 working directory instead of the system-wide installed modules in
717 /usr/lib/dracut/modules.d. This is useful when running dracut from
718 a git checkout.
719
720 -H, --hostonly
721 Host-Only mode: Install only what is needed for booting the local
722 host instead of a generic host and generate host-specific
723 configuration.
724
725 Warning
726 If chrooted to another root other than the real root device,
727 use "--fstab" and provide a valid /etc/fstab.
728
729 -N, --no-hostonly
730 Disable Host-Only mode
731
732 --hostonly-cmdline: Store kernel command line arguments needed in the
733 initramfs
734
735 --no-hostonly-cmdline: Do not store kernel command line arguments
736 needed in the initramfs
737
738 --no-hostonly-default-device: Do not generate implicit host devices
739 like root, swap, fstab, etc. Use "--mount" or "--add-device" to
740 explicitly add devices as needed.
741
742 --hostonly-i18n: Install only needed keyboard and font files according
743 to the host configuration (default).
744
745 --no-hostonly-i18n: Install all keyboard and font files available.
746
747 --persistent-policy <policy>
748 Use <policy> to address disks and partitions. <policy> can be any
749 directory name found in /dev/disk. E.g. "by-uuid", "by-label"
750
751 --fstab
752 Use /etc/fstab instead of /proc/self/mountinfo.
753
754 --add-fstab <filename>
755 Add entries of <filename> to the initramfs /etc/fstab.
756
757 --mount "<device> <mountpoint> <filesystem type> [<filesystem options>
758 [<dump frequency> [<fsck order>]]]"
759 Mount <device> on <mountpoint> with <filesystem type> in the
760 initramfs. <filesystem options>, <dump options> and <fsck order>
761 can be specified, see fstab manpage for the details. The default
762 <filesystem options> is "defaults". The default <dump frequency> is
763 "0". the default <fsck order> is "2".
764
765 --add-device <device>
766 Bring up <device> in initramfs, <device> should be the device name.
767 This can be useful in hostonly mode for resume support when your
768 swap is on LVM or an encrypted partition. [NB --device can be used
769 for compatibility with earlier releases]
770
771 -i, --include <SOURCE> <TARGET>
772 include the files in the SOURCE directory into the TARGET directory
773 in the final initramfs. If SOURCE is a file, it will be installed
774 to TARGET in the final initramfs. This parameter can be specified
775 multiple times.
776
777 -I, --install <file list>
778 install the space separated list of files into the initramfs.
779
780 Note
781 If [LIST] has multiple arguments, then you have to put these in
782 quotes. For example:
783
784 # dracut --install "/bin/foo /sbin/bar" ...
785
786 --install-optional <file list>
787 install the space separated list of files into the initramfs, if
788 they exist.
789
790 --gzip
791 Compress the generated initramfs using gzip. This will be done by
792 default, unless another compression option or --no-compress is
793 passed. Equivalent to "--compress=gzip -9"
794
795 --bzip2
796 Compress the generated initramfs using bzip2.
797
798 Warning
799 Make sure your kernel has bzip2 decompression support compiled
800 in, otherwise you will not be able to boot. Equivalent to
801 "--compress=bzip2"
802
803 --lzma
804 Compress the generated initramfs using lzma.
805
806 Warning
807 Make sure your kernel has lzma decompression support compiled
808 in, otherwise you will not be able to boot. Equivalent to "lzma
809 --compress=lzma -9"
810
811 --xz
812 Compress the generated initramfs using xz.
813
814 Warning
815 Make sure your kernel has xz decompression support compiled in,
816 otherwise you will not be able to boot. Equivalent to "lzma
817 --compress=xz --check=crc32 --lzma2=dict=1MiB"
818
819 --lzo
820 Compress the generated initramfs using lzop.
821
822 Warning
823 Make sure your kernel has lzo decompression support compiled in,
824 otherwise you will not be able to boot.
825
826 --lz4
827 Compress the generated initramfs using lz4.
828
829 Warning
830 Make sure your kernel has lz4 decompression support compiled in,
831 otherwise you will not be able to boot.
832
833 --compress <compressor>
834 Compress the generated initramfs using the passed compression
835 program. If you pass it just the name of a compression program, it
836 will call that program with known-working arguments. If you pass a
837 quoted string with arguments, it will be called with exactly those
838 arguments. Depending on what you pass, this may result in an
839 initramfs that the kernel cannot decompress.
840
841 --no-compress
842 Do not compress the generated initramfs. This will override any
843 other compression options.
844
845 --list-modules
846 List all available dracut modules.
847
848 -M, --show-modules
849 Print included module’s name to standard output during build.
850
851 --keep
852 Keep the initramfs temporary directory for debugging purposes.
853
854 --printsize
855 Print out the module install size
856
857 --profile: Output profile information of the build process
858
859 --ro-mnt: Mount / and /usr read-only by default.
860
861 -L, --stdlog <level>
862 [0-6] Specify logging level (to standard error)
863
864 0 - suppress any messages
865 1 - only fatal errors
866 2 - all errors
867 3 - warnings
868 4 - info
869 5 - debug info (here starts lots of output)
870 6 - trace info (and even more)
871
872 --regenerate-all
873 Regenerate all initramfs images at the default location with the
874 kernel versions found on the system. Additional parameters are
875 passed through.
876
878 /var/log/dracut.log
879 logfile of initramfs image creation
880
881 /tmp/dracut.log
882 logfile of initramfs image creation, if /var/log/dracut.log is not
883 writable
884
885 /etc/dracut.conf
886 see dracut.conf5
887
888 /etc/dracut.conf.d/*.conf
889 see dracut.conf5
890
891 /usr/lib/dracut/dracut.conf.d/*.conf
892 see dracut.conf5
893
894 Configuration in the initramfs
895 /etc/conf.d/
896 Any files found in /etc/conf.d/ will be sourced in the initramfs to
897 set initial values. Command line options will override these values
898 set in the configuration files.
899
900 /etc/cmdline
901 Can contain additional command line options. Deprecated, better use
902 /etc/cmdline.d/*.conf.
903
904 /etc/cmdline.d/*.conf
905 Can contain additional command line options.
906
908 The dracut command is part of the dracut package and is available from
909 https://dracut.wiki.kernel.org
910
912 Harald Hoyer
913
914 Victor Lowther
915
916 Philippe Seewer
917
918 Warren Togami
919
920 Amadeusz Żołnowski
921
922 Jeremy Katz
923
924 David Dillow
925
926 Will Woods
927
929 dracut.cmdline(7) dracut.conf(5)
930
932 1. Red Hat Enterprise Linux Storage Administration Guide
933 http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/
934
935
936
937dracut 11/02/2018 DRACUT(8)