]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
3 weeks agochore(deps): bump actions/setup-node from 5 to 6 dependabot/github_actions/actions/setup-node-6 1771/head
dependabot[bot] [Tue, 14 Oct 2025 20:02:46 +0000 (20:02 +0000)] 
chore(deps): bump actions/setup-node from 5 to 6

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
4 weeks agofix(dracut-rescue): add support for /run/initramfs/dracut.conf.d
Jo Zzsi [Wed, 8 Oct 2025 13:33:16 +0000 (09:33 -0400)] 
fix(dracut-rescue): add support for /run/initramfs/dracut.conf.d

Allow dracut read configuration files from /run as well,
in addition to /etc/ and /usr including the dracut-rescue
kernel-install script.

Modify test case to demonstrate use-case and provide test
coverage.

Follow-up to 82cd3d3 .

4 weeks agofeat(dracut): add support for /run/initramfs/dracut.conf.d
Jo Zzsi [Sat, 27 Sep 2025 17:02:47 +0000 (13:02 -0400)] 
feat(dracut): add support for /run/initramfs/dracut.conf.d

Allow dracut read configuration files from /run as well,
in addition to /etc/ and /usr.

Modify test case to demonstrate use-case and provide test
coverage.

4 weeks agofix(plymouth): do not install plymouth-set-default-theme into initrd
Benjamin Drung [Wed, 1 Oct 2025 22:26:44 +0000 (00:26 +0200)] 
fix(plymouth): do not install plymouth-set-default-theme into initrd

The script `plymouth-set-default-theme` is not needed inside the initrd,
because it is not called by anything. So skip installing it.

5 weeks agofeat(plymouth): use simpledrm if Plymouth is configured to it
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.

Ubuntu is using `simpledrm` by default.

5 weeks agofix(plymouth): check all library directories for Plymouth
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")
5 weeks agofeat(dracut): support setting compression level separately
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"`.

5 weeks agofix(plymouth): drop depending on bash
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")
5 weeks agotest: fix MACAddressPolicy from keep to none
Benjamin Drung [Tue, 30 Sep 2025 12:54:16 +0000 (14:54 +0200)] 
test: fix MACAddressPolicy from keep to none

The `MACAddressPolicy` can be only set to `persistent`, `random`, or
`none` (see systemd.link man page). There is no policy `keep`.

So correct `MACAddressPolicy` to `none`.

Fixes: f3f081e5420f ("TEST-{20,50,60,70): set MACAddressPolicy=keep")
5 weeks agotest(NFS): drop including missing overlay in server initrd
Benjamin Drung [Tue, 30 Sep 2025 12:40:19 +0000 (14:40 +0200)] 
test(NFS): drop including missing overlay in server initrd

The NFS test shows following warning when generating `initramfs.server`:

```
dracut[E]: /var/tmp/dracut-test.26n7FD/overlay doesn't exist
```

There is no overlay directory for the server initrd.

5 weeks agotest: allow running UEFI and kernel-install tests in chroot
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).

5 weeks agochore(dracut): enforce that /etc is only used in hostonly mode
Jo Zzsi [Fri, 26 Sep 2025 12:40:58 +0000 (08:40 -0400)] 
chore(dracut): enforce that /etc is only used in hostonly mode

Only set global variables using /etc in hostonly mode, ot make sure
errors are exposed if /etc is used in non-hostonly mode.

The goal if this PR is to ensure reproducible non-hostonly images.

5 weeks agoci: update failing tests exclude list for Daily tests
Jo Zzsi [Mon, 29 Sep 2025 01:42:23 +0000 (21:42 -0400)] 
ci: update failing tests exclude list for Daily tests

Debian:sid no longer has switch_root binary, disable failing tests.

https://github.com/dracut-ng/dracut-ng/issues/1314 is fixed by
0e88ccc.

5 weeks agoci(debian): add util-linux-extra package for wdctl
Jo Zzsi [Mon, 29 Sep 2025 01:27:44 +0000 (21:27 -0400)] 
ci(debian): add util-linux-extra package for wdctl

The wdctl binary is now provided by util-linux-extra package on
debian:sid.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1727
5 weeks agochore(doc): fix syntax
Jo Zzsi [Sun, 28 Sep 2025 22:24:31 +0000 (18:24 -0400)] 
chore(doc): fix syntax

Follow-up to db18959 to fix syntax.

