]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
7 weeks agotest: switch QEMU network backend to dgram (UDP)
Benjamin Drung [Wed, 4 Mar 2026 17:09:40 +0000 (18:09 +0100)] 
test: switch QEMU network backend to dgram (UDP)

When replacing isc-dhcp-server by dnsmasq, test 60 starts to fail on
some distributions. The second client test hangs for several seconds on
shutdown and the third client test fails to get an IP adress. The client
sends a DHCP discover packet, but that never reaches dnsmasq.

Adding tcpdump to `server-init.sh` let the tests succeed:
```
tcpdump -v -Z root -i enx525400123456 -n port 67 or port 68 &
```

Running the client tests individually let them succeed as well.

The assumption is that the host kernel keeps the QEMU netdev TCP socket
in a TIME_WAIT or FIN_WAIT_2 state following a client shutdown which
leads to a socket deadlock: the next client may successfully connect to
the host socket, but the server QEMU process fails to re-initialize the
virtual link correctly.

Switch to `-netdev dgram` (UDP) to eliminate the connection state
management entirely.

See also https://github.com/dracut-ng/dracut-ng/pull/2271#issuecomment-3997945175

7 weeks agotest: use different MAC addresses for all NFS client tests
Benjamin Drung [Wed, 4 Mar 2026 18:43:54 +0000 (19:43 +0100)] 
test: use different MAC addresses for all NFS client tests

Having two separate client tests use the same MAC address might not work
with dnsmasq. To ease debugging use a separate MAC address for each
client test. Update the DHCP config to reflect the test case name and
make the numbering consecutive.

7 weeks agoci: skip void:latest due to dash 0.5.13.1 bug
Benjamin Drung [Wed, 4 Mar 2026 22:33:31 +0000 (23:33 +0100)] 
ci: skip void:latest due to dash 0.5.13.1 bug

The tests on `void:latest` started to fail after updating dash to
version 0.5.13.1. This is caused by an escaping bug in dash:

```

str_replace() {
    local in="$1"
    local s="$2"
    local r="$3"
    local out=''

    while [ "${in##*"$s"*}" != "$in" ]; do
        chop="${in%%"$s"*}"
        out="${out}${chop}$r"
        in="${in#*"$s"}"
    done
    printf -- '%s' "${out}${in}"
}

str_replace "/dev/disk/by-label/dracut" '/' '\x2f'
echo
_name=$(str_replace "/dev/disk/by-label/dracut" '/' '\x2f')
echo "_name=$_name"
```

```
bash-5.3# bash /z/bug
\x2fdev\x2fdisk\x2fby-label\x2fdracut
_name=\x2fdev\x2fdisk\x2fby-label\x2fdracut
bash-5.3# sh /z/bug
\x2fdev\x2fdisk\x2fby-label\x2fdracut
_name=/dev/disk/by-label/dracut
```

Skip the failing test cases on `void:latest` to unblock merge requests.

7 weeks agotest: make including assertion.sh explicitly
Benjamin Drung [Tue, 10 Feb 2026 13:32:45 +0000 (14:32 +0100)] 
test: make including assertion.sh explicitly

The function `build_client_rootfs` includes the `assertion.sh` file in
case it can be found. This automatic behavior is fragile and a missing
`assertion.sh` will not be noticed.

So explicitly specify the assertion file to include when calling
`build_client_rootfs`.

7 weeks agofeat: derive systemd generator name dynamically from script
Benjamin Drung [Tue, 24 Feb 2026 10:07:58 +0000 (11:07 +0100)] 
feat: derive systemd generator name dynamically from script

Instead of hardcoding the systemd generator name, derive the name from
the script name.

7 weeks agofix(dbus): remove After/Requires from dbus service/socket
Benjamin Drung [Tue, 3 Mar 2026 11:32:33 +0000 (12:32 +0100)] 
fix(dbus): remove After/Requires from dbus service/socket

Following dependencies are added to sockets unless
`DefaultDependencies=no` is set (according to systemd.socket man page):

```
Before=sockets.target shutdown.target
After=sysinit.target
Requires=sysinit.target
Conflicts=shutdown.target
```

Following dependencies are added to units unless
`DefaultDependencies=no` is set (according to systemd.service man page):

```
Requires=sysinit.target
After=sysinit.target basic.target
Conflicts=shutdown.target
Before=shutdown.target
```

The dbus-broker and dbus-daemon Dracut modules want to remove
`After=sysinit.target` and `Requires=sysinit.target` from `dbus.service`
and `dbus.socket`. This is done by setting `DefaultDependencies=no` and
specifying the remaining default dependencies. The relevant code has
been there since the introduction (see commit e1845955ff3d).

