]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
3 months 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.

3 months 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.

3 months 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.

3 months 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.

3 months 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.

3 months 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 .

3 months 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.

3 months 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.

3 months 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.

3 months 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.

3 months 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.

3 months 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
3 months 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).

3 months 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.

3 months 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.

3 months 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 .

3 months 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
```

3 months 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.

3 months 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.

3 months 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.

3 months 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.

3 months 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

3 months 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.

3 months 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.

3 months 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.

3 months 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.

3 months 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 .

3 months 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.

3 months 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.

3 months 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.

3 months 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.

3 months 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.

3 months 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.

3 months 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.

3 months 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.

3 months 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).

3 months 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.

3 months 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.

3 months 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.

3 months 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
```

3 months 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.

3 months 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.

3 months 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.

3 months 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"
```

3 months 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.

3 months 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.

3 months 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.

3 months 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
3 months 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>
3 months 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>
3 months 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.

3 months 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>
3 months 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

3 months 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
3 months 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>
3 months 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>
4 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.

4 months agotest(USR-MOUNT): add a test run for mounting btrfs subvolume rw
Jo Zzsi [Sun, 7 Sep 2025 02:44:01 +0000 (22:44 -0400)] 
test(USR-MOUNT): add a test run for mounting btrfs subvolume rw

Add a test run for mounting top btrfs root volume readonly
and writeable /usr.

4 months agotest(USR-MOUNT): improve readability by removing separate fstab file
Jo Zzsi [Sun, 7 Sep 2025 02:40:47 +0000 (22:40 -0400)] 
test(USR-MOUNT): improve readability by removing separate fstab file

Let's test dracut's --mount command line option.

4 months agotest(USR-MOUNT): remove / entry from fstab
Jo Zzsi [Sun, 7 Sep 2025 02:38:48 +0000 (22:38 -0400)] 
test(USR-MOUNT): remove / entry from fstab

root is specific in the kernel command line, no need to
list it again with default mount options.

4 months agotest(USR-MOUNT): use the same btrfs drive for both root and /usr
Jo Zzsi [Sun, 7 Sep 2025 02:36:32 +0000 (22:36 -0400)] 
test(USR-MOUNT): use the same btrfs drive for both root and /usr

Use btrfs to its fullest capabilities and create a subvolume for
/usr instead of a separate drive.

4 months agoci: only force include qemu dracut module in the tested initramfs
Jo Zzsi [Sat, 6 Sep 2025 18:58:34 +0000 (14:58 -0400)] 
ci: only force include qemu dracut module in the tested initramfs

Test dracut's module detection capabilities and do not force
additional dracut modules to increase code coverage.

4 months agoci: dhclient is no longer a requirement for server networking
Jo Zzsi [Sat, 6 Sep 2025 19:31:06 +0000 (15:31 -0400)] 
ci: dhclient is no longer a requirement for server networking

dhclient was a requirement for network-legacy dracut module but
it is now optional as server networking is supported by other means
as well.

4 months agoci: only test network-legacy as part of Daily CI
Jo Zzsi [Sat, 6 Sep 2025 15:26:25 +0000 (11:26 -0400)] 
ci: only test network-legacy as part of Daily CI

network-manager is the preferred networking dracut module over
network-legacy.

Currently some tests are only tested with network-legacy.
Improve the situation by actually testing the preferred
dracut module.

4 months agoci: add support for non-legacy network dracut modules
Jo Zzsi [Sat, 6 Sep 2025 14:30:23 +0000 (10:30 -0400)] 
ci: add support for non-legacy network dracut modules

Those network tests that need a server VM currently only
support network-legacy.

Upgrade those test cases to support other network dracut modules
such as network-manager.

4 months agoci: fix GA yml
Jo Zzsi [Sun, 7 Sep 2025 00:47:37 +0000 (20:47 -0400)] 
ci: fix GA yml

bf345f3 unfortunately included incorrect syntax.

This commit fixes the syntax for the GitHub Action.

4 months agoci(opensuse): install zstd as that is the configured compression method
Jo Zzsi [Sat, 6 Sep 2025 19:24:56 +0000 (15:24 -0400)] 
ci(opensuse): install zstd as that is the configured compression method

Commit eada0fb exposed that even though openSUSE configures zstd
compression, it is not installed in the CI container.

This commit eliminates the following warning during tests

```
dracut[E]: Cannot execute compression command 'zstd -3 -T0 -q', falling back to default
```

4 months agoci(ubuntu): exclude test 30
Jo Zzsi [Fri, 15 Aug 2025 21:52:42 +0000 (17:52 -0400)] 
ci(ubuntu): exclude test 30

TEST-30 is passing on all other CI containers including
debian:sid.

This is likely not a dracut issue, so let's exclude it from the
CI for now.

4 months agorefactor(dracut): introduce cpio_extract function
Benjamin Drung [Tue, 12 Aug 2025 14:09:54 +0000 (16:09 +0200)] 
refactor(dracut): introduce cpio_extract function

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

4 months agofix(kernel-modules-extra): remove stray \ before /
Pavel Valena [Mon, 4 Aug 2025 21:48:59 +0000 (23:48 +0200)] 
fix(kernel-modules-extra): remove stray \ before /

Fixes grep warning:
```grep: warning: stray \ before /```

Introduced in grep version 3.11.

4 months agofix(Makefile): exclude hidden directories from shellcheck
Benjamin Drung [Wed, 13 Aug 2025 10:15:22 +0000 (12:15 +0200)] 
fix(Makefile): exclude hidden directories from shellcheck

`shfmt -f .` 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.

4 months agofix(dracut-install): cache resolve_deps calls for speed and less noise
James Le Cuirot [Mon, 11 Aug 2025 09:51:51 +0000 (10:51 +0100)] 
fix(dracut-install): cache resolve_deps calls for speed and less noise

The dlopen dependency failure warning was particularly noisy and likely
to trigger. We were already caching the processed items in resolve_lazy,
but resolve_deps recurses many times, so it was necessary to move the
cache down a level. I didn't reuse "items" here because it would have
clashed with its usage elsewhere.

I had to think about whether the cache would function correctly with
changing values of pdeps. If a dependency is not found on the first
attempt, it does not prevent its consumer from being installed, so it
does not matter that it might be found via a RUNPATH on a subsequent
attempt.

Closes: https://github.com/dracut-ng/dracut-ng/issues/1552
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
4 months agofix(dracut-install): handling of multiple sonames in dlopen JSON
James Le Cuirot [Mon, 11 Aug 2025 09:12:59 +0000 (10:12 +0100)] 
fix(dracut-install): handling of multiple sonames in dlopen JSON

We should not try to install every library referenced in the soname
array, only the first one present. The array is intended to be an
ordered preference list.

Closes: https://github.com/dracut-ng/dracut-ng/issues/1552
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
4 months agoci(azurelinux): disable multipath dracut module
Jo Zzsi [Mon, 1 Sep 2025 00:31:47 +0000 (20:31 -0400)] 
ci(azurelinux): disable multipath dracut module

Multipath dracut module interferes with FULL-SYSTEMD test on
azurelinux.

Instead of disabling the test, let's instead omit the multipath dracut
module.

This commit improves the workaround for
https://github.com/dracut-ng/dracut-ng/issues/1315 .

4 months agoci: watchdog should not be required for non-networking tests
Jo Zzsi [Mon, 1 Sep 2025 05:24:30 +0000 (01:24 -0400)] 
ci: watchdog should not be required for non-networking tests

Strengthen the test suite by omitting the watchdog dracut
module for non-networking tests.

4 months agoci: run networking tests in more test containers as daily integration
Jo Zzsi [Sun, 24 Aug 2025 04:52:11 +0000 (00:52 -0400)] 
ci: run networking tests in more test containers as daily integration

Run NETWORK test in more CI containers, including ubuntu:devel
as part of daily integration.

4 months agofix(74nvmf): set root=nvmf
Tomas Bzatek [Tue, 24 Jun 2025 14:50:31 +0000 (16:50 +0200)] 
fix(74nvmf): set root=nvmf

In a restricted image like kdump the kernel commandline argument root=
is typically absent. However it is required by the 45net-lib/netroot.sh
module that fails with:

    [   23.599862] dracut: FATAL: No or empty root= argument
    [   23.604956] dracut: Refusing to continue

Inspired by the 74iscsi module, let's set it to root=nvmf if not set
before.

Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
4 months agofix(UKI): explicitly specify '--uname'
Vitaly Kuznetsov [Mon, 18 Aug 2025 13:24:20 +0000 (15:24 +0200)] 
fix(UKI): explicitly specify '--uname'

When '--uname' is not passed to 'ukify' it uses an autodetection mechanism
which is "hacky as hell" (see systemd commit 483c9c1b8a) and there's

 Kernel version not specified, starting autodetection ðŸ˜–.

in the log. In some cases autodetection fails. As dracut has the required
information already, there's no need to use it at all.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
4 months agofeat(dracut): make hostonly the default
Jo Zzsi [Thu, 14 Aug 2025 23:48:10 +0000 (19:48 -0400)] 
feat(dracut): make hostonly the default

Hostonly is already the default in the last dracut release,
but the default was set as a configuration file.

This commit changes that and sets the default inside the dracut.sh
script (unless of course a distribution or user overrides the default).

The hostonly configuration file is kept intentionally, but it is now
not used by the configure option by default.

4 months agoci(alpine): add networkmanager-initrd-generator package
Jo Zzsi [Sun, 24 Aug 2025 15:17:57 +0000 (11:17 -0400)] 
ci(alpine): add networkmanager-initrd-generator package

NETWORK test now would pass on alpine as long as
networkmanager-initrd-generator is installed.

This commit would expand test coverage for network-manager
dracut module.

Dowstream alpine maintains a dracut-tests package the
already does a good job installing dracut test dependencies
including networkmanager-initrd-generator.

Let's rely on dracut-tests package to further reduce
the need to maintain alpine package lists here upstream.

See https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/dracut/APKBUILD

4 months agotest: remove unmaintained tests MULTINIC and BONDBRIDGEVLAN
Jo Zzsi [Sun, 24 Aug 2025 04:12:42 +0000 (00:12 -0400)] 
test: remove unmaintained tests MULTINIC and BONDBRIDGEVLAN

These tests are always skipped in all CI containers as they
no longer pass. These tests require network-legacy and in some
cases ifcfg and nobody stepped up to modernize them for years.

Since the tests are in revision history, iof someone step up
to maintain these tests, the project can easily bring them back.

4 months agofix(resume): avoid matching extra resume= substrings in cmdline
Alexander Zubkov [Sun, 31 Aug 2025 08:12:38 +0000 (10:12 +0200)] 
fix(resume): avoid matching extra resume= substrings in cmdline

`grep ... 'resume='` matches not only 'resume' parameter, but any alike
substring. It could be other parameter ending in 'resume' or even parameter
value. The presense of those could fail the module setup.
Fix it by checking for a space or the beginning of a line.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1595
Signed-off-by: Alexander Zubkov <green@qrator.net>
4 months agofix(dracut-systemd): avoid matching extra root= substrings in cmdline
Alexander Zubkov [Sun, 31 Aug 2025 07:50:29 +0000 (09:50 +0200)] 
fix(dracut-systemd): avoid matching extra root= substrings in cmdline

`strstr ... 'root='` matches not only 'root' parameter, but any alike
substring. It could be other parameter ending in 'root', for example
'cryto_root=' or even parameter value. The presense of those in cmdline
could fail the boot process.
Fix it by adding a space in front of the matched string.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1595
Signed-off-by: Alexander Zubkov <green@qrator.net>
4 months agofix(systemd-sysusers): increase ordering from 68 to 78
Jo Zzsi [Sun, 31 Aug 2025 01:45:52 +0000 (21:45 -0400)] 
fix(systemd-sysusers): increase ordering from 68 to 78

This module should be orders afer all modules that depends on it

This is to make sure that all inst_sysusers calls are in place
before systemd-sysusers is called.

This rule is already documented in the module-setup.sh file
but was not followed for all modules.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1610
4 months agofix: ignore shellcheck SC2329 in addition to SC2317
Benjamin Drung [Wed, 13 Aug 2025 10:33:12 +0000 (12:33 +0200)] 
fix: ignore shellcheck SC2329 in addition to SC2317

Shellcheck <= 0.10 complains about SC2317 (info): Command appears to be
unreachable. Check usage (or ignore if invoked indirectly). Shellcheck
0.11 changes this complaint to SC2329 (info): This function is never
invoked. Check usage (or ignored if invoked indirectly).

So ignore shellcheck SC2329 in addition to SC2317 to make both
shellcheck versions happy.

4 months agofix(dm,dmraid): shellcheck SC2268
Benjamin Drung [Wed, 13 Aug 2025 10:27:27 +0000 (12:27 +0200)] 
fix(dm,dmraid): shellcheck SC2268

Shellcheck 0.11 complains about SC2268 (style): Avoid x-prefix in
comparisons as it no longer serves a purpose.

4 months agodocs: update minimal versions in the compatibility table
Jo Zzsi [Fri, 15 Aug 2025 16:24:43 +0000 (12:24 -0400)] 
docs: update minimal versions in the compatibility table

Now that the minimal supported version is Debian 13, let's
update the corresponding developer documentation.

4 months agoci: switching the main CI to ubuntu:devel from ubuntu:rolling
Jo Zzsi [Sun, 31 Aug 2025 01:31:20 +0000 (21:31 -0400)] 
ci: switching the main CI to ubuntu:devel from ubuntu:rolling

Switch the main CI to ubuntu:devel as it seems more stable and
more forward looking at this time.

Continue to test ubuntu:rolling as part of Daily Integration test.

This commit does not change the test coverage - it just changes
to run tests on ubuntu:devel more frequently.

4 months agoci(gentoo): install networkmanager when systemd is not installed
Jo Zzsi [Sun, 31 Aug 2025 01:59:19 +0000 (21:59 -0400)] 
ci(gentoo): install networkmanager when systemd is not installed

network-manager dracut module no longer depends on the systemd
dracut module.

Alpine and Void CI containers have switched over to networkmanager
networking already.

Let's install networkmanager into the Gentoo CI container as well.

4 months agotest: run-qemu requires initrd argument to be last
Jo Zzsi [Sun, 24 Aug 2025 04:05:46 +0000 (00:05 -0400)] 
test: run-qemu requires initrd argument to be last

If initrd argument is not last the following is seen in the test case run:

```
getopt: invalid option -- 'd'
getopt: invalid option -- 'a'
getopt: invalid option -- 'e'
getopt: invalid option -- 'o'
getopt: invalid option -- 'n'
getopt: invalid option -- 'i'
getopt: invalid option -- 'z'
getopt: invalid option -- 'e'
Usage: lsinitrd [options] [<initramfs file> [<filename> [<filename> [...] ]]]
```

4 months agochore(deps): bump actions/upload-pages-artifact from 3 to 4
dependabot[bot] [Wed, 27 Aug 2025 04:48:19 +0000 (04:48 +0000)] 
chore(deps): bump actions/upload-pages-artifact from 3 to 4

Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-pages-artifact
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agochore(deps): bump actions/checkout from 4 to 5
dependabot[bot] [Fri, 15 Aug 2025 23:33:35 +0000 (23:33 +0000)] 
chore(deps): bump actions/checkout from 4 to 5

Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
4 months agoci(debian): install 3cpio on Debian and Ubuntu
Benjamin Drung [Fri, 22 Aug 2025 22:55:41 +0000 (00:55 +0200)] 
ci(debian): install 3cpio on Debian and Ubuntu

In preparation for supporting 3cpio, install it on the Debian and Ubuntu
containers (except Debian stable where 3cpio is not available).

4 months agoci: increase test coverage by not forcing additional config
Jo Zzsi [Sun, 24 Aug 2025 15:24:53 +0000 (11:24 -0400)] 
ci: increase test coverage by not forcing additional config

Test suite should also strip if it is enabled in the CI test
container. Make the test case less opinionated to increase
tests coverage.

4 months agofix(dracut): use "-name" to avoid find matching temporary directory
Deli Zhang [Mon, 18 Aug 2025 01:41:10 +0000 (01:41 +0000)] 
fix(dracut): use "-name" to avoid find matching temporary directory

$initdir includes a temporary directory, and the "-path" option of
find attempts to match the entire path. If the temporary directory
happens to contain ".ko", e.g.
  initdir=/var/tmp/dracut.ko79pT/initramfs
this can lead to a incorrect match, finally all executable files are
excluded.

Signed-off-by: Deli Zhang <deli.zhang@cloud.com>
4 months agofix(dracut): decrease logging by default
Jo Zzsi [Fri, 15 Aug 2025 16:03:23 +0000 (12:03 -0400)] 
fix(dracut): decrease logging by default

The current default set in dracut is "4". All distributions
(except Debian), sets the default to "3".

Instead of relying on good defaults only within distribution
configurations, let's set the dracut default to be less verbose.

Most users new to dracut perceive the verbose dracut logs as errors.
This change will help prevent and eliminate user confusion and improve
the user experience.

4 months agoci: introduce networking tests into Daily integration tests
Jo Zzsi [Fri, 15 Aug 2025 16:42:27 +0000 (12:42 -0400)] 
ci: introduce networking tests into Daily integration tests

The newly introduced NETWORK test case is simple enough to run on all
available dracut network modules. Let's use Debian and Arch only for
now to keep the test matrix small.

4 months agofix(debian): lower the ordering number for debian conf
Jo Zzsi [Fri, 15 Aug 2025 16:30:08 +0000 (12:30 -0400)] 
fix(debian): lower the ordering number for debian conf

All other distribution config files (Fedora, openSUSE) has the
ordering number 01, except Debian.

The path of least resistance is to align Debian conf file as well
and number it 01.

4 months agoci: remove kernel command line workarounds from test config
Jo Zzsi [Fri, 15 Aug 2025 20:14:26 +0000 (16:14 -0400)] 
ci: remove kernel command line workarounds from test config

This commit makes the test suite runs less opinionated and
closer to actual users environment.

Some of these workarounds have been added to the CI as patch work,
this is a good time to reevaluate if these are still needed.

4 months agofix(man): move the documentation hostonly and hostonly_mode variables
Jo Zzsi [Fri, 15 Aug 2025 10:37:41 +0000 (06:37 -0400)] 
fix(man): move the documentation hostonly and hostonly_mode variables

Move the documentation block to the man pages.