1DRACUT(8)                           dracut                           DRACUT(8)
2
3
4

NAME

6       dracut - low-level tool for generating an initramfs/initrd image
7

SYNOPSIS

9       dracut [OPTION...] [<image> [<kernel version>]]
10

DESCRIPTION

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       Initramfs images are also called "initrd".
27
28       For a complete list of kernel command line options see
29       dracut.cmdline(7).
30
31       If you are dropped to an emergency shell, while booting your initramfs,
32       the file /run/initramfs/rdsosreport.txt is created, which can be saved
33       to a (to be mounted by hand) partition (usually /boot) or a USB stick.
34       Additional debugging info can be produced by adding rd.debug to the
35       kernel command line. /run/initramfs/rdsosreport.txt contains all logs
36       and the output of some tools. It should be attached to any report about
37       dracut problems.
38

USAGE

40       To create a initramfs image, the most simple command is:
41
42           # dracut
43
44       This will generate a general purpose initramfs image, with all possible
45       functionality resulting of the combination of the installed dracut
46       modules and system tools. The image is /boot/initramfs-<kernel
47       version>.img and contains the kernel modules of the currently active
48       kernel with version <kernel version>.
49
50       If the initramfs image already exists, dracut will display an error
51       message, and to overwrite the existing image, you have to use the
52       --force option.
53
54           # dracut --force
55
56       If you want to specify another filename for the resulting image you
57       would issue a command like:
58
59           # dracut foobar.img
60
61       To generate an image for a specific kernel version, the command would
62       be:
63
64           # dracut foobar.img 2.6.40-1.rc5.f20
65
66       A shortcut to generate the image at the default location for a specific
67       kernel version is:
68
69           # dracut --kver 2.6.40-1.rc5.f20
70
71       If you want to create lighter, smaller initramfs images, you may want
72       to specify the --hostonly or -H option. Using this option, the
73       resulting image will contain only those dracut modules, kernel modules
74       and filesystems, which are needed to boot this specific machine. This
75       has the drawback, that you can’t put the disk on another controller or
76       machine, and that you can’t switch to another root filesystem, without
77       recreating the initramfs image. The usage of the --hostonly option is
78       only for experts and you will have to keep the broken pieces. At least
79       keep a copy of a general purpose image (and corresponding kernel) as a
80       fallback to rescue your system.
81
82   Inspecting the Contents
83       To see the contents of the image created by dracut, you can use the
84       lsinitrd tool.
85
86           # lsinitrd | less
87
88       To display the contents of a file in the initramfs also use the
89       lsinitrd tool:
90
91           # lsinitrd -f /etc/ld.so.conf
92           include ld.so.conf.d/*.conf
93
94   Adding dracut Modules
95       Some dracut modules are turned off by default and have to be activated
96       manually. You can do this by adding the dracut modules to the
97       configuration file /etc/dracut.conf or /etc/dracut.conf.d/myconf.conf.
98       See dracut.conf(5). You can also add dracut modules on the command line
99       by using the -a or --add option:
100
101           # dracut --add bootchart initramfs-bootchart.img
102
103       To see a list of available dracut modules, use the --list-modules
104       option:
105
106           # dracut --list-modules
107
108   Omitting dracut Modules
109       Sometimes you don’t want a dracut module to be included for reasons of
110       speed, size or functionality. To do this, either specify the
111       omit_dracutmodules variable in the dracut.conf or
112       /etc/dracut.conf.d/myconf.conf configuration file (see dracut.conf(5)),
113       or use the -o or --omit option on the command line:
114
115           # dracut -o "multipath lvm" no-multipath-lvm.img
116
117   Adding Kernel Modules
118       If you need a special kernel module in the initramfs, which is not
119       automatically picked up by dracut, you have the use the --add-drivers
120       option on the command line or the drivers variable in the
121       /etc/dracut.conf or /etc/dracut.conf.d/myconf.conf configuration file
122       (see dracut.conf(5)):
123
124           # dracut --add-drivers mymod initramfs-with-mymod.img
125
126   Boot parameters
127       An initramfs generated without the "hostonly" mode, does not contain
128       any system configuration files (except for some special exceptions), so
129       the configuration has to be done on the kernel command line. With this
130       flexibility, you can easily boot from a changed root partition, without
131       the need to recompile the initramfs image. So, you could completely
132       change your root partition (move it inside a md raid with encryption
133       and LVM on top), as long as you specify the correct filesystem LABEL or
134       UUID on the kernel command line for your root device, dracut will find
135       it and boot from it.
136
137       The kernel command line can also be provided by the dhcp server with
138       the root-path option. See the section called “Network Boot”.
139
140       For a full reference of all kernel command line parameters, see
141       dracut.cmdline(5).
142
143       To get a quick start for the suitable kernel command line on your
144       system, use the --print-cmdline option:
145
146           # dracut --print-cmdline
147            root=UUID=8b8b6f91-95c7-4da2-831b-171e12179081 rootflags=rw,relatime,discard,data=ordered rootfstype=ext4
148
149       Specifying the root Device
150           This is the only option dracut really needs to boot from your root
151           partition. Because your root partition can live in various
152           environments, there are a lot of formats for the root= option. The
153           most basic one is root=<path to device node>:
154
155               root=/dev/sda2
156
157           Because device node names can change, dependent on the drive
158           ordering, you are encouraged to use the filesystem identifier
159           (UUID) or filesystem label (LABEL) to specify your root partition:
160
161               root=UUID=19e9dda3-5a38-484d-a9b0-fa6b067d0331
162
163           or
164
165               root=LABEL=myrootpartitionlabel
166
167           To see all UUIDs or LABELs on your system, do:
168
169               # ls -l /dev/disk/by-uuid
170
171           or
172
173               # ls -l /dev/disk/by-label
174
175           If your root partition is on the network see the section called
176           “Network Boot”.
177
178       Keyboard Settings
179           If you have to input passwords for encrypted disk volumes, you
180           might want to set the keyboard layout and specify a display font.
181
182           A typical german kernel command would contain:
183
184               rd.vconsole.font=latarcyrheb-sun16 rd.vconsole.keymap=de-latin1-nodeadkeys rd.locale.LANG=de_DE.UTF-8
185
186           Setting these options can override the setting stored on your
187           system, if you use a modern init system, like systemd.
188
189       Blacklisting Kernel Modules
190           Sometimes it is required to prevent the automatic kernel module
191           loading of a specific kernel module. To do this, just add
192           rd.blacklist=<kernel module name>, with <kernel module name> not
193           containing the .ko suffix, to the kernel command line. For example:
194
195               rd.driver.blacklist=mptsas rd.driver.blacklist=nouveau
196
197           The option can be specified multiple times on the kernel command
198           line.
199
200       Speeding up the Boot Process
201           If you want to speed up the boot process, you can specify as much
202           information for dracut on the kernel command as possible. For
203           example, you can tell dracut, that you root partition is not on a
204           LVM volume or not on a raid partition, or that it lives inside a
205           specific crypto LUKS encrypted volume. By default, dracut searches
206           everywhere. A typical dracut kernel command line for a plain
207           primary or logical partition would contain:
208
209               rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0
210
211           This turns off every automatic assembly of LVM, MD raids, DM raids
212           and crypto LUKS.
213
214           Of course, you could also omit the dracut modules in the initramfs
215           creation process, but then you would lose the possibility to turn
216           it on on demand.
217
218   Injecting custom Files
219       To add your own files to the initramfs image, you have several
220       possibilities.
221
222       The --include option let you specify a source path and a target path.
223       For example
224
225           # dracut --include cmdline-preset /etc/cmdline.d/mycmdline.conf initramfs-cmdline-pre.img
226
227       will create an initramfs image, where the file cmdline-preset will be
228       copied inside the initramfs to /etc/cmdline.d/mycmdline.conf. --include
229       can only be specified once.
230
231           # mkdir -p rd.live.overlay/etc/cmdline.d
232           # mkdir -p rd.live.overlay/etc/conf.d
233           # echo "ip=dhcp" >> rd.live.overlay/etc/cmdline.d/mycmdline.conf
234           # echo export FOO=testtest >> rd.live.overlay/etc/conf.d/testvar.conf
235           # echo export BAR=testtest >> rd.live.overlay/etc/conf.d/testvar.conf
236           # tree rd.live.overlay/
237           rd.live.overlay/
238           `-- etc
239               |-- cmdline.d
240               |   `-- mycmdline.conf
241               `-- conf.d
242                   `-- testvar.conf
243
244           # dracut --include rd.live.overlay / initramfs-rd.live.overlay.img
245
246       This will put the contents of the rd.live.overlay directory into the
247       root of the initramfs image.
248
249       The --install option let you specify several files, which will get
250       installed in the initramfs image at the same location, as they are
251       present on initramfs creation time.
252
253           # dracut --install 'strace fsck.ext3 ssh' initramfs-dbg.img
254
255       This will create an initramfs with the strace, fsck.ext3 and ssh
256       executables, together with the libraries needed to start those. The
257       --install option can be specified multiple times.
258
259   Network Boot
260       If your root partition is on a network drive, you have to have the
261       network dracut modules installed to create a network aware initramfs
262       image.
263
264       If you specify ip=dhcp on the kernel command line, then dracut asks a
265       dhcp server about the ip address for the machine. The dhcp server can
266       also serve an additional root-path, which will set the root device for
267       dracut. With this mechanism, you have static configuration on your
268       client machine and a centralized boot configuration on your TFTP/DHCP
269       server. If you can’t pass a kernel command line, then you can inject
270       /etc/cmdline.d/mycmdline.conf, with a method described in the section
271       called “Injecting custom Files”.
272
273       Reducing the Image Size
274           To reduce the size of the initramfs, you should create it with by
275           omitting all dracut modules, which you know, you don’t need to boot
276           the machine.
277
278           You can also specify the exact dracut and kernel modules to produce
279           a very tiny initramfs image.
280
281           For example for a NFS image, you would do:
282
283               # dracut -m "nfs network  base" initramfs-nfs-only.img
284
285           Then you would boot from this image with your target machine and
286           reduce the size once more by creating it on the target machine with
287           the --host-only option:
288
289               # dracut -m "nfs network base" --host-only initramfs-nfs-host-only.img
290
291           This will reduce the size of the initramfs image significantly.
292

TROUBLESHOOTING

294       If the boot process does not succeed, you have several options to debug
295       the situation. Some of the basic operations are covered here. For more
296       information you should also visit:
297       https://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html
298
299   Identifying your problem area
300        1. Remove 'rhgb' and 'quiet' from the kernel command line
301
302        2. Add 'rd.shell' to the kernel command line. This will present a
303           shell should dracut be unable to locate your root device
304
305        3. Add 'rd.shell rd.debug log_buf_len=1M' to the kernel command line
306           so that dracut shell commands are printed as they are executed
307
308        4. The file /run/initramfs/rdsosreport.txt is generated, which
309           contains all the logs and the output of all significant tools,
310           which are mentioned later.
311
312       If you want to save that output, simply mount /boot by hand or insert
313       an USB stick and mount that. Then you can store the output for later
314       inspection.
315
316   Information to include in your report
317       All bug reports
318           In all cases, the following should be mentioned and attached to
319           your bug report:
320
321           ·   The exact kernel command-line used. Typically from the
322               bootloader configuration file (e.g.  /boot/grub2/grub.cfg) or
323               from /proc/cmdline.
324
325           ·   A copy of your disk partition information from /etc/fstab,
326               which might be obtained booting an old working initramfs or a
327               rescue medium.
328
329           ·   Turn on dracut debugging (see the debugging dracut section),
330               and attach the file /run/initramfs/rdsosreport.txt.
331
332           ·   If you use a dracut configuration file, please include
333               /etc/dracut.conf and all files in /etc/dracut.conf.d/*.conf
334
335       Network root device related problems
336           This section details information to include when experiencing
337           problems on a system whose root device is located on a network
338           attached volume (e.g. iSCSI, NFS or NBD). As well as the
339           information from the section called “All bug reports”, include the
340           following information:
341
342           ·   Please include the output of
343
344                   # /sbin/ifup <interfacename>
345                   # ip addr show
346
347   Debugging dracut
348       Configure a serial console
349           Successfully debugging dracut will require some form of console
350           logging during the system boot. This section documents configuring
351           a serial console connection to record boot messages.
352
353            1. First, enable serial console output for both the kernel and the
354               bootloader.
355
356            2. Open the file /boot/grub2/grub.cfg for editing. Below the line
357               'timeout=5', add the following:
358
359                   serial --unit=0 --speed=9600
360                   terminal --timeout=5 serial console
361
362            3. Also in /boot/grub2/grub.cfg, add the following boot arguemnts
363               to the 'kernel' line:
364
365                   console=tty0 console=ttyS0,9600
366
367            4. When finished, the /boot/grub2/grub.cfg file should look
368               similar to the example below.
369
370                   default=0
371                   timeout=5
372                   serial --unit=0 --speed=9600
373                   terminal --timeout=5 serial console
374                   title Fedora (2.6.29.5-191.fc11.x86_64)
375                     root (hd0,0)
376                     kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 console=ttyS0,9600
377                     initrd /dracut-2.6.29.5-191.fc11.x86_64.img
378
379            5. More detailed information on how to configure the kernel for
380               console output can be found at
381               http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL.
382
383            6. Redirecting non-interactive output
384
385                   Note
386                   You can redirect all non-interactive output to /dev/kmsg
387                   and the kernel will put it out on the console when it
388                   reaches the kernel buffer by doing
389
390                   # exec >/dev/kmsg 2>&1 </dev/console
391
392       Using the dracut shell
393           dracut offers a shell for interactive debugging in the event dracut
394           fails to locate your root filesystem. To enable the shell:
395
396            1. Add the boot parameter 'rd.shell' to your bootloader
397               configuration file (e.g.  /boot/grub2/grub.cfg)
398
399            2. Remove the boot arguments 'rhgb' and 'quiet'
400
401               A sample /boot/grub2/grub.cfg bootloader configuration file is
402               listed below.
403
404                   default=0
405                   timeout=5
406                   serial --unit=0 --speed=9600
407                   terminal --timeout=5 serial console
408                   title Fedora (2.6.29.5-191.fc11.x86_64)
409                     root (hd0,0)
410                     kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell
411                     initrd /dracut-2.6.29.5-191.fc11.x86_64.img
412
413            3. If system boot fails, you will be dropped into a shell as seen
414               in the example below.
415
416                   No root device found
417                   Dropping to debug shell.
418
419                   #
420
421            4. Use this shell prompt to gather the information requested above
422               (see the section called “All bug reports”).
423
424       Accessing the root volume from the dracut shell
425           From the dracut debug shell, you can manually perform the task of
426           locating and preparing your root volume for boot. The required
427           steps will depend on how your root volume is configured. Common
428           scenarios include:
429
430           ·   A block device (e.g.  /dev/sda7)
431
432           ·   A LVM logical volume (e.g.  /dev/VolGroup00/LogVol00)
433
434           ·   An encrypted device (e.g.
435               /dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83)
436
437           ·   A network attached device (e.g.
438               netroot=iscsi:@192.168.0.4::3260::iqn.2009-02.org.example:for.all)
439
440           The exact method for locating and preparing will vary. However, to
441           continue with a successful boot, the objective is to locate your
442           root volume and create a symlink /dev/root which points to the file
443           system. For example, the following example demonstrates accessing
444           and booting a root volume that is an encrypted LVM Logical volume.
445
446            1. Inspect your partitions using parted
447
448                   # parted /dev/sda -s p
449                   Model: ATA HTS541060G9AT00 (scsi)
450                   Disk /dev/sda: 60.0GB
451                   Sector size (logical/physical): 512B/512B
452                   Partition Table: msdos
453                   Number  Start   End     Size    Type      File system  Flags
454                   1      32.3kB  10.8GB  107MB   primary   ext4         boot
455                   2      10.8GB  55.6GB  44.7GB  logical                lvm
456
457            2. You recall that your root volume was a LVM logical volume. Scan
458               and activate any logical volumes.
459
460                   # lvm vgscan
461                   # lvm vgchange -ay
462
463            3. You should see any logical volumes now using the command blkid:
464
465                   # blkid
466                   /dev/sda1: UUID="3de247f3-5de4-4a44-afc5-1fe179750cf7" TYPE="ext4"
467                   /dev/sda2: UUID="Ek4dQw-cOtq-5MJu-OGRF-xz5k-O2l8-wdDj0I" TYPE="LVM2_member"
468                   /dev/mapper/linux-root: UUID="def0269e-424b-4752-acf3-1077bf96ad2c" TYPE="crypto_LUKS"
469                   /dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext3"
470                   /dev/mapper/linux-swap: UUID="47b4d329-975c-4c08-b218-f9c9bf3635f1" TYPE="swap"
471
472            4. From the output above, you recall that your root volume exists
473               on an encrypted block device. Following the guidance disk
474               encryption guidance from the Installation Guide, you unlock
475               your encrypted root volume.
476
477                   # UUID=$(cryptsetup luksUUID /dev/mapper/linux-root)
478                   # cryptsetup luksOpen /dev/mapper/linux-root luks-$UUID
479                   Enter passphrase for /dev/mapper/linux-root:
480                   Key slot 0 unlocked.
481
482            5. Next, make a symbolic link to the unlocked root volume
483
484                   # ln -s /dev/mapper/luks-$UUID /dev/root
485
486            6. With the root volume available, you may continue booting the
487               system by exiting the dracut shell
488
489                   # exit
490
491       Additional dracut boot parameters
492           For more debugging options, see dracut.cmdline(7).
493
494       Debugging dracut on shutdown
495           To debug the shutdown sequence on systemd systems, you can rd.break
496           on pre-shutdown or shutdown.
497
498           To do this from an already booted system:
499
500               # mkdir -p /run/initramfs/etc/cmdline.d
501               # echo "rd.debug rd.break=pre-shutdown rd.break=shutdown" > /run/initramfs/etc/cmdline.d/debug.conf
502               # touch /run/initramfs/.need_shutdown
503
504           This will give you a dracut shell after the system pivot’ed back in
505           the initramfs.
506

OPTIONS

508       --kver <kernel version>
509           set the kernel version. This enables to specify the kernel version,
510           without specifying the location of the initramfs image. For
511           example:
512
513           # dracut --kver 3.5.0-0.rc7.git1.2.fc18.x86_64
514
515       -f, --force
516           overwrite existing initramfs file.
517
518       -a, --add <list of dracut modules>
519           add a space-separated list of dracut modules to the default set of
520           modules. This parameter can 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 --add "module1 module2"  ...
527
528       --force-add <list of dracut modules>
529           force to add a space-separated list of dracut modules to the
530           default set of modules, when -H is specified. This parameter can be
531           specified multiple times.
532
533               Note
534               If [LIST] has multiple arguments, then you have to put these in
535               quotes. For example:
536
537                   # dracut --force-add "module1 module2"  ...
538
539       -o, --omit <list of dracut modules>
540           omit a space-separated list of dracut modules. This parameter can
541           be 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 --omit "module1 module2"  ...
548
549       -m, --modules <list of dracut modules>
550           specify a space-separated list of dracut modules to call when
551           building the initramfs. Modules are located in
552           /usr/lib/dracut/modules.d. This parameter can be specified multiple
553           times. This option forces dracut to only include the specified
554           dracut modules. In most cases the "--add" option is what you want
555           to use.
556
557               Note
558               If [LIST] has multiple arguments, then you have to put these in
559               quotes. For example:
560
561                   # dracut --modules "module1 module2"  ...
562
563       -d, --drivers <list of kernel modules>
564           specify a space-separated list of kernel modules to exclusively
565           include in the initramfs. The kernel modules have to be specified
566           without the ".ko" suffix. This parameter can be specified multiple
567           times.
568
569               Note
570               If [LIST] has multiple arguments, then you have to put these in
571               quotes. For example:
572
573                   # dracut --drivers "kmodule1 kmodule2"  ...
574
575       --add-drivers <list of kernel modules>
576           specify a space-separated list of kernel modules to add to the
577           initramfs. The kernel modules have to be specified without the
578           ".ko" suffix. This parameter can be specified multiple times.
579
580               Note
581               If [LIST] has multiple arguments, then you have to put these in
582               quotes. For example:
583
584                   # dracut --add-drivers "kmodule1 kmodule2"  ...
585
586       --force-drivers <list of kernel modules>
587           See add-drivers above. But in this case it is ensured that the
588           drivers are tried to be loaded early via modprobe.
589
590               Note
591               If [LIST] has multiple arguments, then you have to put these in
592               quotes. For example:
593
594                   # dracut --force-drivers "kmodule1 kmodule2"  ...
595
596       --omit-drivers <list of kernel modules>
597           specify a space-separated list of kernel modules not to add to the
598           initramfs. The kernel modules have to be specified without the
599           ".ko" suffix. This parameter can be specified multiple times.
600
601               Note
602               If [LIST] has multiple arguments, then you have to put these in
603               quotes. For example:
604
605                   # dracut --omit-drivers "kmodule1 kmodule2"  ...
606
607       --filesystems <list of filesystems>
608           specify a space-separated list of kernel filesystem modules to
609           exclusively include in the generic initramfs. This parameter can be
610           specified multiple times.
611
612               Note
613               If [LIST] has multiple arguments, then you have to put these in
614               quotes. For example:
615
616                   # dracut --filesystems "filesystem1 filesystem2"  ...
617
618       -k, --kmoddir <kernel directory>
619           specify the directory, where to look for kernel modules
620
621       --fwdir <dir>[:<dir>...]++
622           specify additional directories, where to look for firmwares. This
623           parameter can be specified multiple times.
624
625       --kernel-cmdline <parameters>
626           specify default kernel command line parameters
627
628       --kernel-only
629           only install kernel drivers and firmware files
630
631       --no-kernel
632           do not install kernel drivers and firmware files
633
634       --early-microcode
635           Combine early microcode with ramdisk
636
637       --no-early-microcode
638           Do not combine early microcode with ramdisk
639
640       --print-cmdline
641           print the kernel command line for the current disk layout
642
643       --mdadmconf
644           include local /etc/mdadm.conf
645
646       --nomdadmconf
647           do not include local /etc/mdadm.conf
648
649       --lvmconf
650           include local /etc/lvm/lvm.conf
651
652       --nolvmconf
653           do not include local /etc/lvm/lvm.conf
654
655       --fscks [LIST]
656           add a space-separated list of fsck tools, in addition to
657           dracut.conf's specification; the installation is opportunistic
658           (non-existing tools are ignored)
659
660               Note
661               If [LIST] has multiple arguments, then you have to put these in
662               quotes. For example:
663
664                   # dracut --fscks "fsck.foo barfsck"  ...
665
666       --nofscks
667           inhibit installation of any fsck tools
668
669       --strip
670           strip binaries in the initramfs (default)
671
672       --nostrip
673           do not strip binaries in the initramfs
674
675       --hardlink
676           hardlink files in the initramfs (default)
677
678       --nohardlink
679           do not hardlink files in the initramfs
680
681       --prefix <dir>
682           prefix initramfs files with the specified directory
683
684       --noprefix
685           do not prefix initramfs files (default)
686
687       -h, --help
688           display help text and exit.
689
690       --debug
691           output debug information of the build process
692
693       -v, --verbose
694           increase verbosity level (default is info(4))
695
696       -q, --quiet
697           decrease verbosity level (default is info(4))
698
699       -c, --conf <dracut configuration file>
700           specify configuration file to use.
701
702           Default: /etc/dracut.conf
703
704       --confdir <configuration directory>
705           specify configuration directory to use.
706
707           Default: /etc/dracut.conf.d
708
709       --tmpdir <temporary directory>
710           specify temporary directory to use.
711
712           Default: /var/tmp
713
714       --sshkey <sshkey file>
715           ssh key file used with ssh-client module.
716
717       --logfile <logfile>
718           logfile to use; overrides any setting from the configuration files.
719
720           Default: /var/log/dracut.log
721
722       -l, --local
723           activates the local mode. dracut will use modules from the current
724           working directory instead of the system-wide installed modules in
725           /usr/lib/dracut/modules.d. This is useful when running dracut from
726           a git checkout.
727
728       -H, --hostonly
729           Host-Only mode: Install only what is needed for booting the local
730           host instead of a generic host and generate host-specific
731           configuration.
732
733               Warning
734               If chrooted to another root other than the real root device,
735               use "--fstab" and provide a valid /etc/fstab.
736
737       -N, --no-hostonly
738           Disable Host-Only mode
739
740       --hostonly-cmdline: Store kernel command line arguments needed in the
741       initramfs
742
743       --no-hostonly-cmdline: Do not store kernel command line arguments
744       needed in the initramfs
745
746       --no-hostonly-default-device: Do not generate implicit host devices
747       like root, swap, fstab, etc. Use "--mount" or "--add-device" to
748       explicitly add devices as needed.
749
750       --hostonly-i18n: Install only needed keyboard and font files according
751       to the host configuration (default).
752
753       --no-hostonly-i18n: Install all keyboard and font files available.
754
755       --persistent-policy <policy>
756           Use <policy> to address disks and partitions.  <policy> can be any
757           directory name found in /dev/disk. E.g. "by-uuid", "by-label"
758
759       --fstab
760           Use /etc/fstab instead of /proc/self/mountinfo.
761
762       --add-fstab <filename>
763           Add entries of <filename> to the initramfs /etc/fstab.
764
765       --mount "<device> <mountpoint> <filesystem type> [<filesystem options>
766       [<dump frequency> [<fsck order>]]]"
767           Mount <device> on <mountpoint> with <filesystem type> in the
768           initramfs.  <filesystem options>, <dump options> and <fsck order>
769           can be specified, see fstab manpage for the details. The default
770           <filesystem options> is "defaults". The default <dump frequency> is
771           "0". the default <fsck order> is "2".
772
773       --mount "<mountpoint>"
774           Like above, but <device>, <filesystem type> and <filesystem
775           options> are determined by looking at the current mounts.
776
777       --add-device <device>
778           Bring up <device> in initramfs, <device> should be the device name.
779           This can be useful in hostonly mode for resume support when your
780           swap is on LVM or an encrypted partition. [NB --device can be used
781           for compatibility with earlier releases]
782
783       -i, --include <SOURCE> <TARGET>
784           include the files in the SOURCE directory into the TARGET directory
785           in the final initramfs. If SOURCE is a file, it will be installed
786           to TARGET in the final initramfs. This parameter can be specified
787           multiple times.
788
789       -I, --install <file list>
790           install the space separated list of files into the initramfs.
791
792               Note
793               If [LIST] has multiple arguments, then you have to put these in
794               quotes. For example:
795
796                   # dracut --install "/bin/foo /sbin/bar"  ...
797
798       --install-optional <file list>
799           install the space separated list of files into the initramfs, if
800           they exist.
801
802       --gzip
803           Compress the generated initramfs using gzip. This will be done by
804           default, unless another compression option or --no-compress is
805           passed. Equivalent to "--compress=gzip -9"
806
807       --bzip2
808           Compress the generated initramfs using bzip2.
809
810               Warning
811               Make sure your kernel has bzip2 decompression support compiled
812               in, otherwise you will not be able to boot. Equivalent to
813               "--compress=bzip2"
814
815       --lzma
816           Compress the generated initramfs using lzma.
817
818               Warning
819               Make sure your kernel has lzma decompression support compiled
820               in, otherwise you will not be able to boot. Equivalent to "lzma
821               --compress=lzma -9"
822
823       --xz
824           Compress the generated initramfs using xz.
825
826               Warning
827               Make sure your kernel has xz decompression support compiled in,
828               otherwise you will not be able to boot. Equivalent to "lzma
829               --compress=xz --check=crc32 --lzma2=dict=1MiB"
830
831       --lzo
832           Compress the generated initramfs using lzop.
833
834           Warning
835           Make sure your kernel has lzo decompression support compiled in,
836           otherwise you will not be able to boot.
837
838       --lz4
839           Compress the generated initramfs using lz4.
840
841           Warning
842           Make sure your kernel has lz4 decompression support compiled in,
843           otherwise you will not be able to boot.
844
845       --zstd
846           Compress the generated initramfs using Zstandard.
847
848           Warning
849           Make sure your kernel has zstd decompression support compiled in,
850           otherwise you will not be able to boot.
851
852       --compress <compressor>
853           Compress the generated initramfs using the passed compression
854           program. If you pass it just the name of a compression program, it
855           will call that program with known-working arguments. If you pass a
856           quoted string with arguments, it will be called with exactly those
857           arguments. Depending on what you pass, this may result in an
858           initramfs that the kernel cannot decompress. The default value can
859           also be set via the INITRD_COMPRESS environment variable.
860
861       --no-compress
862           Do not compress the generated initramfs. This will override any
863           other compression options.
864
865       --reproducible
866           Create reproducible images.
867
868       --no-reproducible
869           Do not create reproducible images.
870
871       --list-modules
872           List all available dracut modules.
873
874       -M, --show-modules
875           Print included module’s name to standard output during build.
876
877       --keep
878           Keep the initramfs temporary directory for debugging purposes.
879
880       --printsize
881           Print out the module install size
882
883       --profile: Output profile information of the build process
884
885       --ro-mnt: Mount / and /usr read-only by default.
886
887       -L, --stdlog <level>
888           [0-6] Specify logging level (to standard error)
889
890                     0 - suppress any messages
891                     1 - only fatal errors
892                     2 - all errors
893                     3 - warnings
894                     4 - info
895                     5 - debug info (here starts lots of output)
896                     6 - trace info (and even more)
897
898       --regenerate-all
899           Regenerate all initramfs images at the default location with the
900           kernel versions found on the system. Additional parameters are
901           passed through.
902
903       --loginstall <DIR>
904           Log all files installed from the host to <DIR>.
905
906       --uefi
907           Instead of creating an initramfs image, dracut will create an UEFI
908           executable, which can be executed by an UEFI BIOS. The default
909           output filename is
910           <EFI>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi. <EFI>
911           might be /efi, /boot or /boot/efi depending on where the ESP
912           partition is mounted. The <BUILD_ID> is taken from BUILD_ID in
913           /usr/lib/os-release or if it exists /etc/os-release and is left
914           out, if BUILD_ID is non-existant or empty.
915
916       --no-machineid
917           affects the default output filename of --uefi and will discard the
918           <MACHINE_ID> part.
919
920       --uefi-stub <FILE>
921           Specifies the UEFI stub loader, which will load the attached
922           kernel, initramfs and kernel command line and boots the kernel. The
923           default is
924           $prefix/lib/systemd/boot/efi/linux<EFI-MACHINE-TYPE-NAME>.efi.stub
925           or $prefix/lib/gummiboot/linux<EFI-MACHINE-TYPE-NAME>.efi.stub
926
927       --kernel-image <FILE>
928           Specifies the kernel image, which to include in the UEFI
929           executable. The default is /lib/modules/<KERNEL-VERSION>/vmlinuz or
930           /boot/vmlinuz-<KERNEL-VERSION>
931

ENVIRONMENT

933       INITRD_COMPRESS
934           sets the default compression program. See --compress.
935

FILES

937       /var/log/dracut.log
938           logfile of initramfs image creation
939
940       /tmp/dracut.log
941           logfile of initramfs image creation, if /var/log/dracut.log is not
942           writable
943
944       /etc/dracut.conf
945           see dracut.conf5
946
947       /etc/dracut.conf.d/*.conf
948           see dracut.conf5
949
950       /usr/lib/dracut/dracut.conf.d/*.conf
951           see dracut.conf5
952
953   Configuration in the initramfs
954       /etc/conf.d/
955           Any files found in /etc/conf.d/ will be sourced in the initramfs to
956           set initial values. Command line options will override these values
957           set in the configuration files.
958
959       /etc/cmdline
960           Can contain additional command line options. Deprecated, better use
961           /etc/cmdline.d/*.conf.
962
963       /etc/cmdline.d/*.conf
964           Can contain additional command line options.
965

AVAILABILITY

967       The dracut command is part of the dracut package and is available from
968       https://dracut.wiki.kernel.org
969

AUTHORS

971       Harald Hoyer
972
973       Victor Lowther
974
975       Philippe Seewer
976
977       Warren Togami
978
979       Amadeusz Żołnowski
980
981       Jeremy Katz
982
983       David Dillow
984
985       Will Woods
986

SEE ALSO

988       dracut.cmdline(7) dracut.conf(5) lsinitrd(1)
989
990
991
992dracut                            07/24/2019                         DRACUT(8)
Impressum