5 weeks agofix(network): handle network selection properly
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

Revert c81c955.

Adjust the CI to test with default networking instead of
forcing network-manager to test for this condition.

5 weeks agoci(debian): add bsdextrautils package for rev
Jo Zzsi [Sun, 28 Sep 2025 21:59:07 +0000 (17:59 -0400)] 
ci(debian): add bsdextrautils package for rev

The rev binary is now provided by bsdextrautils package on
debian:sid.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1727
5 weeks agoci(debian): install iscsiuio package into the test CI
Jo Zzsi [Sun, 28 Sep 2025 13:08:55 +0000 (09:08 -0400)] 
ci(debian): install iscsiuio package into the test CI

The bug that was holding back installing iscsiuio is fixed.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056733

5 weeks agoci: allow the execution of arbitrary commands within the test container
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.

5 weeks agotest(DMSQUASH): add coverage for more dracut modules inside the iso
Jo Zzsi [Sun, 28 Sep 2025 02:00:15 +0000 (22:00 -0400)] 
test(DMSQUASH): add coverage for more dracut modules inside the iso

The list of additionally included dracut modules are inspired by
the list in the Fedora iso.

Most notably, this commit adds networking into the iso.

See https://github.com/livecd-tools/livecd-tools/blob/main/imgcreate/live.py .

5 weeks agotest(SKIPCPIO): check 3cpio for supported features
Benjamin Drung [Sun, 28 Sep 2025 11:45:34 +0000 (13:45 +0200)] 
test(SKIPCPIO): check 3cpio for supported features

Ubuntu 24.04 ships 3cpio 0.5.1 which does not have `--create` and
`--parts`. So check 3cpio for these features and fall back to `cpio`.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1720
5 weeks agoci: only pass TEST_FSTYPE to the CI container if it is set
Jo Zzsi [Sun, 28 Sep 2025 11:42:36 +0000 (07:42 -0400)] 
ci: only pass TEST_FSTYPE to the CI container if it is set

Follow-up to 58007a0 to resolve the CI coverage regression
where TEST_FSTYPE defaulted to ext4 in all test containers.

5 weeks agofeat(dracut): support 3cpio for creating initrds
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.

5 weeks agofeat(lsinitrd): support 3cpio
Benjamin Drung [Mon, 22 Sep 2025 13:13:17 +0000 (15:13 +0200)] 
feat(lsinitrd): support 3cpio

`3cpio` is written in Rust and faster than `cpio`. Use `3cpio` in
`lsinitrd` in case it is available.

5 weeks agofix(iscsi): do not include /etc/iscsi/iscsid.conf in generic mode
Jo Zzsi [Sat, 27 Sep 2025 01:26:36 +0000 (21:26 -0400)] 
fix(iscsi): do not include /etc/iscsi/iscsid.conf in generic mode

Files under /etc on the host are considered host specific.
Do not include them in the generic initramfs.

5 weeks agofix(dbus, network-manager): make generic mode host independent
Jo Zzsi [Sat, 27 Sep 2025 11:40:01 +0000 (07:40 -0400)] 
fix(dbus, network-manager): make generic mode host independent

Files under /etc on the host are considered host specific.
Do not include them in the generic initramfs.

As an example "$dbussystemconfdir"/teamd.conf points to
/etc/dbus-1/system.d/teamd.conf - which should be only included
in hostonly initramfs.

5 weeks agofix(nvmf): do not install hostonly configuration in generic initramfs
Jo Zzsi [Sat, 27 Sep 2025 11:55:05 +0000 (07:55 -0400)] 
fix(nvmf): do not install hostonly configuration in generic initramfs

/etc/nvme/discovery.conf and /etc/nvme/config.json are meant to
configure each host - only install them in hostonly initramfs.

5 weeks agotest(SKIPCPIO): support 3cpio
Benjamin Drung [Thu, 25 Sep 2025 10:35:00 +0000 (12:35 +0200)] 
test(SKIPCPIO): support 3cpio

Support using 3cpio in the skipcpio test to allow not having `cpio`
installed.

5 weeks agotest(SKIPCPIO): introduce cpio_create function
Benjamin Drung [Thu, 25 Sep 2025 09:44:38 +0000 (11:44 +0200)] 
test(SKIPCPIO): introduce cpio_create function

In preparation to support 3cpio as alternative archive tool, move the
cpio creation call into `cpio_create`.

