-
Notifications
You must be signed in to change notification settings - Fork 171
Open
Labels
Description
Overview
Hello, this ticket derives from #2801
This issue proposes exposing dracut configuration capabilities directly in the kiwi image description XML, allowing users to configure dracut options without requiring manual overlay files.
Note: This proposal aims to provide flexibility while supporting distribution limitations like inexistent modules.
We've experimented with manual dracut and are willing to implement this enhancement as a PR if there's interest.
Current State:
Dracut configuration requires manual overlay files (e.g., etc/dracut.conf.d/some.conf) to set options.
Proposed Enhancement:
Add support for the following dracut configuration options as XML elements under <bootloader><dracut>:
- Installation of additional tools:
<install paths="/usr/bin/veritysetup /path/to/debug_tool"/> - Kernel module configuration:
<add_drivers names="driver1 driver2"/> <force_drivers names="driver3 driver4"/> <omit-drivers names="driver5 driver6"/> - Additional dracut modules:
<add modules="module1 module2"/> <omit modules="module3 module4"/> <force-add modules="module5 module6"/> - Filesystem support:
<filesystems names="ext4 xfs btrfs"/> - Compression method:
<compress method="gzip|bzip2|lzma|xz|lzo|lz4|zstd"/> - Kernel command line options:
Note: This option already exists as an attribute in the image type element. We need to determine the best placement for this option and how it should interact with the existing attribute.
<kernel_cmdline>root=UUID=xxx dm-mod.create=".." rd.debug</kernel_cmdline> - Persistent policy:
<persistent-policy value="by-uuid|by-label|mapper"/>
Example Configuration:
<bootloader name="systemd_boot" console="serial">
<dracut>
<kernel_cmdline>root=/dev/mapper/root dm-mod.create=".." rd.debug</kernel_cmdline>
<install paths="/usr/bin/veritysetup ..."/>
<filesystems names="erofs ext4 ..."/>
<add_drivers names= "erofs ext4 ..." />
<force_drivers names="erofs ext4 ..."/>
<add modules="dm-verity ..."/>
...
</dracut>
</bootloader>
Benefits:
- More explicit configuration in image description
- Improved usability by avoiding manual overlay files
- Easier maintenance and review of configurations