9 dracut - low-level tool for generating an initramfs image
13 *dracut* [__OPTION...__] [__<image>__ [__<kernel version>__]]
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.
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.
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
31 For a complete list of kernel command line options see *dracut.cmdline*(7).
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 safed 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 command line.
37 _/run/initramfs/rdsosreport.txt_ contains all logs and the output of some tools.
38 It should be attached to any report about dracut problems.
43 include::dracut.usage.asc[]
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:
51 # dracut --kver 3.5.0-0.rc7.git1.2.fc18.x86_64
55 overwrite existing initramfs file.
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.
63 ===============================
64 If [LIST] has multiple arguments, then you have to put these in quotes. For
67 # dracut --modules "module1 module2" ...
69 ===============================
71 **-o, --omit** _<list of dracut modules>_::
72 omit a space-separated list of dracut modules. This parameter can be
73 specified multiple times.
76 ===============================
77 If [LIST] has multiple arguments, then you have to put these in quotes. For
80 # dracut --omit "module1 module2" ...
82 ===============================
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.
89 ===============================
90 If [LIST] has multiple arguments, then you have to put these in quotes. For
93 # dracut --add "module1 module2" ...
95 ===============================
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
103 ===============================
104 If [LIST] has multiple arguments, then you have to put these in quotes. For
107 # dracut --force-add "module1 module2" ...
109 ===============================
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.
117 ===============================
118 If [LIST] has multiple arguments, then you have to put these in quotes. For
121 # dracut --drivers "kmodule1 kmodule2" ...
123 ===============================
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.
131 ===============================
132 If [LIST] has multiple arguments, then you have to put these in quotes. For
135 # dracut --add-drivers "kmodule1 kmodule2" ...
137 ===============================
139 **--omit-drivers** _<list of kernel modules>_::
140 specify a space-separated list of kernel modules not to add to the
142 The kernel modules have to be specified without the ".ko" suffix. This
143 parameter can be specified multiple times.
146 ===============================
147 If [LIST] has multiple arguments, then you have to put these in quotes. For
150 # dracut --omit-drivers "kmodule1 kmodule2" ...
152 ===============================
154 **--filesystems** _<list of filesystems>_::
155 specify a space-separated list of kernel filesystem modules to exclusively
156 include in the generic initramfs. This parameter can be specified multiple
160 ===============================
161 If [LIST] has multiple arguments, then you have to put these in quotes. For
164 # dracut --filesystems "filesystem1 filesystem2" ...
166 ===============================
168 **-k, --kmoddir** _<kernel directory>_::
169 specify the directory, where to look for kernel modules
171 **--fwdir** _<dir>[:<dir>...]++_::
172 specify additional directories, where to look for firmwares. This parameter
173 can be specified multiple times.
175 **--kernel-cmdline <parameters>**::
176 specify default kernel command line parameters
180 only install kernel drivers and firmware files
183 do not install kernel drivers and firmware files
185 **--early-microcode**::
186 Combine early microcode with ramdisk
188 **--no-early-microcode**::
189 Do not combine early microcode with ramdisk
191 **--print-cmdline**::
192 print the kernel command line for the current disk layout
195 include local _/etc/mdadm.conf_
198 do not include local _/etc/mdadm.conf_
201 include local _/etc/lvm/lvm.conf_
204 do not include local _/etc/lvm/lvm.conf_
207 add a space-separated list of fsck tools, in addition to _dracut.conf_'s
208 specification; the installation is opportunistic (non-existing tools are
212 ===============================
213 If [LIST] has multiple arguments, then you have to put these in quotes. For
216 # dracut --fscks "fsck.foo barfsck" ...
218 ===============================
221 inhibit installation of any fsck tools
224 strip binaries in the initramfs (default)
227 do not strip binaries in the initramfs
230 prelink binaries in the initramfs (default)
233 do not prelink binaries in the initramfs
236 hardlink files in the initramfs (default)
239 do not hardlink files in the initramfs
241 **--prefix** _<dir>_::
242 prefix initramfs files with the specified directory
245 do not prefix initramfs files (default)
248 display help text and exit.
251 output debug information of the build process
254 increase verbosity level (default is info(4))
256 **-q, --quiet**:: decrease verbosity level (default is info(4))
258 **-c, --conf** _<dracut configuration file>_::
259 specify configuration file to use.
264 **--confdir** _<configuration directory>_::
265 specify configuration directory to use.
270 **--tmpdir** _<temporary directory>_::
271 specify temporary directory to use.
276 **--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module.
279 activates the local mode. dracut will use modules from the current working
280 directory instead of the system-wide installed modules in
281 _/usr/lib/dracut/modules.d_.
282 This is useful when running dracut from a git checkout.
285 Host-Only mode: Install only what is needed for booting the local host
286 instead of a generic host and generate host-specific configuration.
290 If chrooted to another root other than the real root device, use "--fstab" and
291 provide a valid _/etc/fstab_.
294 **-N, --no-hostonly**::
295 Disable Host-Only mode
297 **--persistent-policy** _<policy>_::
298 Use _<policy>_ to address disks and partitions.
299 _<policy>_ can be any directory name found in /dev/disk.
300 E.g. "by-uuid", "by-label"
303 Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
305 **--add-fstab** _<filename>_::
306 Add entries of _<filename>_ to the initramfs /etc/fstab.
308 **--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem options>_"::
309 Mount _<device>_ on _<mountpoint>_ with _<filesystem type>_ and _<filesystem
310 options>_ in the initramfs
312 **--add-device** _<device>_ ::
313 Bring up _<device>_ in initramfs, _<device>_ should be the device name.
314 This can be useful in hostonly mode for resume support when your swap is on
315 LVM or an encrypted partition.
316 [NB --device can be used for compatibility with earlier releases]
318 **-i, --include** _<SOURCE>_ _<TARGET>_::
319 include the files in the SOURCE directory into the
320 TARGET directory in the final initramfs. If SOURCE is a file, it will be
321 installed to TARGET in the final initramfs. This parameter can be specified
324 **-I, --install** _<file list>_::
325 install the space separated list of files into the initramfs.
328 ===============================
329 If [LIST] has multiple arguments, then you have to put these in quotes. For
332 # dracut --install "/bin/foo /sbin/bar" ...
334 ===============================
337 Compress the generated initramfs using gzip. This will be done by default,
338 unless another compression option or --no-compress is passed. Equivalent to
342 Compress the generated initramfs using bzip2.
346 Make sure your kernel has bzip2 decompression support compiled in, otherwise you
347 will not be able to boot. Equivalent to "--compress=bzip2"
351 Compress the generated initramfs using lzma.
355 Make sure your kernel has lzma decompression support compiled in, otherwise you
356 will not be able to boot. Equivalent to "lzma --compress=lzma -9"
360 Compress the generated initramfs using xz.
364 Make sure your kernel has xz decompression support compiled in, otherwise you
365 will not be able to boot. Equivalent to "lzma --compress=xz --check=crc32 --lzma2=dict=1MiB"
369 Compress the generated initramfs using lzop.
372 Make sure your kernel has lzo decompression support compiled in, otherwise you
373 will not be able to boot.
377 Compress the generated initramfs using lz4.
380 Make sure your kernel has lz4 decompression support compiled in, otherwise you
381 will not be able to boot.
384 **--compress** _<compressor>_::
385 Compress the generated initramfs using the passed compression program. If
386 you pass it just the name of a compression program, it will call that
387 program with known-working arguments. If you pass a quoted string with
388 arguments, it will be called with exactly those arguments. Depending on what
389 you pass, this may result in an initramfs that the kernel cannot decompress.
392 Do not compress the generated initramfs. This will override any other
396 List all available dracut modules.
398 **-M, --show-modules**::
399 Print included module's name to standard output during build.
402 Keep the initramfs temporary directory for debugging purposes.
405 Print out the module install size
408 Output profile information of the build process
411 Mount / and /usr read-only by default.
413 **-L, --stdlog** _<level>_::
414 [0-6] Specify logging level (to standard error)
416 0 - suppress any messages
417 1 - only fatal errors
421 5 - debug info (here starts lots of output)
422 6 - trace info (and even more)
425 **--regenerate-all**::
426 Regenerate all initramfs images at the default location with the kernel versions found on the system.
427 Additional parameters are passed through.
431 _/var/log/dracut.log_::
432 logfile of initramfs image creation
435 logfile of initramfs image creation, if _/var/log/dracut.log_ is not
441 _/etc/dracut.conf.d/*.conf_::
444 _/usr/lib/dracut/dracut.conf.d/*.conf_::
447 Configuration in the initramfs
448 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
450 Any files found in _/etc/conf.d/_ will be sourced in the initramfs to
451 set initial values. Command line options will override these values
452 set in the configuration files.
455 Can contain additional command line options. Deprecated, better use /etc/cmdline.d/*.conf.
457 _/etc/cmdline.d/*.conf_::
458 Can contain additional command line options.
462 The dracut command is part of the dracut package and is available from
463 link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
485 *dracut.cmdline*(7) *dracut.conf*(5)