5 weeks agotest(SKIPCPIO): introduce cpio_list_first function
Benjamin Drung [Thu, 25 Sep 2025 09:42:32 +0000 (11:42 +0200)] 
test(SKIPCPIO): introduce cpio_list_first function

In preparation to support 3cpio as alternative archive tool, move the
cpio listing call into `cpio_list_first` and expect it to take a file as
input.

5 weeks agotest(SYSTEMD-INITRD): lock down this test to boot without shell
Jo Zzsi [Sat, 27 Sep 2025 15:30:54 +0000 (11:30 -0400)] 
test(SYSTEMD-INITRD): lock down this test to boot without shell

Demonstrate the steps and cprovide coverage for root filesystem
on a ext4 filesystem with systemd but without dracut-systemd and shell

5 weeks agofix(debian): no need to change permissions
Jo Zzsi [Sat, 27 Sep 2025 15:13:14 +0000 (11:13 -0400)] 
fix(debian): no need to change permissions

CI runs as root, no need to customize the Debian
container.

Fixes the following error

```
chmod: cannot operate on dangling symlink '/boot/vmlinuz'
chmod: cannot operate on dangling symlink '/boot/vmlinuz.old'
```

5 weeks agofix(test-functions): use absolute path
Jo Zzsi [Sat, 27 Sep 2025 12:33:53 +0000 (08:33 -0400)] 
fix(test-functions): use absolute path

This commit resolves recent ci regression caused by 0e88ccc.

Fixes https://github.com/dracut-ng/dracut-ng/issues/1672

6 weeks agofeat(debian.conf): default to initrd.img-${kernel} on Debian/Ubuntu
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.

6 weeks agofix(Makefile): exclude hidden directories from shellcheck part 2
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").

