]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
docs: improve documentation for out of tree dracut modules
authorJo Zzsi <jozzsicsataban@gmail.com>
Sat, 28 Jun 2025 13:48:33 +0000 (09:48 -0400)
committerLaszlo <laszlo.gombos@gmail.com>
Sat, 28 Jun 2025 15:28:24 +0000 (11:28 -0400)
Follow-up to 2199846.

Partially resolve #538.

doc_site/modules/ROOT/pages/developer/modules.adoc
man/dracut.modules.7.adoc

index 3121eec0087d109dac6a016219d07d33a3f56357..91fed52a48b8aab04c5279ca899a7864d5a0b327 100644 (file)
@@ -14,8 +14,9 @@ so you should install it on your system -- dash aims for strict POSIX
 compliance to the extent possible.
 * Hooks MUST be POSIX compliant -- they are sourced by the init script,
 and having a bashism break your user's ability to boot really sucks.
-* Generator modules should have a two digit numeric prefix -- they run in
-ascending sort order. Anything in the 90-99 range is stuff that dracut
+* Generator modules should have a two digit numeric prefix in the range
+of 50-59 -- they run in ascending sort order.
+Anything in the 80-89 range is stuff that dracut
 relies on, so try not to break those hooks.
 * Hooks must have a .sh extension.
 * Generator modules are described in more detail later on.
@@ -49,6 +50,16 @@ The numeric code must be present and in the range of 00 - 99.
 +
 NOTE: Range 50 - 59 and 90 - 99 are reserved for out of tree
 (3rd party) dracut modules.
+
+It is strongly recommended to use the 50-59 range for out of tree
+dracut modules. Range 90-99 are reserved for unusual
+dracut customizations for completeness, but using range 90-99
+is not recommended for out of tree dracut modules.
+
+Not using the 50-59 range for out of tree dracut modules
+will likely lead to unintended errors in the initramfs
+generation process as your dracut module will either run too
+early or too late in the generaiton process. You have been warned.
 +
 Modules with lower numbers are installed first.  This is important
 because the dracut install functions (which install files onto
index e1b2b5e08f639795499fc0d25f57a10cd487979d..20daf16b3f7700e70068de39331d61c10b55a03f 100644 (file)
@@ -14,9 +14,9 @@ DESCRIPTION
 
 dracut uses a modular system to build and extend the initramfs image. All
 modules are located in _/usr/lib/dracut/modules.d_ or in _<git-src>/modules.d_.
-The most basic dracut module is _99base_. In _99base_ the initial shell script
+The most basic dracut module is _80base_. In _80base_ the initial shell script
 init is defined, which gets run by the kernel after initramfs loading. Although
-you can replace init with your own version of _99base_, this is not encouraged.
+you can replace init with your own version of _80base_, this is not encouraged.
 Instead you should use, if possible, the hooks of dracut. All hooks, and the
 point of time in which they are executed, are described in <<stages>>.