Skip to content

Commit

Permalink
docs: document more creation functions for dracut modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Alvarez Feijoo authored and Conan-Kudo committed Sep 12, 2024
1 parent 76b2f1a commit a04c265
Showing 1 changed file with 58 additions and 9 deletions.
67 changes: 58 additions & 9 deletions man/dracut.modules.7.asc
Original file line number Diff line number Diff line change
Expand Up @@ -251,19 +251,47 @@ of the functions mentioned in <<creation>> to install files.

=== [[creation]]Creation Functions

==== inst_multiple [-o] <file> [ <file> ...]
==== inst_dir <dir>

installs a directory <dir> (but not its content) to the same place in the
initramfs image.

==== inst [-H] <src> [<dst>]
==== inst_binary <src> [<dst>]
==== inst_script <src> [<dst>]

installs _one_ file <src> either to the same place in the initramfs or to an
optional <dst>, and also its dependencies and .hmac file (if it exists). inst
with more than two arguments is treated the same as inst_multiple, all arguments
are treated as files to install and none as install destinations.

options:

-H:: log all installed files to _/lib/dracut/hostonly-files_, so they can be
removed if **rd.hostonly** is passed on the kernel command line.

==== inst_simple [-H] <src> [<dst>]

installs _one_ file <src> either to the same place in the initramfs or to an
optional <dst>, but without installing its dependencies or .hmac file.

options:

-H:: log all installed files to _/lib/dracut/hostonly-files_, so they can be
removed if **rd.hostonly** is passed on the kernel command line.

==== inst_multiple [-H] [-o] <file> [ <file> ...]

installs multiple binaries and files. If executables are specified without a
path, dracut will search the path PATH=/usr/sbin:/sbin:/usr/bin:/bin for the
binary. If the option "-o" is given as the first parameter, a missing file does
not lead to an error.
binary.

==== inst <src> [<dst>]
options:

installs _one_ file <src> either to the same place in the initramfs or to an
optional <dst>. inst with more than two arguments is treated the same as
inst_multiple, all arguments are treated as files to install and none as
install destinations.
-H:: log all installed files to _/lib/dracut/hostonly-files_, so they can be
removed if **rd.hostonly** is passed on the kernel command line.

-o:: optional, a missing file does not lead to an error.

==== inst_hook <hookdir> <prio> <src>

Expand All @@ -275,7 +303,22 @@ installs an executable/script <src> in the dracut hook <hookdir> with priority
installs one or more udev rules. Non-existent udev rules are reported, but do
not let dracut fail.

==== instmods <kernelmodule> [ <kernelmodule> ... ]
==== inst_libdir_dir <dir> [<dir>...]

installs multiple directories (but not their content) located on a library
directory to the initramfs image.

==== inst_libdir_file [-n <pattern>] [-o] <file> [<file>...]

installs multiple files located on a library directory to the initramfs image.

options:

-n <pattern>:: install all library files matching a pattern.

-o:: optional, a missing library does not lead to an error.

==== instmods [-c] [-s] <kernelmodule> [ <kernelmodule> ... ]

instmods should be used only in the installkernel() function.

Expand All @@ -289,6 +332,12 @@ To install a kernel module regardless of the hostonly mode use the form:
hostonly='' instmods <kernelmodule>
----

options:

-c:: check that kernel modules exists and can be installed (i.e., not optional).

-s:: reduce verbosity.

=== Initramfs Functions

FIXME
Expand Down

0 comments on commit a04c265

Please sign in to comment.