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 initramfs.
34 Modules are located in _/usr/lib/dracut/modules.d_. This parameter can be
35 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 specified multiple times.
50 ===============================
51 If [LIST] has multiple arguments, then you have to put these in quotes. For
54 # dracut --omit "module1 module2" ...
56 ===============================
58 **-a, --add** _<list of dracut modules>_::
59 add a space-separated list of dracut modules to the default set of modules.
60 This parameter can be specified multiple times.
63 ===============================
64 If [LIST] has multiple arguments, then you have to put these in quotes. For
67 # dracut --add "module1 module2" ...
69 ===============================
71 **--force-add** _<list of dracut modules>_::
72 force to add a space-separated list of dracut modules to the default set of
73 modules, when -H is specified. This parameter can be specified multiple
77 ===============================
78 If [LIST] has multiple arguments, then you have to put these in quotes. For
81 # dracut --force-add "module1 module2" ...
83 ===============================
85 **-d, --drivers** _<list of kernel modules>_::
86 specify a space-separated list of kernel modules to exclusively include
87 in the initramfs. The kernel modules have to be specified without the ".ko"
88 suffix. This parameter can be specified multiple times.
91 ===============================
92 If [LIST] has multiple arguments, then you have to put these in quotes. For
95 # dracut --drivers "kmodule1 kmodule2" ...
97 ===============================
99 **--add-drivers** _<list of kernel modules>_::
100 specify a space-separated list of kernel modules to add to the initramfs.
101 The kernel modules have to be specified without the ".ko" suffix. This
102 parameter can be specified multiple times.
105 ===============================
106 If [LIST] has multiple arguments, then you have to put these in quotes. For
109 # dracut --add-drivers "kmodule1 kmodule2" ...
111 ===============================
113 **--omit-drivers** _<list of kernel modules>_::
114 specify a space-separated list of kernel modules not to add to the
116 The kernel modules have to be specified without the ".ko" suffix. This
117 parameter can be specified multiple times.
120 ===============================
121 If [LIST] has multiple arguments, then you have to put these in quotes. For
124 # dracut --omit-drivers "kmodule1 kmodule2" ...
126 ===============================
128 **--filesystems** _<list of filesystems>_::
129 specify a space-separated list of kernel filesystem modules to exclusively
130 include in the generic initramfs. This parameter can be specified multiple
134 ===============================
135 If [LIST] has multiple arguments, then you have to put these in quotes. For
138 # dracut --filesystems "filesystem1 filesystem2" ...
140 ===============================
142 **-k, --kmoddir** _<kernel directory>_::
143 specify the directory, where to look for kernel modules
145 **--fwdir** _<dir>[:<dir>...]++_::
146 specify additional directories, where to look for firmwares. This parameter
147 can be specified multiple times.
150 only install kernel drivers and firmware files
153 do not install kernel drivers and firmware files
156 include local _/etc/mdadm.conf_
159 do not include local _/etc/mdadm.conf_
162 include local _/etc/lvm/lvm.conf_
165 do not include local _/etc/lvm/lvm.conf_
168 add a space-separated list of fsck tools, in addition to _dracut.conf_'s
169 specification; the installation is opportunistic (non-existing tools are
173 ===============================
174 If [LIST] has multiple arguments, then you have to put these in quotes. For
177 # dracut --fscks "fsck.foo barfsck" ...
179 ===============================
182 inhibit installation of any fsck tools
185 strip binaries in the initramfs (default)
188 do not strip binaries in the initramfs
190 **--prefix** _<dir>_::
191 prefix initramfs files with the specified directory
194 do not prefix initramfs files (default)
197 display help text and exit.
200 output debug information of the build process
203 increase verbosity level (default is info(4))
205 **-q, --quiet**:: decrease verbosity level (default is info(4))
207 **-c, --conf** _<dracut configuration file>_::
208 specify configuration file to use.
213 **--confdir** _<configuration directory>_::
214 specify configuration directory to use.
219 **--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module.
222 activates the local mode. dracut will use modules from the current working
223 directory instead of the system-wide installed modules in
224 _/usr/lib/dracut/modules.d_.
225 This is useful when running dracut from a git checkout.
228 Host-Only mode: Install only what is needed for booting
229 the local host instead of a generic host.
233 If chrooted to another root other than the real root device, use "--fstab" and provide a valid _/etc/fstab_.
237 Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
239 **--add_fstab** _<filename>_ ::
240 Add entries of _<filename>_ to the initramfs /etc/fstab.
242 **--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem options>_"::
243 Mount _<device>_ on _<mountpoint>_ with _<filesystem type>_ and _<filesystem
244 options>_ in the initramfs
246 **-i, --include** _<SOURCE>_ _<TARGET>_::
247 include the files in the SOURCE directory into the
248 TARGET directory in the final initramfs. If SOURCE is a file, it will be
249 installed to TARGET in the final initramfs. This parameter can be specified
252 **-I, --install** _<file list>_::
253 install the space separated list of files into the initramfs.
256 ===============================
257 If [LIST] has multiple arguments, then you have to put these in quotes. For
261 # dracut --install "/bin/foo /sbin/bar" ...
263 ===============================
266 Compress the generated initramfs using gzip. This will be done by default,
267 unless another compression option or --no-compress is passed. Equivalent to
271 Compress the generated initramfs using bzip2.
275 Make sure your kernel has bzip2 decompression support compiled in, otherwise you
276 will not be able to boot. Equivalent to "--compress=bzip2"
280 Compress the generated initramfs using lzma.
284 Make sure your kernel has lzma decompression support compiled in, otherwise you
285 will not be able to boot. Equivalent to "--compress=lzma -9"
289 Compress the generated initramfs using xz.
293 Make sure your kernel has xz decompression support compiled in, otherwise you
294 will not be able to boot. Equivalent to "--compress=xz --check=crc32
298 **--compress** _<compressor>_::
299 Compress the generated initramfs using the passed compression program. If
300 you pass it just the name of a compression program, it will call that
301 program with known-working arguments. If you pass a quoted string with
302 arguments, it will be called with exactly those arguments. Depending on what
303 you pass, this may result in an initramfs that the kernel cannot decompress.
306 Do not compress the generated initramfs. This will override any other
310 List all available dracut modules.
312 **-M, --show-modules**::
313 Print included module's name to standard output during build.
316 Keep the initramfs temporary directory for debugging purposes.
320 _/var/log/dracut.log_::
321 logfile of initramfs image creation
324 logfile of initramfs image creation, if _/var/log/dracut.log_ is not
330 _/etc/dracut.conf.d/*.conf_::
333 Configuration in the initramfs
334 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
336 Any files found in _/etc/conf.d/_ will be sourced in the initramfs to
337 set initial values. Command line options will override these values
338 set in the configuration files.
341 Can contain additional command line options.
345 The dracut command is part of the dracut package and is available from
346 link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
351 Project Leader and Developer
362 *Amadeusz Żołnowski*::
376 *dracut.cmdline*(7) *dracut.conf*(5)