The Ubuntu package of dbus already removes some of the default
dependencies from the `dbus.service` and `dbus.socket` (see
https://launchpad.net/bugs/1438612):

```
DefaultDependencies=no
Wants=sysinit.target
After=sysinit.target basic.target
```

This results in not removing the `sysinit.target` dependency on Ubuntu
and causes the dbus service to start too late. Since NetworkManager
depends on dbus, it will start too late as well. That causes the NBD
test cases to fail.

So remove the `After` and `Requires` entries from the `dbus.service` and
`dbus.socket` before setting `DefaultDependencies=no`. Also restore
`Before=sockets.target` in `dbus.socket`.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1815
Bug-Ubuntu: https://launchpad.net/bugs/2141603

7 weeks agochore(deps): bump actions/upload-artifact from 6 to 7
dependabot[bot] [Tue, 3 Mar 2026 21:12:44 +0000 (21:12 +0000)] 
chore(deps): bump actions/upload-artifact from 6 to 7

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

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

Signed-off-by: dependabot[bot] <support@github.com>
7 weeks agotest: use "set -eu" in client rootfs test scripts
Benjamin Drung [Fri, 30 Jan 2026 01:14:33 +0000 (02:14 +0100)] 
test: use "set -eu" in client rootfs test scripts

Use `set -eu` in client rootfs test scripts to make them more robust
against failures.

7 weeks agotest: use verySecurePassword as cryptsetup password
Benjamin Drung [Tue, 3 Mar 2026 19:49:38 +0000 (20:49 +0100)] 
test: use verySecurePassword as cryptsetup password

The cryptsetup password `test` is not FIPS compliant. This causes test
20 to fail on Fedora:

```
systemd-cryptsetup[688]: Running in FIPS mode.
systemd-cryptsetup[688]: Set cipher aes, mode xts-plain64, key size 512 bits for device /dev/disk/by-uuid/aa12cc4c-b796-4c7f-a029-cf7f0120bb30.
systemd-cryptsetup[688]: Keyslot open failed.
systemd-cryptsetup[688]: Failed to activate with key file '/etc/key': Invalid argument
systemd[1]: systemd-cryptsetup@testluks.service: Main process exited, code=exited, status=1/FAILURE
```

So use `verySecurePassword` as password which makes FIPS happy.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2262
7 weeks agoci: increase timeout for test 60 on ARM to 60 minutes
Benjamin Drung [Tue, 3 Mar 2026 18:58:53 +0000 (19:58 +0100)] 
ci: increase timeout for test 60 on ARM to 60 minutes

Test 60 can run into the 40 minutes timeout on ARM. So increase the
timeout to 60 minutes only on ARM.

8 weeks agotest: drop setting up loop-back device
Benjamin Drung [Thu, 26 Feb 2026 21:11:35 +0000 (22:11 +0100)] 
test: drop setting up loop-back device

The initrd already sets up `lo`. So setting it up on the server rootfs
fails:

```
+ ip addr add 127.0.0.1/8 dev lo
Error: ipv4: Address already assigned.
```

8 weeks agotest: create server log in the test directory
Benjamin Drung [Mon, 2 Mar 2026 17:56:04 +0000 (18:56 +0100)] 
test: create server log in the test directory

Store the server log in the test directory (similar to the test log)
instead of putting the server log in `/var/tmp`. This makes it easier to
access the server log in case of a failure.

8 weeks agotest: make server.log path configurable
Benjamin Drung [Mon, 2 Mar 2026 17:53:17 +0000 (18:53 +0100)] 
test: make server.log path configurable

Make `server.log` path configurable in preparation for the following
commit.

8 weeks agotest: do not use the same IP for different MAC addresses
Benjamin Drung [Mon, 2 Mar 2026 20:09:32 +0000 (21:09 +0100)] 
test: do not use the same IP for different MAC addresses

dnsmasq will complain when different MAC addresses are mapped to the
same IP address.

8 weeks agotest: start hostname numbering at 0
Benjamin Drung [Mon, 2 Mar 2026 20:04:30 +0000 (21:04 +0100)] 
test: start hostname numbering at 0

Start numbering the hostnames at 0 to match the MAC address with the
hostname.

8 weeks agotest: use separate networks for different NICs
Benjamin Drung [Mon, 2 Mar 2026 17:06:49 +0000 (18:06 +0100)] 
test: use separate networks for different NICs

The iSCSI tests 70 and 71 use two network interfaces. The server
launches a DHCP server on both network interfaces providing different IP
addresses for both. This setup works for ISC dhcpd, but will cause
problems when switching to dnsmasq: dnsmasq would offer IP from both IP
ranges to the client.

As preparation for switching to dnsmasq use separate networks for the
two different network interfaces.

2 months agotest: force cpu to neoverse-n1 for arm64 when QEMU_CPU not set
Hector Cao [Wed, 25 Feb 2026 11:12:34 +0000 (12:12 +0100)] 
test: force cpu to neoverse-n1 for arm64 when QEMU_CPU not set

using cpu=max might expose new unstable features with qemu/edk2
upgrades, this unstability might cause test failures to happen
, we are experiencing that in Debian/Ubuntu with edk2 latest version
that enables LPA2 that is still unstable.

since using cpu=max is not required for dracut tests, using a
named model will offer a better stability for the tests for future
qemu/edk2 upgrades. the choosen cpu model for arm64 is neoverse-n1
since it is one of the most stable and proven CPU model from a
virtualization standpoint.

Co-authored-by: Benjamin Drung <bdrung@ubuntu.com>
2 months agoci: re-run tests 70 and 71 on debian:sid
Benjamin Drung [Mon, 23 Feb 2026 10:27:57 +0000 (11:27 +0100)] 
ci: re-run tests 70 and 71 on debian:sid

mdadm 4.5 checks the last 32 MB for DDF, which causes the tests to run
into a timeout:

```
[   65.132396] (udev-worker)[521]: sdb: Spawned process '/sbin/mdadm -I /dev/sdb' [920] is taking longer than 59s to complete.
[   65.133321] systemd-udevd[512]: sdb: Worker [521] processing SEQNUM=1459 is taking a long time.
[   65.133942] systemd-udevd[512]: sdc: Worker [516] processing SEQNUM=1471 is taking a long time.
```

This regression has been fixed in mdadm 4.5-5.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2199
2 months agoci: cover more tests as part of the omitsystemd GA
Jo Zzsi [Mon, 16 Feb 2026 16:52:20 +0000 (11:52 -0500)] 
ci: cover more tests as part of the omitsystemd GA

The goal of this PR is to increase CI coverage.
The added tests are not cover by any other CI runs.

2 months agoci: install openssl to create a test for systemd-sysext
Antonio Alvarez Feijoo [Mon, 16 Feb 2026 15:19:41 +0000 (16:19 +0100)] 
ci: install openssl to create a test for systemd-sysext

The openssl binary is used to create a X.509 certificate to sign extensions.

2 months agofix(dracut): remove udevrulesconfdir variable
Jo Zzsi [Tue, 10 Feb 2026 13:55:41 +0000 (08:55 -0500)] 
fix(dracut): remove udevrulesconfdir variable

There is about 50 places in the dracut source code where the
`/etc/udev/rules.d` path is hardcoded.

Having a `udevrulesconfdir` dracut variable gives an impression
that dracut and dracut configuration files can configure and overwrite
udevrulesconfdir variable, this functionality however never was
supported and never worked.

Instead of making an attempt to fix the usage of udevrulesconfdir
variable, let's just remove it and require that udevrulesconfdir
always maps to /etc/udev/rules.d for dracut.

2 months agochore(dracut-functions): make is_func non-public API
Jo Zzsi [Wed, 11 Feb 2026 02:21:41 +0000 (21:21 -0500)] 
chore(dracut-functions): make is_func non-public API

is_func is not documented and it should not be in the public API.

Change the name to _is_func to make it explicit that it is not meant
to be used by out-of-tree dracut modules.

2 months agotest: check if /dev/disk/by-id exists before trying to write the disk marker
Antonio Alvarez Feijoo [Fri, 13 Feb 2026 07:45:41 +0000 (08:45 +0100)] 
test: check if /dev/disk/by-id exists before trying to write the disk marker

Not all the tests require a disk marker, so verify that /dev/disk/by-id exists
before attempting to write it. E.g., on a successful run of
TEST-45-SYSTEMD-IMPORT the following error messages are always printed:

```
2026-02-13T00:12:28.5241893Z made it to the test rootfs!
2026-02-13T00:12:28.5358768Z dd: failed to open '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker': No such file or directory
2026-02-13T00:12:28.5410929Z sync: error opening '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker': No such file or directory
2026-02-13T00:12:28.5417101Z All OK
```

However, the wrong sync operation sometimes seems to affect the "All OK" print
and the final verification of the test result. E.g.:

```
2026-02-13T00:16:40.5815187Z made it to the test rootfs!
2026-02-13T00:16:40.5913208Z dd: failed to open '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker': No such file or directory
2026-02-13T00:16:40.5932999Z /sbin/test-init: 57: echo: echo: I/O error
```

Hopefully fixes #2233

2 months agoci: enable TEST-45-SYSTEMD-IMPORT in openSUSE
Antonio Alvarez Feijoo [Tue, 10 Feb 2026 07:19:27 +0000 (08:19 +0100)] 
ci: enable TEST-45-SYSTEMD-IMPORT in openSUSE

openSUSE Tumbleweed ships systemd-v258 since snapshots 20260205 for x86-64 and
20260207 for aarch64.

2 months agofix(dracut): remove unused host_fs_all
Jo Zzsi [Tue, 10 Feb 2026 13:43:05 +0000 (08:43 -0500)] 
fix(dracut): remove unused host_fs_all

host_fs_all function was never documented.

https://codesearch.debian.net shows no user as well.

So remove the unused host_fs_all function.

2 months agotest: run mkfs.erofs with --quiet
Benjamin Drung [Thu, 12 Feb 2026 01:31:55 +0000 (02:31 +0100)] 
test: run mkfs.erofs with --quiet

The test calls `mkfs.ext4` with `-q`. Do the same for `mkfs.erofs`.
`mkfs.erofs` has only the long form `--quiet`.

2 months agofix(syslog): use return instead of exit in initqueue/online hook
Benjamin Drung [Wed, 11 Feb 2026 14:29:54 +0000 (15:29 +0100)] 
fix(syslog): use return instead of exit in initqueue/online hook

The `rsyslogd-start.sh` initqueue/online hook calls `exit 0`. This
causes the sourcing script to exit. The subsequent code is not executed.

Use `return` instead of `exit` in the syslog initqueue/online hook.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2227
2 months agofix(ppcmac): use return instead of exit in pre-udev hook
Benjamin Drung [Wed, 11 Feb 2026 13:53:55 +0000 (14:53 +0100)] 
fix(ppcmac): use return instead of exit in pre-udev hook

The `load-thermal.sh` pre-udev hook calls `exit 0`. This causes the
sourcing script (`dracut-pre-udev.sh` on systemd or `init.sh` from the
base Dracut module) to exit. The subsequent hooks are not executed.

Use `return` instead of `exit` in the ppcmac pre-udev hook.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2227
2 months agofix(memdisk): use return instead of exit in cmdline hook
Benjamin Drung [Wed, 11 Feb 2026 13:52:03 +0000 (14:52 +0100)] 
fix(memdisk): use return instead of exit in cmdline hook

The `memdisk.sh` cmdline hook calls `exit 0`. This causes the sourcing
script (`dracut-cmdline.sh` on systemd or `init.sh` from the base Dracut
module) to exit. The subsequent hooks are not executed.

Use `return` instead of `exit` in the memdisk cmdline hook.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2227
2 months agofix(kernel-modules-export): use return instead of exit in pre-pivot hook
Benjamin Drung [Wed, 11 Feb 2026 13:33:51 +0000 (14:33 +0100)] 
fix(kernel-modules-export): use return instead of exit in pre-pivot hook

The `modules-export.sh` pre-pivot hook calls `exit 0`. This causes the
sourcing script (`dracut-pre-pivot.sh` on systemd or `init.sh` from the
base Dracut module) to exit. The subsequent hooks are not executed.

Use `return` instead of `exit` in kernel-modules-export pre-pivot hook.

Co-authored-by: Neal Gompa <neal@gompa.dev>
Fixes: https://github.com/dracut-ng/dracut-ng/issues/2227
2 months agofix(systemd-networkd): check if units exist before enabling them
Antonio Alvarez Feijoo [Mon, 9 Feb 2026 07:42:41 +0000 (08:42 +0100)] 
fix(systemd-networkd): check if units exist before enabling them

`systemd-networkd-resolve-hook.socket` was introduced in systemd-v259, so dracut
throws an error with previous systemd versions:

```
dracut[I]: *** Including module: systemd-networkd ***
Failed to enable unit: Unit systemd-networkd-resolve-hook.socket does not exist
```

Follow-up for 84c05fc661fa2ec01cfb341e73569542d46938d7

2 months agodocs: update NEWS.md and AUTHORS for release 110 110
Neal Gompa [Mon, 9 Feb 2026 00:24:32 +0000 (19:24 -0500)] 
docs: update NEWS.md and AUTHORS for release 110

2 months agofix(release): use correct argument for head(1) to split header out
Neal Gompa [Sun, 8 Feb 2026 21:49:24 +0000 (16:49 -0500)] 
fix(release): use correct argument for head(1) to split header out

We actually want it to take the top two lines for identifying the header.

Fixes: 77c0d5774b ("fix(release): use correct arguments for head(1) and tail(1) calls")
2 months agofix(release): use the correct variable to set the new project version
Neal Gompa [Sun, 8 Feb 2026 20:58:49 +0000 (15:58 -0500)] 
fix(release): use the correct variable to set the new project version

The DRACUT_FULL_VERSION variable does not exist, and the intent was
to update it in place with the generated higher version number in
the script.

Fixes: d5e985d40e ("feat: move DRACUT_VERSION from dracut-version.sh into dracut.sh")
2 months agofix(release): use correct arguments for head(1) and tail(1) calls
Neal Gompa [Sun, 8 Feb 2026 20:57:09 +0000 (15:57 -0500)] 
fix(release): use correct arguments for head(1) and tail(1) calls

This ensures that the NEWS fragments can be produced correctly.

2 months agofix(release): only install clog-cli if it isn't already installed
Neal Gompa [Sun, 8 Feb 2026 20:34:20 +0000 (15:34 -0500)] 
fix(release): only install clog-cli if it isn't already installed

That way, it does not uselessly run when it is already present.

2 months agochore(base): remove support for /dev/.initramfs
Jo Zzsi [Sun, 8 Feb 2026 15:35:58 +0000 (10:35 -0500)] 
chore(base): remove support for /dev/.initramfs

/dev/.initramfs was a fallback when /run is not available.

This commit removes this legacy fallback support, which was only
available in a non-systemd enviroment.

Follow-up to dbad9f466 .

2 months agochore(qemu): move is_qemu_virtualized to qemu dracut module
Jo Zzsi [Sun, 8 Feb 2026 14:50:08 +0000 (09:50 -0500)] 
chore(qemu): move is_qemu_virtualized to qemu dracut module

Moving the is_qemu_virtualized function to qemu dracut module makes
the code more modular and dracut.sh smaller.

This change also enabled to remove the shellcheck exception.

2 months agochore: remove redundant call to is_qemu_virtualized
Jo Zzsi [Sun, 8 Feb 2026 14:46:49 +0000 (09:46 -0500)] 
chore: remove redundant call to is_qemu_virtualized

The qemu dracut module check function already calls is_qemu_virtualized
to determine the enviroment dracut is called in.

Checking if the qemu dracut module is included already transitively calls
is_qemu_virtualized.

2 months agofeat(virtfs, virtiofs): auto-add dracut module if qemu included
Jo Zzsi [Sat, 7 Feb 2026 22:53:07 +0000 (17:53 -0500)] 
feat(virtfs, virtiofs): auto-add dracut module if qemu included

If qemu dracut module included than automatically include
virtfs and virtiofs dracut modules as well unless
hostonly_mode is set to "strict".

Tested with the following dracut invocation (invoked
from a non-virtualized host).

`dracut --hostonly-mode sloppy -add qemu`

2 months agochore(dmsquash-live): remove support for ext3fs.img
Jo Zzsi [Sun, 8 Feb 2026 03:02:02 +0000 (22:02 -0500)] 
chore(dmsquash-live): remove support for ext3fs.img

All dracut based live iso's use either squashfs.img (compressed live)
or rootfs.img (uncompressed live).

Remove support for ext3fs.img.

Follow-up to fe17f4e (from 2011) .

2 months agotest(ISCSI-MULTI): remove including /etc/nbd-server/config
Benjamin Drung [Sun, 8 Feb 2026 04:04:54 +0000 (05:04 +0100)] 
test(ISCSI-MULTI): remove including /etc/nbd-server/config

The test 71 is about iSCSI and has nothing to do with NBD. There is no
`/tmp/config`.

So do not try to include it in the initrd.

2 months agoci: enable daily-systemd on ubuntu:devel-arm
Benjamin Drung [Sat, 7 Feb 2026 23:11:12 +0000 (00:11 +0100)] 
ci: enable daily-systemd on ubuntu:devel-arm

https://launchpad.net/bugs/2133402 has been fixed on the Ubuntu devel
release. linux 6.19.0-3.3 contains the fixed stubble.

2 months agofix(base): ensure that /run survives switch_root
Jo Zzsi [Sat, 7 Feb 2026 20:10:48 +0000 (15:10 -0500)] 
fix(base): ensure that /run survives switch_root

Ensure /run survives switch_root not only systemd enabled initramfs,
but initramfs without systemd.

This change makes systemd and non-systemd initramfs behaves similarly.

This change also enables the newly added test case for hooks to pass
on the busybox CI container.

This PR has no impact on systemd enabled initramfs.

2 months agoci: also run container manifest step for by workflow_dispatch
Benjamin Drung [Sun, 8 Feb 2026 01:01:53 +0000 (02:01 +0100)] 
ci: also run container manifest step for by workflow_dispatch

The container CI jobs might be run manually (using the
`workflow_dispatch` trigger). In this case the `manifest` step is
skipped. This makes manually runnings the container job useless.

Also run the container manifest step for `workflow_dispatch`.

2 months agotest: introduce make_test_rootfs
Benjamin Drung [Sat, 7 Feb 2026 22:58:52 +0000 (23:58 +0100)] 
test: introduce make_test_rootfs

Test 72 NBD has the helper functions `make_client_rootfs` and
`make_server_rootfs` which makes the test easier to read.

Introduce `make_test_rootfs` for the simpler tests (where there are no
client/server).

2 months agotest: introduce make_client_rootfs/make_server_rootfs
Benjamin Drung [Sat, 7 Feb 2026 22:57:44 +0000 (23:57 +0100)] 
test: introduce make_client_rootfs/make_server_rootfs

Test 72 NBD has the helper functions `make_client_rootfs` and
`make_server_rootfs` which makes the test easier to read.

Refactor the other tests and introduce the helper functions
`make_client_rootfs` and `make_server_rootfs` there as well.

2 months agotest: rename *_root to *_rootfs
Benjamin Drung [Sat, 7 Feb 2026 22:56:14 +0000 (23:56 +0100)] 
test: rename *_root to *_rootfs

Rename the `*_root` functions to `*_rootfs` since those functions build
root file systems.

2 months agotest: do not require pkg-config
Benjamin Drung [Sat, 7 Feb 2026 21:58:04 +0000 (22:58 +0100)] 
test: do not require pkg-config

The command `pkg-config` might not be installed in the test environment
(for example on Debian autopkgest).

Replace calling `pkg-config` by calling `systemctl --version`.

2 months agodocs: convert maintainer list into a table
Benjamin Drung [Sat, 7 Feb 2026 18:42:42 +0000 (19:42 +0100)] 
docs: convert maintainer list into a table

Convert maintainer list into a table and add a GitHub profile column.

2 months agotest: rename overlay directory to rootfs
Benjamin Drung [Sat, 7 Feb 2026 13:26:29 +0000 (14:26 +0100)] 
test: rename overlay directory to rootfs

Several tests use `build_ext4_image` to generate a rootfs and do not
rely on `test-makeroot` any more (where the `overlay` directory name was
used).

To make the test code more readable, rename the `overlay` directory to
`rootfs`. In case there are client and server rootfs, use
`client-rootfs` and `server-rootfs`.

2 months agoci: install diffutils on openSUSE container
Benjamin Drung [Sat, 7 Feb 2026 13:35:45 +0000 (14:35 +0100)] 
ci: install diffutils on openSUSE container

The test 81 needs the `diff` command and a recent openSUSE container
does not include it any more.

So explicitly install `diffutils`.

2 months agotest: always call sync before poweroff -f
Benjamin Drung [Sat, 7 Feb 2026 12:19:37 +0000 (13:19 +0100)] 
test: always call sync before poweroff -f

To be on the safe side, call `sync` before calling `poweroff -f` after
creating client rootfs in a virtual machine.

2 months agotest: remove duplicate overlay removal
Benjamin Drung [Sat, 7 Feb 2026 12:31:44 +0000 (13:31 +0100)] 
test: remove duplicate overlay removal

Removing `overlay` is done twice. Remove those duplicate calls.

2 months agotest: prevent overlay/source being added in test_dracut
Benjamin Drung [Fri, 6 Feb 2026 23:53:44 +0000 (00:53 +0100)] 
test: prevent overlay/source being added in test_dracut

The function `test_dracut()` will include `$TESTDIR/overlay` into the
test `initramfs.testing` if available. Several tests create
`$TESTDIR/overlay/source` for creating rootfs using `test-makeroot`.

Delete `$TESTDIR/overlay` after being used by `test-makeroot` to avoid
adding `$TESTDIR/overlay/source` to the client test initrd.

2 months agotest: stop mdadm after creating client rootfs
Benjamin Drung [Fri, 6 Feb 2026 22:57:41 +0000 (23:57 +0100)] 
test: stop mdadm after creating client rootfs

To be on the safe side, stop mdadm after creating client rootfs in the
iSCSI tests 70 and 71 (similar to `create-root.sh` in test 26).

2 months agoci: re-run tests 20, 26, 70, and 71 on debian
Benjamin Drung [Fri, 6 Feb 2026 21:49:22 +0000 (22:49 +0100)] 
ci: re-run tests 20, 26, 70, and 71 on debian

mdadm 4.5-2 introduced a regression:

```
++ mdadm --create /dev/md0 --run --level=1 --metadata=0.90 --raid-devices=2 /dev/mapper/dracut_disk1 /dev/mapper/dracut_disk2
mdadm: Can't open /sys/module/md_mod/parameters/legacy_async_del_gendisk
mdadm: init md module parameters fail
```

This regression has been fixed in mdadm 4.5-3.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2021
2 months agoci: fix wrong indentation in labeler YAML file
Benjamin Drung [Fri, 6 Feb 2026 22:33:14 +0000 (23:33 +0100)] 
ci: fix wrong indentation in labeler YAML file

```
$ yamllint .
./.github/labeler.yml
  563:3     error    wrong indentation: expected 4 but found 2  (indentation)
  564:7     error    wrong indentation: expected 8 but found 6  (indentation)
```

2 months agofix(dracut): also check libraries when resolving lazy
Benjamin Drung [Fri, 6 Feb 2026 22:00:14 +0000 (23:00 +0100)] 
fix(dracut): also check libraries when resolving lazy

Dracut might resolve executable dependencies lazy. In this case all
libraries are installed without resolving their dependencies.

Later Dracut will resolve dependencies of the included executables, but
it will not explicitly check libraries. This will miss resolving
dependencies of libraries that are used via `dlopen()`.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2193
2 months agodocs: add MAINTAINERS.md
Benjamin Drung [Fri, 6 Feb 2026 14:41:53 +0000 (15:41 +0100)] 
docs: add MAINTAINERS.md

Document who the maintainers are and which GPG they use.

2 months agoci: no need to explicitly add qemu-net anymore
Jo Zzsi [Thu, 5 Feb 2026 14:35:31 +0000 (09:35 -0500)] 
ci: no need to explicitly add qemu-net anymore

Commit 94b21ab enables dracut to automatically detect
when qemu-net is required.

Ensure this condition is covered by CI by removing qemu-net
from the dracut module lists.

2 months agofix(dracut-install): resolve dependencies even if not executable
Benjamin Drung [Fri, 6 Feb 2026 13:59:27 +0000 (14:59 +0100)] 
fix(dracut-install): resolve dependencies even if not executable

Library files on Debian/Ubuntu are not marked as executable. This causes
`dracut-install` to not resolve dependencies:

```
$ ls -l /usr/lib/x86_64-linux-gnu/libarchive.so.13.7.7
-rw-r--r-- 1 root root 874648 Jun 25  2025 /usr/lib/x86_64-linux-gnu/libarchive.so.13.7.7
$ rm -rf foo && mkdir foo
$ ./dracut-install -D foo -l /usr/lib/x86_64-linux-gnu/libarchive.so.13
$ find foo
foo
foo/usr
foo/usr/lib
foo/usr/lib/x86_64-linux-gnu
foo/usr/lib/x86_64-linux-gnu/libarchive.so.13.7.7
foo/usr/lib/x86_64-linux-gnu/libarchive.so.13
```

There is no requirement for library files to be executable. So resolve
dependencies all files. `resolve_deps()` will check if the file is
either an ELF file or a script.

This will also resolve dependencies of scripts that are not marked
executable, which might be an undesired side effect. In this case users
are advised to either call `dracut-install` without `-l` or not include
those files at all.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2193
2 months agochore(dracut): switch to /usr/lib from /lib for hooks
Vitaly Kuznetsov [Thu, 5 Feb 2026 08:11:48 +0000 (09:11 +0100)] 
chore(dracut): switch to /usr/lib from /lib for hooks

The current tendency is to move towards "hermetic /usr" and not
introduce new things outside of it. For distro shipped hooks and
for the testsuite move the location from /lib to /usr/lib.

No (real) functional change intended.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
2 months agofix(overlayfs): make overlayfs-lib.sh executable
Benjamin Drung [Thu, 5 Feb 2026 15:31:02 +0000 (16:31 +0100)] 
fix(overlayfs): make overlayfs-lib.sh executable

lintian complains:

```
W: dracut-core: script-not-executable [usr/lib/dracut/modules.d/70overlayfs/overlayfs-lib.sh]
```

2 months agofix: avoid leading spaces in systemd units
Benjamin Drung [Tue, 3 Feb 2026 21:24:46 +0000 (22:24 +0100)] 
fix: avoid leading spaces in systemd units

Some `sed` commands insert multiple lines into systemd units. Using
backslash followed by a newline and spaces (for indentation) will
include those spaces in the systemd unit.

Use `\n` instead to remove those leading spaces.

2 months agodocs: document dracut_rescue_image
Jo Zzsi [Fri, 23 Jan 2026 22:14:37 +0000 (17:14 -0500)] 
docs: document dracut_rescue_image

Add documentation for the dracut_rescue_image in the dracut.conf
man page.

2 months agofix(systemd-portabled): do not call portablectl
Jo Zzsi [Mon, 22 Sep 2025 22:46:18 +0000 (18:46 -0400)] 
fix(systemd-portabled): do not call portablectl

Drop the portablectl call altogether and stop adding
{/etc,/var,usr}/lib/portables/*.raw to the initramfs automatically.

These .raw files are full OS trees and are rather huge, adding a
specific .raw one manually seems like a legit use-case.

2 months agofeat: memdisk dracut module
Jo Zzsi [Fri, 16 Jan 2026 02:30:16 +0000 (21:30 -0500)] 
feat: memdisk dracut module

Memdisk ISO emulation with the memdiskfind utility of the
syslinux project.

The hook of the memdisk dracut module is based on
https://salsa.debian.org/live-team/live-boot/-/blob/master/components/3050-memdisk.sh .

2 months agofeat(systemd-import): introducing the systemd-import module
Antonio Alvarez Feijoo [Thu, 5 Feb 2026 12:36:08 +0000 (13:36 +0100)] 
feat(systemd-import): introducing the systemd-import module

This new module takes advantage of the features provided by
systemd-import-generator(8), systemd-importd.service(8) and
systemd-loop@.service(8), especifically the `rd.systemd.pull=` kernel command
line option, to download a disk image (tar/raw) into memory, optionally validate
its checksum or signature, and directly boot into it.

It allows to:
- Download a tar disk image into /run/machines and bind mount it into /sysroot
(via `root=bind:...`).
- Download a raw image into memory and attach it to a loopback block device, so
we can point `root=` to a known label or to the proper `/dev/disk/by-loop-ref/`
device.

Notes:
- It needs enough RAM to save and unpack/decompress the image.
- The image can be compressed with xz, gzip, bzip2, zstd.
- It supports btrfs, erofs, ext4, f2fs, squashfs, vfat, or xfs filesystems.

2 months agotest: use mksquashfs -no-progress consistently
Benjamin Drung [Thu, 5 Feb 2026 10:46:25 +0000 (11:46 +0100)] 
test: use mksquashfs -no-progress consistently

`mksquashfs` shows a progress bar by default. Test 12 calls `mksquashfs`
with `-no-progress` to hide the progress bar.

Use this parameter for all test cases that call `mksquashfs`.

2 months agofix(crypt-gpg): support missing /etc/dracut.conf.d
Benjamin Drung [Thu, 5 Feb 2026 11:49:08 +0000 (12:49 +0100)] 
fix(crypt-gpg): support missing /etc/dracut.conf.d

The directory `/etc/dracut.conf.d` might not exist. `crypt-gpg` will
cause this error message (seen on `gentoo:latest` test 10):

```
find: '/etc/dracut.conf.d': No such file or directory
```

Support this case.

2 months agofeat(qemu-net): auto-add qemu-net if net-lib and qemu included
Jo Zzsi [Thu, 15 Jan 2026 19:09:59 +0000 (14:09 -0500)] 
feat(qemu-net): auto-add qemu-net if net-lib and qemu included

In the interest of improving defaults, if net-lib and qemu
dracut modules are included than automatically include
dracut-net dracut modules as well.

I tested with the following dracut invocation

`dracut -a "network qemu"`

2 months agotest(HOOKS): introduce tests for dracut hooks
Vitaly Kuznetsov [Fri, 3 Oct 2025 16:02:45 +0000 (18:02 +0200)] 
test(HOOKS): introduce tests for dracut hooks

Introduce tests for Dracut hooks that mainly checks two things:
- Hooks from all hooks locations: `/var/lib/dracut/hooks`, `/etc/dracut/hooks`,
`/lib/dracut/hooks` execute.
- Hooks with the same name execute from the top priority location.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tweaked-by: Benjamin Drung <benjamin.drung@canonical.com>
2 months agofeat(dracut): introduce additional hooks locations
Vitaly Kuznetsov [Mon, 6 Oct 2025 14:54:46 +0000 (16:54 +0200)] 
feat(dracut): introduce additional hooks locations

Dracut init supports running custom hooks which are placed to
/var/lib/dracut/hooks/. The location was previously changed to /var
as the place needs to be writeable as some hooks are created and removed
in runtime. The current location, however, may come inconvenient in some
scenarios when the user wants to extend initramfs with custom scripts. In
particular, systemd allows extending initrd with 'sysext' and 'confext'
mechanism. This comes handy for extending e.g. UKI's initramfs without
the need to rebuild (and re-sign) the UKI. The problem is that 'sysext' can
only be used to extend /usr and /opt and 'confext/ can only extend /etc.
Both services make the location read-only and thus can't be used for the
main dracut hooks location even if we move it somewhere.

Add additional locations where users can put dracut hooks:
- /lib/dracut/hooks -- this location is supposed to be used for
  distro-specific static hooks.
- /etc/dracut/hooks -- this location can be used by users for locally
  created hooks.
- /var/lib/dracut/hooks -- the default location which is supposed to be
  used by dracut modules. This location is always writeable so modules
  can place and remove hooks from there in runtime. The existing '$hookdir'
  variable keeps pointing at this place.

Dracut also has support for /var/lib/dracut/hooks/initqueue/work flag and
in theory, it does not have to be in the hooks directory as it is not a
hook. The location, however, is documented and it is not entirely clear
if it would make sense to add support for /lib/dracut/hooks/initqueue/work
and /etc/dracut/hooks/initqueue/work as well: these locations can (and
probably should) be read-only so creating/removing flag there is hard. Keep
the status quo and only support '$hookdir/initqueue/work' for now.

Closes: https://github.com/dracut-ng/dracut-ng/issues/1618
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
2 months agochore(dracut): introduce list_hooks()
Vitaly Kuznetsov [Fri, 26 Sep 2025 15:09:50 +0000 (17:09 +0200)] 
chore(dracut): introduce list_hooks()

In preparation to supporting additional hooks locations, introduce a
function to list matching hooks.

No functional change intended.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
2 months agofeat: merge rd.overlayfs into rd.overlay
Benjamin Drung [Wed, 4 Feb 2026 12:57:19 +0000 (13:57 +0100)] 
feat: merge rd.overlayfs into rd.overlay

Having both `rd.overlayfs` and `rd.overlay` is confusing.

Standardize on using `rd.overlay` for the overlayfs Dracut module. Merge
`rd.overlayfs` into `rd.overlay`. `rd.overlay` can be a boolean or point
to a storage device now.

Commit b77ae7eb8523 ("feat: rename rd.live.overlay.overlayfs to
rd.overlayfs") introduced `rd.overlayfs` after the release 109. So no
Dracut release included `rd.overlayfs` and therefore no backward
compatility for `rd.overlayfs` is needed.

2 months agotest: log executing /assertion.sh
Benjamin Drung [Wed, 4 Feb 2026 14:27:07 +0000 (15:27 +0100)] 
test: log executing /assertion.sh

To ease debugging print a log message in case `/assertion.sh` is
executed in the client rootfs.

2 months agochore(dracut-logger): drop __DRACUT_LOGGER__
Benjamin Drung [Fri, 30 Jan 2026 23:53:19 +0000 (00:53 +0100)] 
chore(dracut-logger): drop __DRACUT_LOGGER__

Commit d6d53f60b21e ("dracut-functions: use "type" to determine the need
of sourcing dracut-logger") removed checking `__DRACUT_LOGGER__`. There
is no code any more that checks this environment variable.

So drop setting `__DRACUT_LOGGER__`.

2 months agofix(dracut-systemd): do not error out with new root= options handled by systemd
Antonio Alvarez Feijoo [Fri, 23 Jan 2026 10:59:55 +0000 (11:59 +0100)] 
fix(dracut-systemd): do not error out with new root= options handled by systemd

systemd-v258 [1] (gpt-auto-generator/fstab-generator) handles new options for
`root=`: gpt-auto-force, dissect, dissect-force, fstab, off.

[1] https://github.com/systemd/systemd/commit/3777c6e65aaa8dacacbd5be6e43ba644babe1ecd

2 months agotest: add commented DEBUGFAIL for debugging
Benjamin Drung [Wed, 4 Feb 2026 12:45:36 +0000 (13:45 +0100)] 
test: add commented DEBUGFAIL for debugging

To ease debugging add a commented `DEBUGFAIL` to all test cases.
Uncommenting `DEBUGFAIL` will be the first step of debugging in case the
logs are not enough.

2 months agofix(dracut-logger): do not require debug to be defined
Benjamin Drung [Sun, 1 Feb 2026 00:26:10 +0000 (01:26 +0100)] 
fix(dracut-logger): do not require debug to be defined

In case `dracut-logger.sh` is used in combination with `set -u` the
logging functions can fail due to `debug` not being defined. `dracut.sh`
sets this variable, but other consumers might not.

So support `set -u` by not require `debug` to be defined.

2 months agoci: install some packages to test systemd-import
Antonio Alvarez Feijoo [Wed, 4 Feb 2026 12:54:55 +0000 (13:54 +0100)] 
ci: install some packages to test systemd-import

2 months agoci(opensuse): do not install erofs-utils
Antonio Alvarez Feijoo [Wed, 4 Feb 2026 12:51:59 +0000 (13:51 +0100)] 
ci(opensuse): do not install erofs-utils

erofs is blacklisted by default and not supported in openSUSE, so it does not
make sense to test anything related to erofs in the CI with the openSUSE
container.

2 months agotest: print error in case root partition count mismatch
Benjamin Drung [Tue, 3 Feb 2026 12:23:30 +0000 (13:23 +0100)] 
test: print error in case root partition count mismatch

The dmsquash test case can fail by not creating an overlay partition. In
this case the test fails with exit code 1 without printing an error.
This is hard to debug.

So print an error message in case the root partition count mismatches.

2 months agofix(dracut-logger): disable kernel logging if /dev/kmsg is not writable
Benjamin Drung [Sat, 31 Jan 2026 18:54:39 +0000 (19:54 +0100)] 
fix(dracut-logger): disable kernel logging if /dev/kmsg is not writable

`/dev/kmsg` is might not be writable (for example in a podman
container). So disable trying to log to the kernel ring buffer in that
case.

2 months agofix(dracut-logger): allow dlog_init to print multiple errors
Benjamin Drung [Sat, 31 Jan 2026 18:51:45 +0000 (19:51 +0100)] 
fix(dracut-logger): allow dlog_init to print multiple errors

Allow `dlog_init` to print multiple errors by making `errmsg` an array.

2 months agofix(dracut-logger): do not export maxloglvl and syslogfacility
Benjamin Drung [Sat, 31 Jan 2026 00:39:21 +0000 (01:39 +0100)] 
fix(dracut-logger): do not export maxloglvl and syslogfacility

Commit 46265a9d3e0a ("dracut-logger: make $maxloglvl public") exports
the `maxloglvl` variable, but this is not needed. Exporting variables is
only needed when subprocesses need to access those variables.

`maxloglvl` is only used in `dracut-logger.sh` and `dracut.sh`.
`dracut.sh` sources `dracut-logger.sh`. So exporting `maxloglvl` is not
needed. `syslogfacility` is only used in `dracut-logger.sh`.

So do not export `maxloglvl` and `syslogfacility`.

2 months agotest: unset DRACUT_NO_XATTR after build_client_rootfs
Benjamin Drung [Fri, 30 Jan 2026 23:58:41 +0000 (00:58 +0100)] 
test: unset DRACUT_NO_XATTR after build_client_rootfs

`build_client_rootfs` sets `DRACUT_NO_XATTR` to not require xattr
support which is noot needed for the client rootfs. To not influence the
test coverage for xattr support, unset `DRACUT_NO_XATTR` afterwards.

2 months agofeat(gentoo): introduce a distro config file to default out of ukify
Jo Zzsi [Thu, 15 Jan 2026 17:39:22 +0000 (12:39 -0500)] 
feat(gentoo): introduce a distro config file to default out of ukify

Gentoo maintains a down-stream patch to default out of ukify.

The goal of this PR is to help out Gentoo so that the downstream
patch is no longer required.

Follow-up to 7ec5fbb.

2 months agochore(dracut): finalize transition to /var/lib/dracut/hooks
Vitaly Kuznetsov [Thu, 25 Sep 2025 09:53:06 +0000 (11:53 +0200)] 
chore(dracut): finalize transition to /var/lib/dracut/hooks

Commit a45048b80c ("move hooks directory from /usr/lib to /var/lib")
moved hooks to /var/lib/dracut/hooks and created a symlink from /lib
to avoid the code churn. In preparation to supporting additional
hooks locations, finalize the transition and use /var/lib/dracut/hooks
everywhere.

No functional change intended.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
2 months agoRevert "refactor(overlayfs): move legacy option handing into a cmdline hook"
Benjamin Drung [Wed, 4 Feb 2026 10:27:56 +0000 (11:27 +0100)] 
Revert "refactor(overlayfs): move legacy option handing into a cmdline hook"

Moving parsing the legacy options into
`parse-legacy-overlayfs-options.sh` can break the backward
compatibility. Out of tree Dracut modules might want to write to
`/etc/cmdline.d` after `parse-legacy-overlayfs-options.sh`. That change
wouldn't be picked up then.

This reverts commit 17ad34274adda788d179acaa10053630cb3be2de.

2 months agorefactor(overlayfs): move legacy option handing into a cmdline hook
Benjamin Drung [Tue, 3 Feb 2026 11:34:14 +0000 (12:34 +0100)] 
refactor(overlayfs): move legacy option handing into a cmdline hook

Reading the code and understanding the logic gets complicated by
supporting legacy kernel command line options. This will be especially
be true once `rd.overlayfs` gets merged into `rd.overlay`.

So move all the legacy kernel command line option handling into the
separate `parse-legacy-overlayfs-options.sh` script that is executed
during the cmdline stage.

Check that no legacy option is queried directly:

```
git grep getarg -- modules.d/ | grep -w -- -d | grep live
```

2 months agofeat(base): support cmdline options in /run/initramfs/cmdline.d
Benjamin Drung [Tue, 3 Feb 2026 11:22:02 +0000 (12:22 +0100)] 
feat(base): support cmdline options in /run/initramfs/cmdline.d

The command line options can be specified in `/etc/cmdline`,
`/etc/cmdline.d`, and on the kernel command line `/proc/cmdline`.
`/proc/cmdline` is read last and overrides options from `/etc`. There is
no way to override options from `/proc/cmdline`.

To allow overriding options from `/proc/cmdline` during boot also read
`/run/initramfs/cmdline.d`.

2 months agofix(livenet): correct check for deprecated rd.live.overlay.overlayfs
Benjamin Drung [Mon, 2 Feb 2026 15:04:49 +0000 (16:04 +0100)] 
fix(livenet): correct check for deprecated rd.live.overlay.overlayfs

Commit b77ae7eb8523 ("feat: rename rd.live.overlay.overlayfs to
rd.overlayfs") made a mistake and looks for `rd.live.overlayfs.readonly`
instead of `rd.live.overlay.overlayfs` as deprecated option for
`rd.overlayfs`.

2 months agotest: define test expectation in test.sh
Benjamin Drung [Sun, 1 Feb 2026 22:52:28 +0000 (23:52 +0100)] 
test: define test expectation in test.sh

Test 21 defines the test expectation in `assertion.sh` based on the boot
parameters. Every time a new kind of subtest is added in `test.sh` the
expectation in `assertion.sh` needs to be changed accordingly.

To avoid touching two places, define the test expectation in the kernel
boot parameter `test.expect` and let `assertion.sh` operate on that.

2 months agoci(debian): dracut-squash and dracut-live packages are removed
Jo Zzsi [Sat, 31 Jan 2026 13:35:48 +0000 (08:35 -0500)] 
ci(debian): dracut-squash and dracut-live packages are removed

Debian:sid remove dracut-squash and dracut-live packages.

Remove these packages from all Debian/Ubuntu versions.

See https://salsa.debian.org/kernel-team/dracut/-/merge_requests/42
https://salsa.debian.org/kernel-team/dracut/-/merge_requests/43

2 months agofix(systemd-cryptsetup): increase ordering to resolve regression
Jo Zzsi [Fri, 23 Jan 2026 21:57:46 +0000 (16:57 -0500)] 
fix(systemd-cryptsetup): increase ordering to resolve regression

Support for `AF_UNIX` key files was added in 80480a7, in `90systemd-cryptsetup`
at that time. `90systemd-cryptsetup` depending on `90crypt` was ok, because
`90crypt` was evaluated before `90systemd-cryptsetup`, filling
`$initdir/etc/crypttab` before `90systemd-cryptsetup` tried to parse it.
But 43581cd changed the order to `01systemd-cryptsetup`, causing that the
install section of this module is evaluated before `90crypt`, that is,
before `$initdir/etc/crypttab` exists.

The systemd-cryptsetup dracut module needs to be ordered after the
crypt dracut module to ensure that "$initdir"/etc/crypttab is computed.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2104
2 months agotest: build the test rootfs without calling dracut
Benjamin Drung [Thu, 29 Jan 2026 23:19:02 +0000 (00:19 +0100)] 
test: build the test rootfs without calling dracut

Build the test rootfs by using the functions from `dracut-functions.sh`
instead of calling dracut. Only include the bare minimum for the client
rootfs.

Tested the test execution time on a Raspberry Pi 5 running Ubuntu 26.04:

```
$ hyperfine -L commit 9d5f58b4,build-rootfs -p "git checkout {commit}" -w 1 "test/test.sh ubuntu:devel 10"
Benchmark 1: test/test.sh ubuntu:devel 10 (commit = 9d5f58b4)
  Time (mean ± σ):     49.570 s ±  2.847 s    [User: 0.185 s, System: 0.239 s]
  Range (min … max):   46.697 s … 56.466 s    10 runs

Benchmark 2: test/test.sh ubuntu:devel 10 (commit = build-rootfs)
  Time (mean ± σ):     46.627 s ±  0.625 s    [User: 0.174 s, System: 0.220 s]
  Range (min … max):   45.322 s … 47.210 s    10 runs

Summary
  test/test.sh ubuntu:devel 10 (commit = build-rootfs) ran
    1.06 ± 0.06 times faster than test/test.sh ubuntu:devel 10 (commit = 9d5f58b4)
```

2 months agotest: determine kernel version from initramfs.makeroot
Benjamin Drung [Tue, 27 Jan 2026 13:21:32 +0000 (14:21 +0100)] 
test: determine kernel version from initramfs.makeroot

Determine the kernel version from `initramfs.makeroot` instead from the
client rootfs, because a minimal client rootfs might not contain kernel
modules.

2 months agofix(dmsquash-live-autooverlay): check that parted is present
Benjamin Drung [Thu, 29 Jan 2026 21:01:15 +0000 (22:01 +0100)] 
fix(dmsquash-live-autooverlay): check that parted is present

The binary `parted` might not be installed. Then the `install` step of
`dmsquash-live-autooverlay` will fail.

So better check that the required binary `parted` is present.