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)
29 **--kver** _<kernel version>_::
30 set the kernel version. This enables to specify the kernel version, without
31 specifying the location of the initramfs image. For example:
33 # dracut --kver 3.5.0-0.rc7.git1.2.fc18.x86_64
37 overwrite existing initramfs file.
39 **-m, --modules** _<list of dracut modules>_::
40 specify a space-separated list of dracut modules to call when building the
41 initramfs. Modules are located in _/usr/lib/dracut/modules.d_. This
42 parameter can be specified multiple times.
45 ===============================
46 If [LIST] has multiple arguments, then you have to put these in quotes. For
49 # dracut --modules "module1 module2" ...
51 ===============================
53 **-o, --omit** _<list of dracut modules>_::
54 omit a space-separated list of dracut modules. This parameter can be
55 specified multiple times.
58 ===============================
59 If [LIST] has multiple arguments, then you have to put these in quotes. For
62 # dracut --omit "module1 module2" ...
64 ===============================
66 **-a, --add** _<list of dracut modules>_::
67 add a space-separated list of dracut modules to the default set of modules.
68 This parameter can be specified multiple times.
71 ===============================
72 If [LIST] has multiple arguments, then you have to put these in quotes. For
75 # dracut --add "module1 module2" ...
77 ===============================
79 **--force-add** _<list of dracut modules>_::
80 force to add a space-separated list of dracut modules to the default set of
81 modules, when -H is specified. This parameter can be specified multiple
85 ===============================
86 If [LIST] has multiple arguments, then you have to put these in quotes. For
89 # dracut --force-add "module1 module2" ...
91 ===============================
93 **-d, --drivers** _<list of kernel modules>_::
94 specify a space-separated list of kernel modules to exclusively include
95 in the initramfs. The kernel modules have to be specified without the ".ko"
96 suffix. This parameter can be specified multiple times.
99 ===============================
100 If [LIST] has multiple arguments, then you have to put these in quotes. For
103 # dracut --drivers "kmodule1 kmodule2" ...
105 ===============================
107 **--add-drivers** _<list of kernel modules>_::
108 specify a space-separated list of kernel modules to add to the initramfs.
109 The kernel modules have to be specified without the ".ko" suffix. This
110 parameter can be specified multiple times.
113 ===============================
114 If [LIST] has multiple arguments, then you have to put these in quotes. For
117 # dracut --add-drivers "kmodule1 kmodule2" ...
119 ===============================
121 **--omit-drivers** _<list of kernel modules>_::
122 specify a space-separated list of kernel modules not to add to the
124 The kernel modules have to be specified without the ".ko" suffix. This
125 parameter can be specified multiple times.
128 ===============================
129 If [LIST] has multiple arguments, then you have to put these in quotes. For
132 # dracut --omit-drivers "kmodule1 kmodule2" ...
134 ===============================
136 **--filesystems** _<list of filesystems>_::
137 specify a space-separated list of kernel filesystem modules to exclusively
138 include in the generic initramfs. This parameter can be specified multiple
142 ===============================
143 If [LIST] has multiple arguments, then you have to put these in quotes. For
146 # dracut --filesystems "filesystem1 filesystem2" ...
148 ===============================
150 **-k, --kmoddir** _<kernel directory>_::
151 specify the directory, where to look for kernel modules
153 **--fwdir** _<dir>[:<dir>...]++_::
154 specify additional directories, where to look for firmwares. This parameter
155 can be specified multiple times.
158 only install kernel drivers and firmware files
161 do not install kernel drivers and firmware files
164 include local _/etc/mdadm.conf_
167 do not include local _/etc/mdadm.conf_
170 include local _/etc/lvm/lvm.conf_
173 do not include local _/etc/lvm/lvm.conf_
176 add a space-separated list of fsck tools, in addition to _dracut.conf_'s
177 specification; the installation is opportunistic (non-existing tools are
181 ===============================
182 If [LIST] has multiple arguments, then you have to put these in quotes. For
185 # dracut --fscks "fsck.foo barfsck" ...
187 ===============================
190 inhibit installation of any fsck tools
193 strip binaries in the initramfs
196 do not strip binaries in the initramfs (default)
199 hardlink files in the initramfs (default)
202 do not hardlink files in the initramfs
204 **--prefix** _<dir>_::
205 prefix initramfs files with the specified directory
208 do not prefix initramfs files (default)
211 display help text and exit.
214 output debug information of the build process
217 increase verbosity level (default is info(4))
219 **-q, --quiet**:: decrease verbosity level (default is info(4))
221 **-c, --conf** _<dracut configuration file>_::
222 specify configuration file to use.
227 **--confdir** _<configuration directory>_::
228 specify configuration directory to use.
233 **--tmpdir** _<temporary directory>_::
234 specify temporary directory to use.
239 **--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module.
242 activates the local mode. dracut will use modules from the current working
243 directory instead of the system-wide installed modules in
244 _/usr/lib/dracut/modules.d_.
245 This is useful when running dracut from a git checkout.
248 Host-Only mode: Install only what is needed for booting the local host
249 instead of a generic host and generate host-specific configuration.
253 If chrooted to another root other than the real root device, use "--fstab" and
254 provide a valid _/etc/fstab_.
258 Disable Host-Only mode
261 Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
263 **--add-fstab** _<filename>_ ::
264 Add entries of _<filename>_ to the initramfs /etc/fstab.
266 **--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem options>_"::
267 Mount _<device>_ on _<mountpoint>_ with _<filesystem type>_ and _<filesystem
268 options>_ in the initramfs
270 **-i, --include** _<SOURCE>_ _<TARGET>_::
271 include the files in the SOURCE directory into the
272 TARGET directory in the final initramfs. If SOURCE is a file, it will be
273 installed to TARGET in the final initramfs. This parameter can be specified
276 **-I, --install** _<file list>_::
277 install the space separated list of files into the initramfs.
280 ===============================
281 If [LIST] has multiple arguments, then you have to put these in quotes. For
284 # dracut --install "/bin/foo /sbin/bar" ...
286 ===============================
289 Compress the generated initramfs using gzip. This will be done by default,
290 unless another compression option or --no-compress is passed. Equivalent to
294 Compress the generated initramfs using bzip2.
298 Make sure your kernel has bzip2 decompression support compiled in, otherwise you
299 will not be able to boot. Equivalent to "--compress=bzip2"
303 Compress the generated initramfs using lzma.
307 Make sure your kernel has lzma decompression support compiled in, otherwise you
308 will not be able to boot. Equivalent to "--compress=lzma -9"
312 Compress the generated initramfs using xz.
316 Make sure your kernel has xz decompression support compiled in, otherwise you
317 will not be able to boot. Equivalent to "--compress=xz --check=crc32
321 **--compress** _<compressor>_::
322 Compress the generated initramfs using the passed compression program. If
323 you pass it just the name of a compression program, it will call that
324 program with known-working arguments. If you pass a quoted string with
325 arguments, it will be called with exactly those arguments. Depending on what
326 you pass, this may result in an initramfs that the kernel cannot decompress.
329 Do not compress the generated initramfs. This will override any other
333 List all available dracut modules.
335 **-M, --show-modules**::
336 Print included module's name to standard output during build.
339 Keep the initramfs temporary directory for debugging purposes.
343 _/var/log/dracut.log_::
344 logfile of initramfs image creation
347 logfile of initramfs image creation, if _/var/log/dracut.log_ is not
353 _/etc/dracut.conf.d/*.conf_::
356 Configuration in the initramfs
357 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
359 Any files found in _/etc/conf.d/_ will be sourced in the initramfs to
360 set initial values. Command line options will override these values
361 set in the configuration files.
364 Can contain additional command line options.
368 The dracut command is part of the dracut package and is available from
369 link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
391 *dracut.cmdline*(7) *dracut.conf*(5)