6 weeks agotest: avoid kernel-install add-all
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`.

6 weeks agofix(cpio): use mutex to avoid multi-threaded failures
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
6 weeks agofix(cpio): unit test regression from GNU cpio changes
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.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1694
6 weeks agotest(FULL-SYSTEMD): remove obsolete and incorrect check
Jo Zzsi [Wed, 24 Sep 2025 14:38:05 +0000 (10:38 -0400)] 
test(FULL-SYSTEMD): remove obsolete and incorrect check

00systemd-network-management has been renumbered and this
additional check is not really needed any more.

Remove it.

6 weeks agotest(FULL-SYSTEMD): remove dbus dependency
Jo Zzsi [Mon, 22 Sep 2025 22:39:20 +0000 (18:39 -0400)] 
test(FULL-SYSTEMD): remove dbus dependency

Test FULL systemd without the dbus dracut module.

This is a follow-up to fdfa899.

6 weeks agotest(UEFI): change the order of execution to fix regression
Jo Zzsi [Tue, 23 Sep 2025 01:11:48 +0000 (21:11 -0400)] 
test(UEFI): change the order of execution to fix regression

6ae7ac0 regressed testing on Alpine and Azure Linux as
on those platforms the test is no longer skipped.

Make sure the test is skipped if stub is not available.

6 weeks agotest(KERNEL-INSTALL): remove checking for systemd version 255 or later
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.

See also 27d9a96 .

6 weeks agofeat(dracut): print the computed configuration and exit
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.

6 weeks agofix(systemd): make dbus optional dependency
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.

6 weeks agodocs: define hostonly_mode strict with more detail
Jo Zzsi [Fri, 19 Sep 2025 23:57:56 +0000 (19:57 -0400)] 
docs: define hostonly_mode strict with more detail

Document the goal to keep the list of dracut modules the same for
both hostonly_modes.

6 weeks agoci(debian): move workaround to the test case
Jo Zzsi [Mon, 22 Sep 2025 01:04:32 +0000 (21:04 -0400)] 
ci(debian): move workaround to the test case

Including workaround in the test case itself will allow to pass it
downstream.

These workarounds are still needed.

6 weeks agotest(USR-MOUNT): add a test step to mount read-only btrfs snapshot
Jo Zzsi [Sat, 20 Sep 2025 00:54:15 +0000 (20:54 -0400)] 
test(USR-MOUNT): add a test step to mount read-only btrfs snapshot

Add a step to create a read-only btrfs snapshot and mount it.

6 weeks agoci(debian): install packages recommended by packaging
Jo Zzsi [Sat, 20 Sep 2025 00:18:36 +0000 (20:18 -0400)] 
ci(debian): install packages recommended by packaging

Install all package dependencies based on downstream packaging.

This commit ensures that we do not miss some dowsntream package
dependencies here upstream.

6 weeks agoci(debian): revert Debian workarounds
Jo Zzsi [Sat, 20 Sep 2025 19:15:28 +0000 (15:15 -0400)] 
ci(debian): revert Debian workarounds

Now, that the CI transitioned to
Debian trixie release let's remove Debian
workarounds for kernel-install.

This commit is a revert for 64d6da9f2 .

6 weeks agoci: exclude test 41 on arch due to systemd v258 regression
Jo Zzsi [Sat, 20 Sep 2025 01:08:40 +0000 (21:08 -0400)] 
ci: exclude test 41 on arch due to systemd v258 regression

Skip to keep the CI green for the ongoing development.

Based on the information available currently, this is
likely a regression with systemd.

6 weeks agofix(dracut-init): remove obsolete comment
Jo Zzsi [Sat, 20 Sep 2025 00:03:05 +0000 (20:03 -0400)] 
fix(dracut-init): remove obsolete comment

These comments are meant for legacy dracut modules that are no
longer support.

6 weeks agotest(NFS): include pidof command in server root fs
Benjamin Drung [Fri, 19 Sep 2025 19:23:16 +0000 (21:23 +0200)] 
test(NFS): include pidof command in server root fs

The `server-init.sh` script calls `pidof rpc.idmapd` and therefore the
`pidof` command is needed in the server root file system.

6 weeks agofix(lsinitrd): use lowercase skip variable name
Benjamin Drung [Fri, 19 Sep 2025 17:11:42 +0000 (19:11 +0200)] 
fix(lsinitrd): use lowercase skip variable name

The test Makefile takes a `SKIP` environment variable to skip tests.
This variable might leak into `lsinitrd`:

```
$ make -C test V=1 check SKIP="23 30 43 50 60 70 71 72"
[...]
/usr/bin/lsinitrd: line 467: 23: command not found
```

Rename the `SKIP` variable to use lowercase and unset this variable to
avoid leaking values into it.

7 weeks agoci: add daily test coverage for --hostonly-mode strict
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.

7 weeks agofix(systemd): add compatibility with systemd v258
Jo Zzsi [Thu, 18 Sep 2025 22:27:17 +0000 (18:27 -0400)] 
fix(systemd): add compatibility with systemd v258

Add breakpoint units for the newly-introduced systemd.break=
functionality.

Reference: systemd/systemd#35410

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1677
7 weeks agochore(fedora): simplify Fedora configuration
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).

7 weeks agorevert(fedora): switch to strict hostonly mode by default
Jo Zzsi [Fri, 19 Sep 2025 00:52:08 +0000 (20:52 -0400)] 
revert(fedora): switch to strict hostonly mode by default

Fedora is no longer planning to switch to strict hostonly mode.

Change back the Fedora configuration to reflect this Fedora policy
decision.

7 weeks agofix: partial revert for hostonly sloppy mode
Jo Zzsi [Thu, 18 Sep 2025 02:42:17 +0000 (22:42 -0400)] 
fix: partial revert for hostonly sloppy mode

This commit is a _partial_ revert of 8519dcd.

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.

7 weeks agofix(virtfs, virtiofs): dracut module should not delete rootfs files
Jo Zzsi [Sun, 14 Sep 2025 20:52:11 +0000 (16:52 -0400)] 
fix(virtfs, virtiofs): dracut module should not delete rootfs files

Dracut built-in modules should not delete files from rootfs.

Follow-up to 8d2a6d2 .

7 weeks agofix(dracut.sh): check that custom fw search patch exists before reading it
Antonio Alvarez Feijoo [Thu, 18 Sep 2025 09:21:58 +0000 (11:21 +0200)] 
fix(dracut.sh): check that custom fw search patch exists before reading it

It may not exist, for example, when using an image builder like kiwi:

```
[ DEBUG   ]: 07:58:22 | /usr/bin/dracut: line 1095: /sys/module/firmware_class/parameters/path: No such file or directory
```

7 weeks agoci(test-root): ext4 driver for test root is coming from the test initrd
Jo Zzsi [Wed, 17 Sep 2025 19:38:55 +0000 (15:38 -0400)] 
ci(test-root): ext4 driver for test root is coming from the test initrd

Partail revert of 6d1a898. The ext4 driver does not need to be forced
(and is not needed) for the rootfs that the test case is booting into.

7 weeks agoci(opensuse): remove workaround for a sym link
Jo Zzsi [Wed, 17 Sep 2025 18:55:44 +0000 (14:55 -0400)] 
ci(opensuse): remove workaround for a sym link

The sym link to the kernel Image workaround is no longer
needed for arm64, as df93355 is landed.

7 weeks agofeat(qemu): install sd_mod driver
Jo Zzsi [Sun, 14 Sep 2025 01:47:43 +0000 (21:47 -0400)] 
feat(qemu): install sd_mod driver

It is very common to use sd_mod driver inside qemu.

Let's install the sd_mod driver when qemu dracut module
is included.

7 weeks agofix(dracut): add support for kernel name Image
Jo Zzsi [Sun, 14 Sep 2025 16:51:06 +0000 (12:51 -0400)] 
fix(dracut): add support for kernel name Image

On some architectures (arm64) the name of the kernel file
is usually Image. Add support for it instead of working around it.

7 weeks agofix(doc): correct spelling mistake of recommended
Benjamin Drung [Mon, 15 Sep 2025 14:08:34 +0000 (16:08 +0200)] 
fix(doc): correct spelling mistake of recommended

7 weeks agoci: un-exclude test 30 for ubuntu:devel
Jo Zzsi [Sun, 14 Sep 2025 21:55:44 +0000 (17:55 -0400)] 
ci: un-exclude test 30 for ubuntu:devel

The test is now passing, lets resume running it on the CI.

7 weeks agoci(daily): include tests 13 in the daily test suite
Jo Zzsi [Sun, 14 Sep 2025 14:18:30 +0000 (10:18 -0400)] 
ci(daily): include tests 13 in the daily test suite

Test 13 has been added recently but was not included in the
daily intergration test.

7 weeks agoci(debian): make sure ip command is available
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.

7 weeks agoci: make sure job group names are unique
Jo Zzsi [Sun, 14 Sep 2025 13:39:51 +0000 (09:39 -0400)] 
ci: make sure job group names are unique

If job group names are not unique, tests can fail due to
concurrency rules, even if they would have otherwise passed.

7 weeks agotest(NFS): enable tests when dhclient is not available
Jo Zzsi [Sun, 14 Sep 2025 13:32:05 +0000 (09:32 -0400)] 
test(NFS): enable tests when dhclient is not available

$USE_NETWORK dracut module needs to be added explicitly
when networking is required.

Follow-up to 16b5e37 .

7 weeks agoci: allow porting to dnsmasq from isc-dhcp-server
Jo Zzsi [Sun, 14 Sep 2025 12:47:37 +0000 (08:47 -0400)] 
ci: allow porting to dnsmasq from isc-dhcp-server

Add dnsmasq to prepare to change the test cases to use dnsmasq.

This is a step towards fixing https://github.com/dracut-ng/dracut-ng/issues/1451.

7 weeks agoci: remove dhclient from Arch, Debian, Fedora CI
Jo Zzsi [Sun, 14 Sep 2025 12:37:32 +0000 (08:37 -0400)] 
ci: remove dhclient from Arch, Debian, Fedora CI

The motivation to remove dhclient is to make sure that dracut
networking does not need dhclient (when used with network-manager
or systemd-networkd).

Some distributions (such as Alpine) no longer packages dhclient,
which might happen to some of these other distributions as well.

7 weeks agotest(NFS): do not use rd.net.timeout.dhcp
Jo Zzsi [Sun, 14 Sep 2025 01:37:38 +0000 (21:37 -0400)] 
test(NFS): do not use rd.net.timeout.dhcp

rd.net.timeout.dhcp is only understood by network-legacy
dracut module.

We want to start migrating to network-manager from network-legacy,
so stop using this command line option in tests.

7 weeks agoci: only add qemu-net dracut module to networked tests
Jo Zzsi [Sun, 14 Sep 2025 03:33:11 +0000 (23:33 -0400)] 
ci: only add qemu-net dracut module to networked tests

Do not slow down local storage tests with qemu-net dependency.

7 weeks agoci: add more daily networking test
Jo Zzsi [Sun, 14 Sep 2025 01:05:10 +0000 (21:05 -0400)] 
ci: add more daily networking test

Create a separate job for network-manager and include all
passing CI containers as network-manager.

7 weeks agoci: enable controlling TEST_FSTYPE as part of container test run
Jo Zzsi [Sat, 13 Sep 2025 23:55:28 +0000 (19:55 -0400)] 
ci: enable controlling TEST_FSTYPE as part of container test run

Pass TEST_FSTYPE to the test container and document a more complex
test run using TEST_FSTYPE.

7 weeks agofix(test-makeroot): make it dependent on initqueue
Jo Zzsi [Sun, 14 Sep 2025 00:04:06 +0000 (20:04 -0400)] 
fix(test-makeroot): make it dependent on initqueue

In its current form test-makeroot dracut module depends on
the initqueue module.

7 weeks agoci: simplify test cases
Jo Zzsi [Sat, 13 Sep 2025 23:22:53 +0000 (19:22 -0400)] 
ci: simplify test cases

Remove unnecessary opinionated parts of the test cases.

Do not add and manage drivers manually in the test case unless
the test case is specifically testing for that.

Consolidate test configurations into common comfig files
when possible.

7 weeks agoci: add more drivers to pass CI in strict hostonly mode as well
Jo Zzsi [Sat, 13 Sep 2025 22:14:14 +0000 (18:14 -0400)] 
ci: add more drivers to pass CI in strict hostonly mode as well

Strict hostonly mode is missing some drivers - especially
when these drivers are not built into the Linux kernel
(e.g. on CentOS or Alpine).

7 weeks agoci(pr): run job only on pull_request main branch
Jo Zzsi [Sat, 13 Sep 2025 19:44:22 +0000 (15:44 -0400)] 
ci(pr): run job only on pull_request main branch

I noticed that commisery job runs even when commit is not
changed. Align job with the rest of the GA.

7 weeks agoci(alpine): enable arm64
Jo Zzsi [Sat, 13 Sep 2025 19:30:31 +0000 (15:30 -0400)] 
ci(alpine): enable arm64

Alpine supports arm64, enable it on the CI.

7 weeks agoci: add test coverage for omitting systemd on a systemd container
Jo Zzsi [Sat, 13 Sep 2025 16:10:15 +0000 (12:10 -0400)] 
ci: add test coverage for omitting systemd on a systemd container

Omitting systemd on a systemd enabled environment is supported, so
let's add test coverage for this configuration.

7 weeks agofix(overlayfs): overlayfs should not use rootfsflags as mount options
Jo Zzsi [Sat, 6 Sep 2025 23:14:34 +0000 (19:14 -0400)] 
fix(overlayfs): overlayfs should not use rootfsflags as mount options

Do not pass all rootfsflags to overlay mount, as it breaks
overlay mount, e.g. if subvol rootfsflags is used for mounting
btrfs subvol.

Here is an example with ext4 rootfs that would result in a failed
boot without this commit.

```
rootflags='nodelalloc' ro rd.live.overlay.overlayfs=1
```

7 weeks agoci(openSUSE): revert cce3ba8
Jo Zzsi [Sat, 13 Sep 2025 15:45:38 +0000 (11:45 -0400)] 
ci(openSUSE): revert cce3ba8

Fedora provides CI coverage for strict hostonly.

7 weeks agoci(integration-extra): disable UEFI test on debian:sid
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.

7 weeks agochore(rootfs-block, usrmount): align systemd and non-systemd initramfs
Jo Zzsi [Sun, 7 Sep 2025 01:36:34 +0000 (21:36 -0400)] 
chore(rootfs-block, usrmount): align systemd and non-systemd initramfs

`rootfs-block/mount-root.sh` and `srmount/mount-usr.sh ` are only
included in the initramfs if systemd is _not_ included.

`systemd` does not poke into `NEWROOT` to determine fsck options,
which seems like a good idea.

Let's do the same for non-systemd initramfs. Lot of the related path
 - e.g. `/etc/sysconfig/autofsck` are distribution specific anyways.

7 weeks agofix(dracut): enforce that hostonly is set for hostonly_install
Jo Zzsi [Sat, 2 Aug 2025 15:34:04 +0000 (11:34 -0400)] 
fix(dracut): enforce that hostonly is set for hostonly_install

Before honoring `-H` command line argument, check if
hostonly is actually set.

Here is an examples where `inst` is called even in generic
mode which would result in picking up files from the host
from the /etc directory.

```
inst_simple -H "/etc/nvme/hostnqn"
```

7 weeks agofix(fedora): always include chroot binary
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.

7 weeks agofeat(fedora): switch to strict hostonly mode by default
Jo Zzsi [Fri, 12 Sep 2025 17:41:25 +0000 (13:41 -0400)] 
feat(fedora): switch to strict hostonly mode by default

For Fedora generated initramfs size is a priority over initramfs
portability.

Change the Fedora configuration to reflect this Fedora policy decision.

7 weeks agofeat(Makefile): filter out s390 specific dracut modules
Jo Zzsi [Fri, 15 Aug 2025 11:31:20 +0000 (07:31 -0400)] 
feat(Makefile): filter out s390 specific dracut modules

This commit filters out s390 specific dracut modules, so that they
only get packaged for s390 specific packages.

This commit would allow sharing the list of s390 specific dracut modules
between distributions upstream.

7 weeks agofix(fs-lib): include modules for charsets for working vfat support
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.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1303
8 weeks agofix(74nvmf): make sure autoconnect script is run at least once
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.

Signed-off-by: Martin Wilck <mwilck@suse.com>
8 weeks agofix(74nvmf): only set netroot if it's yet empty
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.

Signed-off-by: Martin Wilck <mwilck@suse.com>
8 weeks agoci: do not force no-hostonly-cmdline during testing
Jo Zzsi [Sun, 7 Sep 2025 04:54:47 +0000 (00:54 -0400)] 
ci: do not force no-hostonly-cmdline during testing

There is no longer a need to force additional no-hostonly-cmdline
dracut command line option during test case runs.

8 weeks agochore(deps): bump actions/setup-node from 4 to 5
dependabot[bot] [Tue, 9 Sep 2025 20:02:12 +0000 (20:02 +0000)] 
chore(deps): bump actions/setup-node from 4 to 5

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
8 weeks agofix: place dracut generated cmdline conf files in the 10-49 range
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.

Fixes https://github.com/dracut-ng/dracut-ng/issues/1489

8 weeks agofix(dracut): library directory creation in --kernel-only
Benjamin Drung [Thu, 14 Aug 2025 17:55:51 +0000 (19:55 +0200)] 
fix(dracut): library directory creation in --kernel-only

Create a initrd with `--kernel-only`. For example:

```
./configure
make
./dracut.sh -l --kernel-only -m kernel-modules -d "ext4 sd_mod" -f $(pwd)/test --keep
```

The resulting has directories with spaces:

```
$ ls -l /var/tmp/dracut.dS9eq2i/initramfs
total 0
drwxrwxr-x 3 root root 60 Aug 13 23:36 ' '
lrwxrwxrwx 1 root root  7 Aug 13 23:36  lib -> usr/lib
drwxr-xr-x 3 root root 60 Aug 13 23:36  usr
$ find /var/tmp/dracut.dS9eq2i/initramfs/\
/var/tmp/dracut.dS9eq2i/initramfs/
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib /lib
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib /lib/x86_64-linux-gnu?
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib /lib/x86_64-linux-gnu?/usr
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib /lib/x86_64-linux-gnu?/usr/lib
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib /lib/x86_64-linux-gnu?/usr/lib/x86_64-linux-gnu
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib /lib/x86_64-linux-gnu?/usr/lib/x86_64-linux-gnu/libfakeroot
```

Do not quote `libdirs` when iterating over it since it contains a
space-separated list of library directories.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1570
8 weeks agoimprovement(74nvmf): lookup required NIC kernel modules for NBFT interfaces
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.

Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
8 weeks agofeat(debian.conf): add i18n_vars for Debian/Ubuntu
Benjamin Drung [Wed, 3 Sep 2025 10:31:48 +0000 (12:31 +0200)] 
feat(debian.conf): add i18n_vars for Debian/Ubuntu

Add `i18n_vars` for Debian/Ubuntu.

Bug-Ubuntu: https://launchpad.net/bugs/2032141
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2 months agoci(azure): reenable FULL-SYSTEMD on azurelinux:3.0
Jo Zzsi [Sat, 6 Sep 2025 10:13:17 +0000 (06:13 -0400)] 
ci(azure): reenable FULL-SYSTEMD on azurelinux:3.0

Since multipath dracut module is disabled in azurelinux CI container
FULL-SYSTEMD can be reenabled.