]>
Commit | Line | Data |
---|---|---|
888d53f2 HH |
1 | DRACUT(8) |
2 | ========= | |
3 | :doctype: manpage | |
4 | :man source: dracut | |
5 | :man manual: dracut | |
6 | ||
7 | NAME | |
8 | ---- | |
9 | dracut - low-level tool for generating an initramfs image | |
10 | ||
11 | SYNOPSIS | |
12 | -------- | |
b6c89768 | 13 | *dracut* [__OPTION...__] [__<image>__ [__<kernel version>__]] |
888d53f2 HH |
14 | |
15 | DESCRIPTION | |
16 | ----------- | |
4c3be42c HH |
17 | |
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. | |
22 | ||
888d53f2 HH |
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. | |
26 | ||
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 | |
29 | early userspace. | |
30 | ||
4c3be42c HH |
31 | For a complete list of kernel command line options see *dracut.cmdline*(7). |
32 | ||
64d144ae | 33 | If you are dropped to an emergency shell, while booting your initramfs, |
c33488fe | 34 | the file _/run/initramfs/rdsosreport.txt_ is created, which can be safed to a |
64d144ae | 35 | (to be mounted by hand) partition (usually /boot) or a USB stick. |
ef9ddb91 HH |
36 | Additional debugging info can be produced by adding **rd.debug** to the kernel |
37 | command line. _/run/initramfs/rdsosreport.txt_ contains all logs and the output | |
38 | of some tools. It should be attached to any report about dracut problems. | |
64d144ae | 39 | |
b6c89768 HH |
40 | USAGE |
41 | ----- | |
4c3be42c | 42 | |
b6c89768 | 43 | include::dracut.usage.asc[] |
888d53f2 HH |
44 | |
45 | OPTIONS | |
46 | ------- | |
e65caf36 HH |
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: | |
50 | ---- | |
51 | # dracut --kver 3.5.0-0.rc7.git1.2.fc18.x86_64 | |
52 | ---- | |
53 | ||
888d53f2 HH |
54 | **-f, --force**:: |
55 | overwrite existing initramfs file. | |
56 | ||
57 | **-m, --modules** _<list of dracut modules>_:: | |
0cec2304 HH |
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. | |
888d53f2 HH |
61 | + |
62 | [NOTE] | |
63 | =============================== | |
64 | If [LIST] has multiple arguments, then you have to put these in quotes. For | |
65 | example: | |
66 | ---- | |
67 | # dracut --modules "module1 module2" ... | |
68 | ---- | |
69 | =============================== | |
70 | ||
71 | **-o, --omit** _<list of dracut modules>_:: | |
0cec2304 HH |
72 | omit a space-separated list of dracut modules. This parameter can be |
73 | specified multiple times. | |
18595ced | 74 | + |
888d53f2 HH |
75 | [NOTE] |
76 | =============================== | |
77 | If [LIST] has multiple arguments, then you have to put these in quotes. For | |
78 | example: | |
79 | ---- | |
80 | # dracut --omit "module1 module2" ... | |
81 | ---- | |
82 | =============================== | |
83 | ||
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. | |
87 | + | |
88 | [NOTE] | |
89 | =============================== | |
90 | If [LIST] has multiple arguments, then you have to put these in quotes. For | |
91 | example: | |
92 | ---- | |
93 | # dracut --add "module1 module2" ... | |
94 | ---- | |
95 | =============================== | |
96 | ||
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 | |
100 | times. | |
101 | + | |
102 | [NOTE] | |
103 | =============================== | |
104 | If [LIST] has multiple arguments, then you have to put these in quotes. For | |
105 | example: | |
106 | ---- | |
107 | # dracut --force-add "module1 module2" ... | |
108 | ---- | |
109 | =============================== | |
110 | ||
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. | |
115 | + | |
116 | [NOTE] | |
117 | =============================== | |
118 | If [LIST] has multiple arguments, then you have to put these in quotes. For | |
119 | example: | |
120 | ---- | |
121 | # dracut --drivers "kmodule1 kmodule2" ... | |
122 | ---- | |
123 | =============================== | |
124 | ||
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. | |
129 | + | |
130 | [NOTE] | |
131 | =============================== | |
132 | If [LIST] has multiple arguments, then you have to put these in quotes. For | |
133 | example: | |
134 | ---- | |
135 | # dracut --add-drivers "kmodule1 kmodule2" ... | |
136 | ---- | |
137 | =============================== | |
138 | ||
139 | **--omit-drivers** _<list of kernel modules>_:: | |
140 | specify a space-separated list of kernel modules not to add to the | |
141 | initramfs. | |
142 | The kernel modules have to be specified without the ".ko" suffix. This | |
143 | parameter can be specified multiple times. | |
144 | + | |
145 | [NOTE] | |
146 | =============================== | |
147 | If [LIST] has multiple arguments, then you have to put these in quotes. For | |
148 | example: | |
149 | ---- | |
150 | # dracut --omit-drivers "kmodule1 kmodule2" ... | |
151 | ---- | |
152 | =============================== | |
153 | ||
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 | |
157 | times. | |
18595ced | 158 | + |
888d53f2 HH |
159 | [NOTE] |
160 | =============================== | |
161 | If [LIST] has multiple arguments, then you have to put these in quotes. For | |
162 | example: | |
163 | ---- | |
164 | # dracut --filesystems "filesystem1 filesystem2" ... | |
165 | ---- | |
166 | =============================== | |
167 | ||
168 | **-k, --kmoddir** _<kernel directory>_:: | |
169 | specify the directory, where to look for kernel modules | |
170 | ||
171 | **--fwdir** _<dir>[:<dir>...]++_:: | |
172 | specify additional directories, where to look for firmwares. This parameter | |
173 | can be specified multiple times. | |
174 | ||
d20fb951 HH |
175 | **--kernel-cmdline <parameters>**:: |
176 | specify default kernel command line parameters | |
177 | ||
178 | ||
888d53f2 HH |
179 | **--kernel-only**:: |
180 | only install kernel drivers and firmware files | |
181 | ||
182 | **--no-kernel**:: | |
183 | do not install kernel drivers and firmware files | |
184 | ||
b7c770e1 DS |
185 | **--early-microcode**:: |
186 | Combine early microcode with ramdisk | |
187 | ||
188 | **--no-early-microcode**:: | |
189 | Do not combine early microcode with ramdisk | |
190 | ||
1743473b HH |
191 | **--print-cmdline**:: |
192 | print the kernel command line for the current disk layout | |
193 | ||
888d53f2 HH |
194 | **--mdadmconf**:: |
195 | include local _/etc/mdadm.conf_ | |
196 | ||
197 | **--nomdadmconf**:: | |
198 | do not include local _/etc/mdadm.conf_ | |
199 | ||
200 | **--lvmconf**:: | |
201 | include local _/etc/lvm/lvm.conf_ | |
202 | ||
203 | **--nolvmconf**:: | |
204 | do not include local _/etc/lvm/lvm.conf_ | |
205 | ||
206 | **--fscks** [LIST]:: | |
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 | |
209 | ignored) | |
210 | + | |
211 | [NOTE] | |
212 | =============================== | |
213 | If [LIST] has multiple arguments, then you have to put these in quotes. For | |
214 | example: | |
215 | ---- | |
216 | # dracut --fscks "fsck.foo barfsck" ... | |
217 | ---- | |
218 | =============================== | |
219 | ||
220 | **--nofscks**:: | |
221 | inhibit installation of any fsck tools | |
222 | ||
223 | **--strip**:: | |
6c128565 | 224 | strip binaries in the initramfs (default) |
888d53f2 HH |
225 | |
226 | **--nostrip**:: | |
6c128565 | 227 | do not strip binaries in the initramfs |
04d18f55 | 228 | |
f4a94278 HH |
229 | **--prelink**:: |
230 | prelink binaries in the initramfs (default) | |
231 | ||
232 | **--noprelink**:: | |
233 | do not prelink binaries in the initramfs | |
234 | ||
04d18f55 HH |
235 | **--hardlink**:: |
236 | hardlink files in the initramfs (default) | |
237 | ||
238 | **--nohardlink**:: | |
239 | do not hardlink files in the initramfs | |
888d53f2 HH |
240 | |
241 | **--prefix** _<dir>_:: | |
242 | prefix initramfs files with the specified directory | |
243 | ||
244 | **--noprefix**:: | |
245 | do not prefix initramfs files (default) | |
246 | ||
888d53f2 HH |
247 | **-h, --help**:: |
248 | display help text and exit. | |
249 | ||
250 | **--debug**:: | |
251 | output debug information of the build process | |
252 | ||
253 | **-v, --verbose**:: | |
254 | increase verbosity level (default is info(4)) | |
255 | ||
256 | **-q, --quiet**:: decrease verbosity level (default is info(4)) | |
257 | ||
258 | **-c, --conf** _<dracut configuration file>_:: | |
259 | specify configuration file to use. | |
260 | + | |
261 | Default: | |
262 | _/etc/dracut.conf_ | |
263 | ||
264 | **--confdir** _<configuration directory>_:: | |
265 | specify configuration directory to use. | |
266 | + | |
267 | Default: | |
268 | _/etc/dracut.conf.d_ | |
269 | ||
4dd68ca4 AŻ |
270 | **--tmpdir** _<temporary directory>_:: |
271 | specify temporary directory to use. | |
272 | + | |
273 | Default: | |
274 | _/var/tmp_ | |
275 | ||
888d53f2 HH |
276 | **--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module. |
277 | ||
ee54b840 HR |
278 | **--logfile** _<logfile>_:: logfile to use; overrides any setting from |
279 | the configuration files. | |
280 | + | |
281 | Default: | |
282 | _/var/log/dracut.log_ | |
283 | ||
888d53f2 HH |
284 | **-l, --local**:: |
285 | activates the local mode. dracut will use modules from the current working | |
286 | directory instead of the system-wide installed modules in | |
287 | _/usr/lib/dracut/modules.d_. | |
288 | This is useful when running dracut from a git checkout. | |
289 | ||
290 | **-H, --hostonly**:: | |
1d97bb8b AŻ |
291 | Host-Only mode: Install only what is needed for booting the local host |
292 | instead of a generic host and generate host-specific configuration. | |
888d53f2 HH |
293 | + |
294 | [WARNING] | |
295 | ==== | |
0cec2304 HH |
296 | If chrooted to another root other than the real root device, use "--fstab" and |
297 | provide a valid _/etc/fstab_. | |
888d53f2 HH |
298 | ==== |
299 | ||
472189da | 300 | **-N, --no-hostonly**:: |
cb74b382 HH |
301 | Disable Host-Only mode |
302 | ||
ab9457ef HH |
303 | **--hostonly-cmdline**: |
304 | Store kernel command line arguments needed in the initramfs | |
305 | ||
306 | **--no-hostonly-cmdline**: | |
307 | Do not store kernel command line arguments needed in the initramfs | |
308 | ||
b6c89768 | 309 | **--persistent-policy** _<policy>_:: |
324ea606 HH |
310 | Use _<policy>_ to address disks and partitions. |
311 | _<policy>_ can be any directory name found in /dev/disk. | |
312 | E.g. "by-uuid", "by-label" | |
313 | ||
888d53f2 HH |
314 | **--fstab**:: |
315 | Use _/etc/fstab_ instead of _/proc/self/mountinfo_. | |
316 | ||
b6c89768 | 317 | **--add-fstab** _<filename>_:: |
888d53f2 HH |
318 | Add entries of _<filename>_ to the initramfs /etc/fstab. |
319 | ||
5f6a495b DY |
320 | **--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ [_<filesystem options>_ [_<dump frequency>_ [_<fsck order>_]]]":: |
321 | Mount _<device>_ on _<mountpoint>_ with _<filesystem type>_ in the | |
322 | initramfs. _<filesystem options>_, _<dump options>_ and _<fsck order>_ can | |
323 | be specified, see fstab manpage for the details. | |
324 | The default _<filesystem options>_ is "defaults". | |
325 | The default _<dump frequency>_ is "0". | |
326 | the default _<fsck order>_ is "2". | |
888d53f2 | 327 | |
c586b033 CG |
328 | **--add-device** _<device>_ :: |
329 | Bring up _<device>_ in initramfs, _<device>_ should be the device name. | |
330 | This can be useful in hostonly mode for resume support when your swap is on | |
331 | LVM or an encrypted partition. | |
332 | [NB --device can be used for compatibility with earlier releases] | |
52f1b041 | 333 | |
b6c89768 | 334 | **-i, --include** _<SOURCE>_ _<TARGET>_:: |
888d53f2 HH |
335 | include the files in the SOURCE directory into the |
336 | TARGET directory in the final initramfs. If SOURCE is a file, it will be | |
337 | installed to TARGET in the final initramfs. This parameter can be specified | |
338 | multiple times. | |
339 | ||
b6c89768 | 340 | **-I, --install** _<file list>_:: |
888d53f2 HH |
341 | install the space separated list of files into the initramfs. |
342 | + | |
343 | [NOTE] | |
344 | =============================== | |
345 | If [LIST] has multiple arguments, then you have to put these in quotes. For | |
346 | example: | |
888d53f2 HH |
347 | ---- |
348 | # dracut --install "/bin/foo /sbin/bar" ... | |
349 | ---- | |
350 | =============================== | |
351 | ||
54b68829 HH |
352 | **--install-optional** _<file list>_:: |
353 | install the space separated list of files into the initramfs, if they exist. | |
354 | ||
888d53f2 HH |
355 | **--gzip**:: |
356 | Compress the generated initramfs using gzip. This will be done by default, | |
357 | unless another compression option or --no-compress is passed. Equivalent to | |
358 | "--compress=gzip -9" | |
359 | ||
360 | **--bzip2**:: | |
361 | Compress the generated initramfs using bzip2. | |
362 | + | |
363 | [WARNING] | |
364 | ==== | |
365 | Make sure your kernel has bzip2 decompression support compiled in, otherwise you | |
366 | will not be able to boot. Equivalent to "--compress=bzip2" | |
367 | ==== | |
368 | ||
369 | **--lzma**:: | |
370 | Compress the generated initramfs using lzma. | |
371 | + | |
372 | [WARNING] | |
373 | ==== | |
374 | Make sure your kernel has lzma decompression support compiled in, otherwise you | |
ea3c4e82 | 375 | will not be able to boot. Equivalent to "lzma --compress=lzma -9" |
888d53f2 HH |
376 | ==== |
377 | ||
378 | **--xz**:: | |
379 | Compress the generated initramfs using xz. | |
380 | + | |
381 | [WARNING] | |
382 | ==== | |
383 | Make sure your kernel has xz decompression support compiled in, otherwise you | |
ef9ddb91 HH |
384 | will not be able to boot. Equivalent to |
385 | "lzma --compress=xz --check=crc32 --lzma2=dict=1MiB" | |
888d53f2 HH |
386 | ==== |
387 | ||
871c8e40 | 388 | **--lzo**:: |
389 | Compress the generated initramfs using lzop. | |
390 | [WARNING] | |
391 | ==== | |
392 | Make sure your kernel has lzo decompression support compiled in, otherwise you | |
393 | will not be able to boot. | |
394 | ==== | |
395 | ||
396 | **--lz4**:: | |
397 | Compress the generated initramfs using lz4. | |
398 | [WARNING] | |
399 | ==== | |
400 | Make sure your kernel has lz4 decompression support compiled in, otherwise you | |
401 | will not be able to boot. | |
402 | ==== | |
403 | ||
888d53f2 HH |
404 | **--compress** _<compressor>_:: |
405 | Compress the generated initramfs using the passed compression program. If | |
406 | you pass it just the name of a compression program, it will call that | |
407 | program with known-working arguments. If you pass a quoted string with | |
408 | arguments, it will be called with exactly those arguments. Depending on what | |
409 | you pass, this may result in an initramfs that the kernel cannot decompress. | |
410 | ||
411 | **--no-compress**:: | |
412 | Do not compress the generated initramfs. This will override any other | |
413 | compression options. | |
414 | ||
80626ded HH |
415 | **--reproducible**:: |
416 | Create reproducible images. | |
417 | ||
888d53f2 HH |
418 | **--list-modules**:: |
419 | List all available dracut modules. | |
420 | ||
421 | **-M, --show-modules**:: | |
422 | Print included module's name to standard output during build. | |
423 | ||
424 | **--keep**:: | |
425 | Keep the initramfs temporary directory for debugging purposes. | |
426 | ||
ea3c4e82 HH |
427 | **--printsize**:: |
428 | Print out the module install size | |
429 | ||
430 | **--profile**: | |
431 | Output profile information of the build process | |
432 | ||
433 | **--ro-mnt**: | |
434 | Mount / and /usr read-only by default. | |
435 | ||
436 | **-L, --stdlog** _<level>_:: | |
437 | [0-6] Specify logging level (to standard error) | |
438 | ---- | |
439 | 0 - suppress any messages | |
440 | 1 - only fatal errors | |
441 | 2 - all errors | |
442 | 3 - warnings | |
443 | 4 - info | |
444 | 5 - debug info (here starts lots of output) | |
445 | 6 - trace info (and even more) | |
446 | ---- | |
447 | ||
7d848c55 | 448 | **--regenerate-all**:: |
ef9ddb91 HH |
449 | Regenerate all initramfs images at the default location with the kernel |
450 | versions found on the system. Additional parameters are passed through. | |
7d848c55 | 451 | |
888d53f2 HH |
452 | FILES |
453 | ----- | |
454 | _/var/log/dracut.log_:: | |
455 | logfile of initramfs image creation | |
456 | ||
457 | _/tmp/dracut.log_:: | |
458 | logfile of initramfs image creation, if _/var/log/dracut.log_ is not | |
459 | writable | |
460 | ||
461 | _/etc/dracut.conf_:: | |
462 | see dracut.conf5 | |
463 | ||
464 | _/etc/dracut.conf.d/*.conf_:: | |
465 | see dracut.conf5 | |
466 | ||
c4e098a5 HH |
467 | _/usr/lib/dracut/dracut.conf.d/*.conf_:: |
468 | see dracut.conf5 | |
469 | ||
888d53f2 HH |
470 | Configuration in the initramfs |
471 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
472 | _/etc/conf.d/_:: | |
473 | Any files found in _/etc/conf.d/_ will be sourced in the initramfs to | |
474 | set initial values. Command line options will override these values | |
475 | set in the configuration files. | |
476 | ||
477 | _/etc/cmdline_:: | |
ef9ddb91 HH |
478 | Can contain additional command line options. Deprecated, better use |
479 | /etc/cmdline.d/*.conf. | |
3cff5fb5 | 480 | |
b6c89768 | 481 | _/etc/cmdline.d/*.conf_:: |
888d53f2 HH |
482 | Can contain additional command line options. |
483 | ||
484 | AVAILABILITY | |
485 | ------------ | |
486 | The dracut command is part of the dracut package and is available from | |
487 | link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org] | |
488 | ||
489 | AUTHORS | |
490 | ------- | |
9f355169 | 491 | Harald Hoyer |
888d53f2 | 492 | |
9f355169 | 493 | Victor Lowther |
888d53f2 | 494 | |
9f355169 | 495 | Philippe Seewer |
888d53f2 | 496 | |
9f355169 | 497 | Warren Togami |
888d53f2 | 498 | |
9f355169 | 499 | Amadeusz Żołnowski |
888d53f2 | 500 | |
9f355169 | 501 | Jeremy Katz |
888d53f2 | 502 | |
9f355169 | 503 | David Dillow |
888d53f2 | 504 | |
9f355169 | 505 | Will Woods |
888d53f2 HH |
506 | |
507 | SEE ALSO | |
508 | -------- | |
509 | *dracut.cmdline*(7) *dracut.conf*(5) |