Benjamin Drung [Tue, 30 Sep 2025 14:24:16 +0000 (16:24 +0200)]
feat(plymouth): use simpledrm if Plymouth is configured to it
Plymouth has a configuration setting `UseSimpledrm` for using
`simpledrm`. Check this configuration setting and only pull in
`simpledrm` instead of `drm` in case it is set.
Benjamin Drung [Mon, 29 Sep 2025 22:22:40 +0000 (00:22 +0200)]
fix(plymouth): check all library directories for Plymouth
On amd64 `dpkg-architecture -qDEB_HOST_MULTIARCH` returns
`x86_64-linux-gnu` but `uname -m` returns only `x86_64`.
`/usr/lib/x86_64` does not exist on Debian/Ubuntu but
`/usr/lib/x86_64-linux-gnu` exists.
Rely on `libdirs` to provide all possible library directories including
the Debian multiarch directory `/usr/lib/x86_64-linux-gnu`.
Fixes: 1b374931126c ("fix(plymouth): do not depend on dpkg-architecture")
Benjamin Drung [Sun, 28 Sep 2025 11:58:00 +0000 (13:58 +0200)]
feat(dracut): support setting compression level separately
Extend the Dracut configuration to configure the default compression
level for each compression format (e. g. `compress_level_zstd` for
zstd). Add `--compress-level` option to `dracut` to override the
compression level from the configuration.
Then users could just call `dracut --zstd --compress-level 3` instead of
`dracut --compress="zstd -3 -T0 -q"`.
Benjamin Drung [Mon, 29 Sep 2025 21:57:43 +0000 (23:57 +0200)]
fix(plymouth): drop depending on bash
The only Bash script in the Plymouth module is
`plymouth-populate-initrd.sh` which is called by `module-setup.sh` and
not included in the initrd. Therefore the Plymouth module does not
require Bash.
Fixes: 3a04a139700 ("fix: add bash dependency when bash scripts are used in the module")
Benjamin Drung [Tue, 30 Sep 2025 12:50:20 +0000 (14:50 +0200)]
test: allow running UEFI and kernel-install tests in chroot
The UEFI and kernel-install tests want to run in an isolated environment
to avoid modifying the host system. Allow running those tests in a
chroot (like schroot).
Jo Zzsi [Sun, 28 Sep 2025 15:44:47 +0000 (11:44 -0400)]
fix(network): handle network selection properly
Earlier each test CI container included dhclient, which
meant that each CI continer supported network-legacy.
4ce57a5ad exposed a bug in the network selection as
network-manager was not selected even when available.
This change is fixes the following issues on the CI:
- selects network-manager over network-legacy on Void
- selects network-manager or systemd-networkd if network-legacy is not installed
Jo Zzsi [Sun, 28 Sep 2025 12:43:02 +0000 (08:43 -0400)]
ci: allow the execution of arbitrary commands within the test container
Evaluate the TEST_CONTAINER_COMMAND right before the test run
inside the test container to facilitate additional testing that
is not provided by the test CI containers by default.
Benjamin Drung [Wed, 13 Aug 2025 23:41:19 +0000 (01:41 +0200)]
feat(dracut): support 3cpio for creating initrds
`3cpio` is written in Rust and faster than `cpio`. Use `3cpio` in
`dracut.sh` in case it is available. `3cpio` supports
`SOURCE_DATE_EPOCH` and therefore clamping the files is not needed.
Benjamin Drung [Thu, 18 Sep 2025 10:59:48 +0000 (12:59 +0200)]
feat(debian.conf): default to initrd.img-${kernel} on Debian/Ubuntu
Extend the Debian/Ubuntu Dracut configuration to change the default
`initrdname` to `initrd.img-${kernel}`. This is done to keep the name
the same as initramfs-tools which has been the default for a long time.
This change will be carried for quite some time to ease the switch from
initramfs-tools to dracut.
Benjamin Drung [Fri, 26 Sep 2025 08:31:59 +0000 (10:31 +0200)]
fix(Makefile): exclude hidden directories from shellcheck part 2
`find .` also searches in hidden directories (like `.git` or `.pc`). The
`.pc` is used on Debian for patch tracking and should not be searched
for files.
So ignore the top-level hidden directories from shellcheck. See also
commit 7a65d1a1f372 ("fix(Makefile): exclude hidden directories from
shellcheck").
Benjamin Drung [Thu, 25 Sep 2025 23:28:05 +0000 (01:28 +0200)]
test: avoid kernel-install add-all
The man page of `kernel-install` says about `add-all`: "This is the same
as add, but invokes the operation iteratively for every installed kernel
in /usr/lib/modules/. This operation is only supported on systems where
the kernel image is installed in
/usr/lib/modules/KERNEL-VERSION/vmlinuz."
Debian and Ubuntu do not ship the kernel images in `/usr/lib/modules/`
and therefore `add-all` is not supported there.
Since the test cases already determine the kernel version, search for
the kernel image and use `kernel-install add` instead of `add-all`.
David Disseldorp [Thu, 25 Sep 2025 04:21:18 +0000 (06:21 +0200)]
fix(cpio): use mutex to avoid multi-threaded failures
`cargo test` runs tests in parallel by default, unless the
--test-threads=1 parameter is provided. This causes the dracut-cpio
unit tests to fail due to their working directory changes.
Add a mutex and hold it over the course of the changed directory, so
that the --test-threads=1 parameter is no longer needed.
Suggested-by: Benjamin Drung <bdrung@posteo.de> Fixes: https://github.com/dracut-ng/dracut-ng/issues/1702
David Disseldorp [Mon, 22 Sep 2025 12:52:20 +0000 (14:52 +0200)]
fix(cpio): unit test regression from GNU cpio changes
dracut-cpio unit tests compare binary archive output with that of GNU
cpio, for the same set of input files. A recent change to upstream GNU
cpio, commit 6a94d5e ("New option --ignore-dirnlink"), causes some tests
to fail.
The failure is due to GNU cpio `--reproducible` now hardcoding directory
nlink values to 2, instead of using the st_nlink value reported by
stat().
Fix the unit tests by dropping the GNU cpio `--reproducible` alias
parameter, and instead specify `--ignore-devno --renumber-inodes`
explicitly, matching pre-6a94d5e GNU cpio `--reproducible` behaviour.
Jo Zzsi [Mon, 22 Sep 2025 23:26:37 +0000 (19:26 -0400)]
test(KERNEL-INSTALL): remove checking for systemd version 255 or later
systemd version 255 or later is already the minimal supported
systemd version, so there is no longer a need to maintain this
additional check and additional complexity.
Jo Zzsi [Tue, 16 Sep 2025 11:47:45 +0000 (07:47 -0400)]
feat(dracut): print the computed configuration and exit
Dracut is able to inspect the host and auto-determine the best
configuration and compine the computed configurtion with the
distribution and user configuration.
Since dracut does not have a dry-run option, there is no good
option for an external tool to determine if a dracut invocaton
will result in creating initramfs in hostonly or non-hostonly mode.
Add a command line option that is meant to just compute the
current dracut configuration, print it out and exit.
Jo Zzsi [Fri, 19 Sep 2025 23:05:05 +0000 (19:05 -0400)]
fix(systemd): make dbus optional dependency
Remove dbus as a mandatory dependency for the following
dracut modules
- systemd-hostnamed
- systemd-portabled
- systemd-resolved
- systemd-timedated
- systemd-timesyncd
Users and distributions can still include dbus dracut module in the
initramfs as before, but now dbus dracut module is required to
be explicitly added in the dracut configuration.
The motivation of this change is to allow users and distributions
to exclude dbus from the initramfs.
Jo Zzsi [Fri, 19 Sep 2025 00:59:15 +0000 (20:59 -0400)]
ci: add daily test coverage for --hostonly-mode strict
Since no test container has hostonly-mode strict set by default
let's add some tests to pass `--hostonly-mode strict`
on each test run on the command line.
Jo Zzsi [Mon, 15 Sep 2025 11:59:09 +0000 (07:59 -0400)]
chore(fedora): simplify Fedora configuration
Setting many of these defaults not only not required but makes it
harder to reason for Fedora.
dracut defaults are the same as these Fedora settings. Let's just remove
the Fedora settings so that it is clear that Fedora are using dracut
defaults for these settings (like other distributions).
The goal of this commit is to have the same dracut modules
included in both sloppy and in strict mode, but the dracut
modules themselves might install more kernel modules depending
on the hostonly_mode value.
Changes in other areas of the code (e.g. changes inside
`installkernel`) were not reverted as they require
more discussions and agreement by the community.
As an example the crypt dracut module could potentially copy
more kernel modules into the generated initramfs in sloppy
hostonly_mode mode than in strict hostonly mode.
Jo Zzsi [Sun, 14 Sep 2025 16:39:25 +0000 (12:39 -0400)]
ci(debian): make sure ip command is available
`ip` command is required for networking. On Ubuntu
`ip` command is already installed but on debian this
requires and explicit installation of the `iproute2`
package.
Jo Zzsi [Fri, 15 Aug 2025 21:29:05 +0000 (17:29 -0400)]
ci(integration-extra): disable UEFI test on debian:sid
This test has been failing on debian:sid for a while and passing on
all other test containers.
I was unable to find a root cause and what is even more interesting
is that the test is passing on debian:latest (trixie).
At this point of time debian:sid and debian:latest (trixie) should
be very similar, so there is a decent chance that this is a
distribution issue and not a dracut issue.
This is the last remaining failure to make the integration-extra
GA green.
Jo Zzsi [Mon, 11 Aug 2025 11:18:06 +0000 (07:18 -0400)]
fix(fedora): always include chroot binary
It seems RedHat requires chroot, which is addressed by a commit revert
currently instead of a proper permanent solution, see
https://github.com/redhat-plumbers/dracut-rhel10/pull/49
This commit provides a long term permanent solution that does not
require a downstream revert.
Fabian Vogt [Fri, 22 Aug 2025 12:25:54 +0000 (14:25 +0200)]
fix(fs-lib): include modules for charsets for working vfat support
vfat always needs a codepage and iocharset for mounting, so make sure
those are included.
It's not trivial to get a list of exactly the needed modules,
(depends on mount options and kernel defaults), so take the easy route
and include them all, except in strict hostonly mode.
Martin Wilck [Fri, 5 Sep 2025 17:24:15 +0000 (19:24 +0200)]
fix(74nvmf): make sure autoconnect script is run at least once
With the previous patch applied, if netroot is not set by the nvmf module
and /dev/root is found, dracut may proceed to pivot without having tried
to connect the nvmf devices. Avoid that by requiring that the autoconnect
script is called at least once.
Martin Wilck [Fri, 5 Sep 2025 17:19:51 +0000 (19:19 +0200)]
fix(74nvmf): only set netroot if it's yet empty
The netroot variable is also set by other modules, in particular
"livenet". Don't override it if it is already set. Otherwise booting
a live image may fail in presence of an NBFT table.
Jo Zzsi [Sun, 10 Aug 2025 12:05:48 +0000 (08:05 -0400)]
fix: place dracut generated cmdline conf files in the 10-49 range
The main motivation of this PR is to make it easier to reason
about the ordering numbers of dracut generated cmdline conf files.
Prefix almost all dracut generated cmdline conf file in the 20 ordering
as the ordering is usually not significant for these cmdline conf file.
Document that 50-59 is the recommended ordering range for
3rd party cmdline conf files to make it consistent with e.g.
3rd party dracut modules recommendation.
Tomas Bzatek [Tue, 3 Jun 2025 16:34:39 +0000 (18:34 +0200)]
improvement(74nvmf): lookup required NIC kernel modules for NBFT interfaces
When dracut is called with '--hostonly-mode strict' and perhaps even
with --hostonly-nics '' as done by kdump/mkdumprd, all the kernel
modules related to hostonly networking are stripped down. In such
a case it is viable to lookup and install the required kernel modules
ourselves, based on any currently present nbft interfaces.
Note: the lookup depends on the current 'nbftX' network interface
naming.