9 dracut - low-level tool for generating an initramfs image
13 *dracut* ['OPTION...'] [<image> [_<kernel version>_]]
17 dracut creates an initial image used by the kernel for preloading the block
18 device modules (such as IDE, SCSI or RAID) which are needed to access the root
19 filesystem, mounting the root filesystem and booting into the real system.
21 At boot time, the kernel unpacks that archive into RAM disk, mounts and uses it
22 as initial root file system. All finding of the root device happens in this
25 For a complete list of kernel command line options see *dracut.cmdline*(7)
30 overwrite existing initramfs file.
32 **-m, --modules** _<list of dracut modules>_::
33 specify a space-separated list of dracut modules to call when building the
34 initramfs. Modules are located in _/usr/lib/dracut/modules.d_. This
35 parameter can be specified multiple times.
38 ===============================
39 If [LIST] has multiple arguments, then you have to put these in quotes. For
42 # dracut --modules "module1 module2" ...
44 ===============================
46 **-o, --omit** _<list of dracut modules>_::
47 omit a space-separated list of dracut modules. This parameter can be
48 specified multiple times.
51 ===============================
52 If [LIST] has multiple arguments, then you have to put these in quotes. For
55 # dracut --omit "module1 module2" ...
57 ===============================
59 **-a, --add** _<list of dracut modules>_::
60 add a space-separated list of dracut modules to the default set of modules.
61 This parameter can be specified multiple times.
64 ===============================
65 If [LIST] has multiple arguments, then you have to put these in quotes. For
68 # dracut --add "module1 module2" ...
70 ===============================
72 **--force-add** _<list of dracut modules>_::
73 force to add a space-separated list of dracut modules to the default set of
74 modules, when -H is specified. This parameter can be specified multiple
78 ===============================
79 If [LIST] has multiple arguments, then you have to put these in quotes. For
82 # dracut --force-add "module1 module2" ...
84 ===============================
86 **-d, --drivers** _<list of kernel modules>_::
87 specify a space-separated list of kernel modules to exclusively include
88 in the initramfs. The kernel modules have to be specified without the ".ko"
89 suffix. This parameter can be specified multiple times.
92 ===============================
93 If [LIST] has multiple arguments, then you have to put these in quotes. For
96 # dracut --drivers "kmodule1 kmodule2" ...
98 ===============================
100 **--add-drivers** _<list of kernel modules>_::
101 specify a space-separated list of kernel modules to add to the initramfs.
102 The kernel modules have to be specified without the ".ko" suffix. This
103 parameter can be specified multiple times.
106 ===============================
107 If [LIST] has multiple arguments, then you have to put these in quotes. For
110 # dracut --add-drivers "kmodule1 kmodule2" ...
112 ===============================
114 **--omit-drivers** _<list of kernel modules>_::
115 specify a space-separated list of kernel modules not to add to the
117 The kernel modules have to be specified without the ".ko" suffix. This
118 parameter can be specified multiple times.
121 ===============================
122 If [LIST] has multiple arguments, then you have to put these in quotes. For
125 # dracut --omit-drivers "kmodule1 kmodule2" ...
127 ===============================
129 **--filesystems** _<list of filesystems>_::
130 specify a space-separated list of kernel filesystem modules to exclusively
131 include in the generic initramfs. This parameter can be specified multiple
135 ===============================
136 If [LIST] has multiple arguments, then you have to put these in quotes. For
139 # dracut --filesystems "filesystem1 filesystem2" ...
141 ===============================
143 **-k, --kmoddir** _<kernel directory>_::
144 specify the directory, where to look for kernel modules
146 **--fwdir** _<dir>[:<dir>...]++_::
147 specify additional directories, where to look for firmwares. This parameter
148 can be specified multiple times.
151 only install kernel drivers and firmware files
154 do not install kernel drivers and firmware files
157 include local _/etc/mdadm.conf_
160 do not include local _/etc/mdadm.conf_
163 include local _/etc/lvm/lvm.conf_
166 do not include local _/etc/lvm/lvm.conf_
169 add a space-separated list of fsck tools, in addition to _dracut.conf_'s
170 specification; the installation is opportunistic (non-existing tools are
174 ===============================
175 If [LIST] has multiple arguments, then you have to put these in quotes. For
178 # dracut --fscks "fsck.foo barfsck" ...
180 ===============================
183 inhibit installation of any fsck tools
186 strip binaries in the initramfs (default)
189 do not strip binaries in the initramfs
191 **--prefix** _<dir>_::
192 prefix initramfs files with the specified directory
195 do not prefix initramfs files (default)
198 display help text and exit.
201 output debug information of the build process
204 increase verbosity level (default is info(4))
206 **-q, --quiet**:: decrease verbosity level (default is info(4))
208 **-c, --conf** _<dracut configuration file>_::
209 specify configuration file to use.
214 **--confdir** _<configuration directory>_::
215 specify configuration directory to use.
220 **--tmpdir** _<temporary directory>_::
221 specify temporary directory to use.
226 **--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module.
229 activates the local mode. dracut will use modules from the current working
230 directory instead of the system-wide installed modules in
231 _/usr/lib/dracut/modules.d_.
232 This is useful when running dracut from a git checkout.
235 Host-Only mode: Install only what is needed for booting the local host
236 instead of a generic host and generate host-specific configuration.
240 If chrooted to another root other than the real root device, use "--fstab" and
241 provide a valid _/etc/fstab_.
245 Disable Host-Only mode
248 Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
250 **--add-fstab** _<filename>_ ::
251 Add entries of _<filename>_ to the initramfs /etc/fstab.
253 **--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem options>_"::
254 Mount _<device>_ on _<mountpoint>_ with _<filesystem type>_ and _<filesystem
255 options>_ in the initramfs
257 **-i, --include** _<SOURCE>_ _<TARGET>_::
258 include the files in the SOURCE directory into the
259 TARGET directory in the final initramfs. If SOURCE is a file, it will be
260 installed to TARGET in the final initramfs. This parameter can be specified
263 **-I, --install** _<file list>_::
264 install the space separated list of files into the initramfs.
267 ===============================
268 If [LIST] has multiple arguments, then you have to put these in quotes. For
272 # dracut --install "/bin/foo /sbin/bar" ...
274 ===============================
277 Compress the generated initramfs using gzip. This will be done by default,
278 unless another compression option or --no-compress is passed. Equivalent to
282 Compress the generated initramfs using bzip2.
286 Make sure your kernel has bzip2 decompression support compiled in, otherwise you
287 will not be able to boot. Equivalent to "--compress=bzip2"
291 Compress the generated initramfs using lzma.
295 Make sure your kernel has lzma decompression support compiled in, otherwise you
296 will not be able to boot. Equivalent to "--compress=lzma -9"
300 Compress the generated initramfs using xz.
304 Make sure your kernel has xz decompression support compiled in, otherwise you
305 will not be able to boot. Equivalent to "--compress=xz --check=crc32
309 **--compress** _<compressor>_::
310 Compress the generated initramfs using the passed compression program. If
311 you pass it just the name of a compression program, it will call that
312 program with known-working arguments. If you pass a quoted string with
313 arguments, it will be called with exactly those arguments. Depending on what
314 you pass, this may result in an initramfs that the kernel cannot decompress.
317 Do not compress the generated initramfs. This will override any other
321 List all available dracut modules.
323 **-M, --show-modules**::
324 Print included module's name to standard output during build.
327 Keep the initramfs temporary directory for debugging purposes.
331 _/var/log/dracut.log_::
332 logfile of initramfs image creation
335 logfile of initramfs image creation, if _/var/log/dracut.log_ is not
341 _/etc/dracut.conf.d/*.conf_::
344 Configuration in the initramfs
345 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
347 Any files found in _/etc/conf.d/_ will be sourced in the initramfs to
348 set initial values. Command line options will override these values
349 set in the configuration files.
352 Can contain additional command line options.
356 The dracut command is part of the dracut package and is available from
357 link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
362 Project Leader and Developer
373 *Amadeusz Żołnowski*::
387 *dracut.cmdline*(7) *dracut.conf*(5)