]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
2 months agofeat: replace DRACUT_RESOLVE_DEPS by !DRACUT_RESOLVE_LAZY
Benjamin Drung [Thu, 29 Jan 2026 09:51:50 +0000 (10:51 +0100)] 
feat: replace DRACUT_RESOLVE_DEPS by !DRACUT_RESOLVE_LAZY

The two variables `DRACUT_RESOLVE_DEPS` and `DRACUT_RESOLVE_LAZY` are
mutual exclusive (one must be set, the other must not).

Make the code easier by dropping `DRACUT_RESOLVE_DEPS` and replacing
those parts by checking if `DRACUT_RESOLVE_LAZY` is not set. This sets
the default to resolving dependencies in the `inst*` functions.

2 months agofeat(systemd-pcrphase): rename to systemd-pcrextend
Benjamin Drung [Fri, 23 Jan 2026 22:15:31 +0000 (23:15 +0100)] 
feat(systemd-pcrphase): rename to systemd-pcrextend

systemd-255 renamed systemd-pcrphase to systemd-pcrextend. Do the same
for the Dracut module to match that name.

2 months agofeat(overlayfs): add persistent device overlay support
Nadzeya Hutsko [Wed, 28 Jan 2026 22:19:34 +0000 (09:19 +1100)] 
feat(overlayfs): add persistent device overlay support

Extends the overlayfs module to support persistent overlay storage on
block devices using rd.overlay=. Supported formats: LABEL=, UUID=,
PARTUUID=, PARTLABEL=, and /dev/ paths.

Changes written to the overlay device persist across reboots. Falls
back to tmpfs if the device cannot be resolved or mounted.

2 months agofix(tpm2-tss): add tss user/group in addition to sysusers config
Benjamin Drung [Tue, 27 Jan 2026 11:33:12 +0000 (12:33 +0100)] 
fix(tpm2-tss): add tss user/group in addition to sysusers config

Test 10 on ubuntu:devel shows this warning:

```
[    0.608623] systemd-tmpfiles[243]: /usr/lib/tmpfiles.d/systemd.conf:33: Duplicate line for path "/var/lib/systemd", ignoring.
[    0.609389] systemd-tmpfiles[243]: /usr/lib/tmpfiles.d/tpm2-tss-fapi.conf:2: Failed to resolve user 'tss': Unknown user
[    0.610114] systemd-tmpfiles[243]: Failed to parse ACL "default:group:tss:rwx", ignoring: Invalid argument
[    0.610800] systemd-tmpfiles[243]: /usr/lib/tmpfiles.d/tpm2-tss-fapi.conf:4: Failed to resolve user 'tss': Unknown user
[    0.611515] systemd-tmpfiles[243]: Failed to parse ACL "default:group:tss:rwx", ignoring: Invalid argument
[    0.612262] systemd-tmpfiles[243]: /usr/lib/tmpfiles.d/tpm2-tss-fapi.conf:6: Failed to resolve group 'tss': Unknown group
[    0.613564] systemd-tmpfiles[243]: /usr/lib/tmpfiles.d/tpm2-tss-fapi.conf:7: Failed to resolve group 'tss': Unknown group
[    0.627211] systemd-udevd[245]: /usr/lib/udev/rules.d/60-tpm-udev.rules:3 Failed to resolve user 'tss', ignoring: Unknown user
[    0.628065] systemd-udevd[245]: /usr/lib/udev/rules.d/60-tpm-udev.rules:4 Failed to resolve user 'tss', ignoring: Unknown user
```

Debian/Ubuntu does not ship a sysusers config for the tss user/group.
Instead the tpm-udev package creates a tss user and group in its
postinst script.

So copy the tss user and group into the initrd in addition to shipping
possible sysusers config for it.

Bug-Ubuntu: https://launchpad.net/bugs/2127725
Fixes: https://github.com/dracut-ng/dracut-ng/issues/1826
2 months agotest: consider SIGTERM of test-init.sh a successful termination
Benjamin Drung [Tue, 27 Jan 2026 15:24:53 +0000 (16:24 +0100)] 
test: consider SIGTERM of test-init.sh a successful termination

The `test-init.sh` will call `systemctl start poweroff.target` and get
an `SIGTERM` interrupt. Since `testsuite.service` is `Type=oneshot`
systemd will complain:

```
[    1.892101] systemd[1]: testsuite.service: Main process exited, code=killed, status=15/TERM
[    1.892708] systemd[1]: testsuite.service: Failed with result 'signal'.
```

Consider `SIGTERM` of `test-init.sh` a successful termination.

2 months agotest: move start_webserver to test-functions
Benjamin Drung [Thu, 29 Jan 2026 11:38:52 +0000 (12:38 +0100)] 
test: move start_webserver to test-functions

To allow re-using `start_webserver` in other test cases (for example for
systemd-import), move `start_webserver` to `test-functions` and add
`stop_webserver` for stopping it again.

2 months agotest: execute assertion.sh instead of sourcing it
Benjamin Drung [Wed, 28 Jan 2026 19:21:25 +0000 (20:21 +0100)] 
test: execute assertion.sh instead of sourcing it

The `assertion.sh` files do not need to access from `test-init.sh`. So
execute `assertion.sh` instead of sourcing it.

2 months agorefactor(overlayfs): exit early in case overlayfs is not used
Benjamin Drung [Wed, 28 Jan 2026 21:47:19 +0000 (22:47 +0100)] 
refactor(overlayfs): exit early in case overlayfs is not used

Increase the code readability by exiting early in case overlayfs is not
enabled and therefore should do nothing.

2 months agotest(NETWORK): use POSIX shell for assertion.sh
Benjamin Drung [Wed, 28 Jan 2026 19:25:48 +0000 (20:25 +0100)] 
test(NETWORK): use POSIX shell for assertion.sh

Make the test 50 more flexible by only requiring a POSIX shell in
`assertion.sh` in the client rootfs.

2 months agodocs(dracut.conf): restore accidentally removed newline
Benjamin Drung [Wed, 28 Jan 2026 17:27:20 +0000 (18:27 +0100)] 
docs(dracut.conf): restore accidentally removed newline

Commit 331a30a2dda9 ("docs: --remove/remove_items supports globbing")
accidentally removed a newline. Restore it.

2 months agofix(dracut): move libdirs to dracut-functions.sh
Benjamin Drung [Mon, 26 Jan 2026 20:30:27 +0000 (21:30 +0100)] 
fix(dracut): move libdirs to dracut-functions.sh

The variable `libdirs` is used by functions defined in
`dracut-functions.sh` (for example `inst_libdir_file`).

So move initializing `libdirs` to `dracut-functions.sh`.

2 months agoperf(dracut): remove duplicate export libdirs
Benjamin Drung [Mon, 26 Jan 2026 16:54:15 +0000 (17:54 +0100)] 
perf(dracut): remove duplicate export libdirs

The variable `libdirs` is exported later on in the `dracut.sh` code
together with all the other variables.

2 months agorefactor(dracut.sh): introduce _detect_library_directories
Benjamin Drung [Mon, 26 Jan 2026 16:50:48 +0000 (17:50 +0100)] 
refactor(dracut.sh): introduce _detect_library_directories

Move constructing `libdirs` into a separate helper function
`_detect_library_directories`.

2 months agodocs(dracut.cmdline): add version info to deprecated options
Benjamin Drung [Wed, 28 Jan 2026 15:46:45 +0000 (16:46 +0100)] 
docs(dracut.cmdline): add version info to deprecated options

Document which dracut version introduced the new option names. Relevant
commits:

bcefa9d0a4ac ("feat: rename rd.overlayfs.readonly to rd.overlay.readonly")
d6872bbdf344 ("feat: rename rd.live.overlay to rd.overlay")
b77ae7eb8523 ("feat: rename rd.live.overlay.overlayfs to rd.overlayfs")
a471ca601b2a ("fix(base): add support for rd.udev.log_level")
b43f4df540b2 ("iscsi: changed parameters to new rd.iscsi style")
ee6fa3240d2c ("i18n: move to vconfig.* and locale.* namespace")
fa7ada31d022 ("new parameter option names with "rd.*" namespace")

2 months agodocs: --remove/remove_items supports globbing
Benjamin Drung [Wed, 28 Jan 2026 15:32:36 +0000 (16:32 +0100)] 
docs: --remove/remove_items supports globbing

The dracut option `--remove` and the corresponding config option
`remove_items` support globbing (see https://launchpad.net/bugs/2139065
for a real-world usage example).

2 months agotest: allow passing NO_KVM into container
Benjamin Drung [Wed, 28 Jan 2026 00:14:06 +0000 (01:14 +0100)] 
test: allow passing NO_KVM into container

Allow passing the environment variable `NO_KVM` to the container to
influence `run-qemu`.

2 months agotest: use build_ext4_image where possible
Benjamin Drung [Tue, 27 Jan 2026 22:43:49 +0000 (23:43 +0100)] 
test: use build_ext4_image where possible

To speed up the test execution use `build_ext4_image` to build rootfs
ext4 images in cases where QEMU was only used to build an unencrypted
ext4 rootfs. This applies the improvement from commit 6e51e550abb8
("test(NFS): use build_ext4_image to build server rootfs") to all other
test cases.

2 months agotest: drop index parameter from qemu_add_drive
Benjamin Drung [Tue, 27 Jan 2026 22:09:07 +0000 (23:09 +0100)] 
test: drop index parameter from qemu_add_drive

Simplify `qemu_add_drive` by dropping the `index` parameter. Determine
the index dynamically from the content of `args`.

That way declaring `disk_index` is not needed any more and shellcheck is
happy.

2 months agotest(UEFI): let drive index start with 0
Benjamin Drung [Tue, 27 Jan 2026 22:18:54 +0000 (23:18 +0100)] 
test(UEFI): let drive index start with 0

Unify the tests and let the drive index for test 12 start at 0 as well.

2 months agotest: use a nameref variable in qemu_add_drive
Benjamin Drung [Tue, 27 Jan 2026 21:58:00 +0000 (22:58 +0100)] 
test: use a nameref variable in qemu_add_drive

Avoid the need for `eval` by using a nameref variable.

2 months agotest: remove fallback for id-name in qemu_add_drive
Benjamin Drung [Tue, 27 Jan 2026 21:36:19 +0000 (22:36 +0100)] 
test: remove fallback for id-name in qemu_add_drive

The documentation for `qemu_add_drive` says that `id-name` must be
specified and all consumers specify a name. So drop the fallback for
this parameter.

2 months agotest(NFS): use build_ext4_image to build server rootfs
Benjamin Drung [Tue, 27 Jan 2026 19:33:06 +0000 (20:33 +0100)] 
test(NFS): use build_ext4_image to build server rootfs

After commit d36012143c7c ("test: use systemd inside client test rootfs
if available") and commit 4aaf8f24110f ("test: include systemd-journald
in client test rootfs") the test 60 on opensuse:latest fails due to not
enough memory for starting the QEMU process to create the server rootfs
image.

Use `build_ext4_image` to build the server rootfs to completely avoid
needing to start a QEMU instance.

2 months agotest: increase ext4 size in build_ext4_image
Benjamin Drung [Tue, 27 Jan 2026 19:20:57 +0000 (20:20 +0100)] 
test: increase ext4 size in build_ext4_image

Adding a fixed amount of 10 MB to the ext4 image size might not be
enough (for example when using `build_ext4_image` in test 60).

So calculate the additional size by a percentaged and a fixed amount.

2 months agorevert(test): exclude systemd from server rootfs
Benjamin Drung [Tue, 27 Jan 2026 19:19:12 +0000 (20:19 +0100)] 
revert(test): exclude systemd from server rootfs

The network tests need systemd when they use systemd-networkd for
networking. The tests will fail with:

```
dracut[E]: Module 'systemd-networkd' depends on module 'systemd', which can't be installed
```

This reverts commit 30894ad4855018f6ec07664ce06bf5557d65e324.

2 months agotest: log exit code in case the client init script fails
Benjamin Drung [Mon, 26 Jan 2026 22:24:51 +0000 (23:24 +0100)] 
test: log exit code in case the client init script fails

To ease debugging, log the exit code in case the client init script
fails.

2 months agotest: exclude systemd from server rootfs
Benjamin Drung [Tue, 27 Jan 2026 14:52:53 +0000 (15:52 +0100)] 
test: exclude systemd from server rootfs

After commit d36012143c7c ("test: use systemd inside client test rootfs
if available") and commit 4aaf8f24110f ("test: include systemd-journald
in client test rootfs") the test 60 on opensuse:latest fails due to not
enough memory on the server rootfs image.

So revert those two changes partially: create the server rootfs images
without systemd. Also create the client test rootfs without systemd.

3 months agotest: include systemd-journald in client test rootfs
Benjamin Drung [Tue, 27 Jan 2026 12:04:27 +0000 (13:04 +0100)] 
test: include systemd-journald in client test rootfs

After commit d36012143c7c ("test: use systemd inside client test rootfs
if available") some tests became racy (for example test 20 on
debian:latest or fedora:latest). There is `made it to the test rootfs!`
in the logs but not the `All OK`.

Following warning can be found in the logs:

```
systemd[1]: systemd-journald.socket: Unit configuration changed while unit was running, and no socket file descriptors are open. Unit not functional until restarted.
systemd[1]: systemd-udevd-kernel.socket: Unit configuration changed while unit was running, and no socket file descriptors are open. Unit not functional until restarted.
systemd[1]: systemd-journald-dev-log.socket: Unit configuration changed while unit was running, and no socket file descriptors are open. Unit not functional until restarted.
```

Include `systemd-journald` in client test root file system when systemd
is used to ensure that systemd-journald continues working.

Hopefully fixes: https://github.com/dracut-ng/dracut-ng/issues/2137

3 months agotest: use EXIT trap to poweroff client rootfs
Benjamin Drung [Mon, 26 Jan 2026 21:43:17 +0000 (22:43 +0100)] 
test: use EXIT trap to poweroff client rootfs

Use an trap on `EXIT` to poweroff the client rootfs. This will cover all
kinds of failure and allows using `set -eu` in the init script.

3 months agofix(dracut): move defining DRACUT_LDCONFIG to dracut-functions.sh
Benjamin Drung [Mon, 26 Jan 2026 16:35:55 +0000 (17:35 +0100)] 
fix(dracut): move defining DRACUT_LDCONFIG to dracut-functions.sh

The function `ldconfig_paths` in `dracut-functions.sh` uses
`DRACUT_LDCONFIG`. Therefore move defining `DRACUT_LDCONFIG` into
`dracut-functions.sh`.

3 months agotest: avoid printing wall message on shutdown
Benjamin Drung [Mon, 26 Jan 2026 15:54:40 +0000 (16:54 +0100)] 
test: avoid printing wall message on shutdown

Calling `systemctl poweroff` in the client test rootfs causes this
warning:

```
Failed to connect to system scope bus via local transport: No such file or directory
```

Installing D-Bus in the client test rootfs changes the warning to:

```
Failed to set wall message, ignoring: Transport endpoint is not connected
Call to PowerOff failed: Transport endpoint is not connected
```

The man page for systemctl poweroff says: "Shut down and power-off the
system. This is mostly equivalent to systemctl start poweroff.target
--job-mode=replace-irreversibly --no-block, but also prints a wall
message to all users."

So call this equivalent command instead to not trying to print wall
message on shutdown.

3 months agotest: use systemd inside client test rootfs if available
Benjamin Drung [Mon, 26 Jan 2026 15:17:45 +0000 (16:17 +0100)] 
test: use systemd inside client test rootfs if available

Some tests (for example test 10 on ubuntu:devel) show this warning:

```
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to system scope bus via local transport: Host is down
```

This is caused by calling `systemctl --failed` in the client test rootfs
where systemd is not available/used.

Use systemd inside the client test rootfs if available to allow querying
the failed services from the initrd.

3 months agoci(busybox): do not mix kmod and busybox binaries
Jo Zzsi [Sun, 25 Jan 2026 22:37:12 +0000 (17:37 -0500)] 
ci(busybox): do not mix kmod and busybox binaries

Busybox provides applets for all (e.g. modprobe, rmmod)
kmod binaries (under /sbin). These kmod binaries are all
copied over in the busybox CI container except kmod binary
itself, which will confuse dracut (as command kmod will return tue).

Remove kmod from /bin/kmod from the busybox container.

3 months agoci: use uutil's coreutils on ubuntu:devel (resolute)
Benjamin Drung [Sun, 25 Jan 2026 20:37:21 +0000 (21:37 +0100)] 
ci: use uutil's coreutils on ubuntu:devel (resolute)

rust-coreutils 0.5.0 landed in Ubuntu 26.04 (resolute). Therefore
https://github.com/uutils/coreutils/issues/9057 and
https://launchpad.net/bugs/2129037 are fixed in ubuntu:devel.

3 months agoci(busybox): unwrap short command
Jo Zzsi [Sun, 25 Jan 2026 18:48:33 +0000 (13:48 -0500)] 
ci(busybox): unwrap short command

After 36ca1ba the command is short enough to unwrap this line.

3 months agochore(dracut): remove support for module-init-tools
Jo Zzsi [Sun, 25 Jan 2026 17:59:12 +0000 (12:59 -0500)] 
chore(dracut): remove support for module-init-tools

module-init-tools was EOL'ed in 2011.

partial revert of ecf42850c (from 2010).

3 months agofix(dracut-functions): check for kmod
Jo Zzsi [Sun, 25 Jan 2026 17:36:28 +0000 (12:36 -0500)] 
fix(dracut-functions): check for kmod

Check for kmod before depending on a kmod specific functionality.

This code pattern is taken from the base module which already
includes a similar kmod check.

3 months agoci(busybox): do not install additional packages during test run
Jo Zzsi [Sun, 25 Jan 2026 13:07:11 +0000 (08:07 -0500)] 
ci(busybox): do not install additional packages during test run

Only run those tests that are passing on busybox without additional
GNU tools.

Removed test 82, as that is now failing due to busybox procps-ng
differences.

3 months agoci: always include container in job names
Benjamin Drung [Sun, 25 Jan 2026 15:36:30 +0000 (16:36 +0100)] 
ci: always include container in job names

Always include the container name in the CI job names (for consistency).

3 months agoci(LIVENET): enable livenet testing on Alpine
Jo Zzsi [Fri, 23 Jan 2026 15:59:45 +0000 (10:59 -0500)] 
ci(LIVENET): enable livenet testing on Alpine

Test 31 (livenet) requires curl to be available in the test CI
container.

3 months agoperf(dracut): unset threecpio_help_output after usage
Benjamin Drung [Sat, 24 Jan 2026 15:41:32 +0000 (16:41 +0100)] 
perf(dracut): unset threecpio_help_output after usage

Reduce the memory consumption by unsetting `threecpio_help_output` after
usage.

3 months agoperf(dracut): re-use cached 3cpio --help output
Benjamin Drung [Sat, 24 Jan 2026 15:39:51 +0000 (16:39 +0100)] 
perf(dracut): re-use cached 3cpio --help output

Re-use `threecpio_help_output` instead of calling `3cpio` again. This
should be faster.

3 months agoperf(dracut): replace grep by bash pattern matching
Benjamin Drung [Sat, 24 Jan 2026 15:36:23 +0000 (16:36 +0100)] 
perf(dracut): replace grep by bash pattern matching

Replace `echo | grep` by a bash pattern matching to avoid spawning
external processes. The bash pattern matching should be faster.

3 months agorefactor(dracut): rename help_output to threecpio_help_output
Benjamin Drung [Sat, 24 Jan 2026 15:30:34 +0000 (16:30 +0100)] 
refactor(dracut): rename help_output to threecpio_help_output

3 months agofeat: rename rd.overlayfs.readonly to rd.overlay.readonly
Benjamin Drung [Sat, 24 Jan 2026 01:08:56 +0000 (02:08 +0100)] 
feat: rename rd.overlayfs.readonly to rd.overlay.readonly

Commit b77ae7eb8523da696fcb0f48a747ac22bdc9eb31 renamed
`rd.live.overlay.readonly` to `rd.overlayfs.readonly`. Unify the overlay
parameters into the `rd.overlay` namespace. There is no backward
compatibility support needed for `rd.overlayfs.readonly` since it hasn't
been part of a Dracut release.

3 months agochore: use full URL as reference for fixed bugs
Benjamin Drung [Sat, 24 Jan 2026 17:11:52 +0000 (18:11 +0100)] 
chore: use full URL as reference for fixed bugs

Use full URL as reference for fixed bugs. Otherwise the correct bug will
be lost in case the project is renamed or forked.

3 months agochore: move Fixes further up
Benjamin Drung [Sat, 24 Jan 2026 17:10:24 +0000 (18:10 +0100)] 
chore: move Fixes further up

Move `Fixes` further up so that the checklist is always at the end.

3 months agochore: hide template text in HTML comment
Benjamin Drung [Sat, 24 Jan 2026 17:01:16 +0000 (18:01 +0100)] 
chore: hide template text in HTML comment

Hide the template text in HTML comment. This will prevent having the
text displayed in case the submitter does not replace it.

3 months agochore: use level 3 heading for pull request checklist
Benjamin Drung [Sat, 24 Jan 2026 16:57:16 +0000 (17:57 +0100)] 
chore: use level 3 heading for pull request checklist

The size of the `Checklist` heading is too big.

3 months agoci(busybox): install more non-busybox binaries
Jo Zzsi [Sat, 24 Jan 2026 23:20:54 +0000 (18:20 -0500)] 
ci(busybox): install more non-busybox binaries

Redesign the way the busybox container is computed to make it
easier to maintain and eliminate the need to install additional
alpine packages later on.

The new approach inherits from the "regular" alpine dracut container
and replaces all GNU coreutils and GNU util-linux binaries with
busybox binaries.

This PR is reusing Dockerfile-alpine and have an OPTION variable to
prioritize busybox.

3 months agoci: rename alpine-busybox:edge to alpine:busybox-edge
Benjamin Drung [Sat, 24 Jan 2026 23:58:06 +0000 (00:58 +0100)] 
ci: rename alpine-busybox:edge to alpine:busybox-edge

Move busybox from the image name to the tag. That way all alpine images
can be found on https://github.com/dracut-ng/dracut-ng/pkgs/container/alpine

3 months agorefactor(run-qemu): group serial and log file handling
Benjamin Drung [Sat, 24 Jan 2026 16:53:50 +0000 (17:53 +0100)] 
refactor(run-qemu): group serial and log file handling

Configuring `-serial` to write to `stdout` and writing to the a QEMU log
file belongs together.

3 months agotest: use check_qemu_log instead of test marker.img
Benjamin Drung [Fri, 23 Jan 2026 21:24:10 +0000 (22:24 +0100)] 
test: use check_qemu_log instead of test marker.img

Simplify the test code by reading the QEMU log instead of requiring to
write to a `marker.img` inside the VM.

3 months agofeat(dracut): allow hostonly mode if /sys /proc or /run is missing
Jo Zzsi [Fri, 9 Jan 2026 10:58:32 +0000 (05:58 -0500)] 
feat(dracut): allow hostonly mode if /sys /proc or /run is missing

Missing /sys, /proc, or /run no longer forces non-hostonly mode.
Hostonly initramfs generation still requires /dev to be mounted and
continues to work in chroot environments where these filesystems may
be absent.

If /sys is missing, dracut emits a warning but does not fall back to
non-hostonly mode. Hostonly generation should not depend on /sys,
/proc, or /run being mounted.

3 months agochore: remove Changes header from the tempate
Jo Zzsi [Sun, 18 Jan 2026 22:03:49 +0000 (17:03 -0500)] 
chore: remove Changes header from the tempate

Remove Changes header from the tempate to make it easier to
create PRs.

3 months agotest: fix run-qemu to create a log file even with busybox
Benjamin Drung [Sat, 24 Jan 2026 13:12:37 +0000 (14:12 +0100)] 
test: fix run-qemu to create a log file even with busybox

Busybox timeout does not support `--foregroud` and therefore the tests
are run without a timeout when using busybox (for example on
alpine-busybox:edge). The code path for writing to `QEMU_LOGFILE` was
also skipped in this case.

Move checking the condition for writing to a log file into a separate
if-condition.

Fixes: e794ed6b14cf ("test: let run-qemu create a log file")
3 months agofeat: warn in case 3cpio is present but not suitable
Benjamin Drung [Fri, 23 Jan 2026 21:59:26 +0000 (22:59 +0100)] 
feat: warn in case 3cpio is present but not suitable

In case the 3cpio call fails, dracut will silently fall back to cpio.
This makes debugging harder.

So print a warning in case calling 3cpio fails. Print an info in case
3cpio does not support `--create`.

See also https://bugs.debian.org/1126301

3 months agoci(debian): do not install cpio if 3cpio is installed
Benjamin Drung [Fri, 23 Jan 2026 21:52:04 +0000 (22:52 +0100)] 
ci(debian): do not install cpio if 3cpio is installed

Dracut either needs 3cpio or cpio, but not both. So do not install cpio
in case 3cpio is installed.

3 months agotest: let run-qemu create a log file
Benjamin Drung [Fri, 23 Jan 2026 20:44:03 +0000 (21:44 +0100)] 
test: let run-qemu create a log file

Let `run-qemu` create a log file if `QEMU_LOGFILE` is set and the
QEMU is not run in `-daemonize` mode.

3 months agorefactor(test): move check_qemu_log to test-functions
Benjamin Drung [Fri, 23 Jan 2026 17:17:53 +0000 (18:17 +0100)] 
refactor(test): move check_qemu_log to test-functions

Move `check_log` to `test/test-functions`, name it `check_qemu_log`, and
do not require to specify the success message (which will be the same
for all tests).

3 months agoci: wrap long name lines
Benjamin Drung [Fri, 23 Jan 2026 16:41:25 +0000 (17:41 +0100)] 
ci: wrap long name lines

Wrap the long name lines to make yamllint happy.

3 months agoci: wrap long run lines
Benjamin Drung [Fri, 23 Jan 2026 16:38:36 +0000 (17:38 +0100)] 
ci: wrap long run lines

Wrap the long run lines to make yamllint happy.

3 months agoci: wrap long concurrency group lines
Benjamin Drung [Fri, 23 Jan 2026 16:32:44 +0000 (17:32 +0100)] 
ci: wrap long concurrency group lines

Wrap the long concurrency group lines to make yamllint happy.

3 months agoci: use 4-space indent for YAML files
Benjamin Drung [Fri, 23 Jan 2026 13:19:11 +0000 (14:19 +0100)] 
ci: use 4-space indent for YAML files

Some YAML files use 2-space indent and others use 4-space indent. Use
4-space indent for all YAML files. Use this one-liner to convert them:

```
perl -i -pe 's/^((?: {2})+)/"    " x (length($1) \/ 2)/e' antora-playbook.yml \
    doc_site/antora.yml doc_site/supplemental-ui/ui.yml \
    .github/{labeler,dependabot}.yml .github/workflows/{codeql,lint,release,publish,pr}.yml
```

Plus some manual clean-up afterwards.

3 months agoci: use common multi-arch container tags
Benjamin Drung [Fri, 23 Jan 2026 13:33:43 +0000 (14:33 +0100)] 
ci: use common multi-arch container tags

Commit 5dd694a4834ec7643b02d04d73f87d5c760b7ede created multi-arch
container tag. Use those in the CI jobs to simplify the jobs.

3 months agoci: test UEFI generation on Alpine
Jo Zzsi [Sat, 17 Jan 2026 10:11:45 +0000 (05:11 -0500)] 
ci: test UEFI generation on Alpine

Strengthen determine_kernel_version (this function only used
during testing) to look for files ending with modules.dep
to filter out entries like e.g. modules.dep.bin.

3 months agoci(Alpine): vmlinuz workaround
Jo Zzsi [Fri, 23 Jan 2026 00:32:16 +0000 (19:32 -0500)] 
ci(Alpine): vmlinuz workaround

Re-introduce vmlinuz workaround for the Alpine CI container to
enable UKI testing.

Partial revert of d9497f3 .

3 months agofeat: rename rd.live.overlay to rd.overlay
Nadzeya Hutsko [Mon, 19 Jan 2026 20:24:07 +0000 (21:24 +0100)] 
feat: rename rd.live.overlay to rd.overlay

The overlay functionality can be used with both dmsquash-live and
overlayfs modules, and is not limited to live images. This change
improves naming of command line options with better namespace scoping.

Renames:
- rd.live.overlay -> rd.overlay
- rd.live.overlay.reset -> rd.overlay.reset

Backward compatibility is maintained through deprecation flags.

3 months agofix(test/DMSQUASH): zero overlay partition on reset
Nadzeya Hutsko [Thu, 22 Jan 2026 11:54:13 +0000 (12:54 +0100)] 
fix(test/DMSQUASH): zero overlay partition on reset

The reset_overlay_partition function was not fully clearing
the overlay partition. Delete the partition from the
partition table and zero out the disk region to ensure a
clean state between test runs.

3 months agorefactor(test/DMSQUASH): extract autooverlay helpers for reuse
Nadzeya Hutsko [Thu, 22 Jan 2026 11:50:50 +0000 (12:50 +0100)] 
refactor(test/DMSQUASH): extract autooverlay helpers for reuse

Extract check_autooverlay_marker() and reset_overlay_partition() helper
functions to avoid code duplication when testing multiple autooverlay
scenarios.

3 months agodocs(systemd-pcrphase): mention the new binary name
Benjamin Drung [Thu, 22 Jan 2026 13:04:14 +0000 (14:04 +0100)] 
docs(systemd-pcrphase): mention the new binary name

Clarify the comment which of the two names is the new one.

3 months agofix(dmsquash-live-autooverlay): re-read partition table after creation
Nadzeya Hutsko [Thu, 22 Jan 2026 12:03:28 +0000 (13:03 +0100)] 
fix(dmsquash-live-autooverlay): re-read partition table after creation

After parted creates the overlay partition, the kernel's in-memory
partition table is not automatically updated. This causes mkfs to fail
with "The file /dev/sdX does not exist" on some systems.

Add blockdev --rereadpt to force the kernel to re-read the partition
table before attempting to create the filesystem.

3 months agofix(systemd-pcrphase): do not print an error if an optional binary is not found
Antonio Alvarez Feijoo [Thu, 22 Jan 2026 10:04:31 +0000 (11:04 +0100)] 
fix(systemd-pcrphase): do not print an error if an optional binary is not found

Fixes #2094

3 months agofeat(lvm): match host lvm recovery installation
Jo Zzsi [Sun, 18 Jan 2026 14:51:44 +0000 (09:51 -0500)] 
feat(lvm): match host lvm recovery installation

These LVM tools are just symlinks to binaries that are already installed
inside the initramfs. Dracut might as well install these symlinks to
avoid people looking for them during a potentially stressful recovery time.

3 months agoci: create common multi-arch container tag
Benjamin Drung [Tue, 20 Jan 2026 11:41:28 +0000 (12:41 +0100)] 
ci: create common multi-arch container tag

The same container tag can be used for images with different
architectures. That is the case for most common images (like
`ubuntu:devel`).

3 months agofix(Makefile): broken symlink in dracut config examples
Hongxu Jia [Thu, 22 May 2025 10:07:27 +0000 (18:07 +0800)] 
fix(Makefile): broken symlink in dracut config examples

Due to commit [1], it installs dracut config examples under /usr.
But while enable_test=no, the symlink of test in dracut config is broken
```
root@qemux86-64:~# ls /usr/lib/dracut/dracut.conf.d/test*  -ahl
lrwxrwxrwx 1 root root 27 Apr  5  2011 /usr/lib/dracut/dracut.conf.d/test -> ../test/dracut.conf.d/test/
lrwxrwxrwx 1 root root 36 Apr  5  2011 /usr/lib/dracut/dracut.conf.d/test-makeroot -> ../test/dracut.conf.d/test-makeroot/
lrwxrwxrwx 1 root root 31 Apr  5  2011 /usr/lib/dracut/dracut.conf.d/test-root -> ../test/dracut.conf.d/test-root
root@qemux86-64:~# realpath /usr/lib/dracut/dracut.conf.d/test*
realpath: /usr/lib/dracut/dracut.conf.d/test: No such file or directory
realpath: /usr/lib/dracut/dracut.conf.d/test-makeroot: No such file or directory
realpath: /usr/lib/dracut/dracut.conf.d/test-root: No such file or directory
```

This commit cleans up test symlink if enable_test=no

[1] https://github.com/dracut-ng/dracut-ng/commit/0d369e3e30935dffe48dfff1e90463868e7f804a

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
3 months agofeat(livenet): support root=http:* as alias for root=live:http:*
Benjamin Drung [Tue, 20 Jan 2026 13:45:17 +0000 (14:45 +0100)] 
feat(livenet): support root=http:* as alias for root=live:http:*

For compatibility with `cloud-initramfs-rooturl` support `root=http:*`
as alias for `root=live:http:*` and `root=https:*` as alias for
`root=live:https:*`.

3 months agofeat: move DRACUT_VERSION from dracut-version.sh into dracut.sh
Benjamin Drung [Tue, 6 Jan 2026 14:39:49 +0000 (15:39 +0100)] 
feat: move DRACUT_VERSION from dracut-version.sh into dracut.sh

`dracut-version.sh` is only sourced by `dracut.sh`. So move defining
`DRACUT_VERSION` into `dracut.sh` and remove `dracut-version.sh`. This
allows removing code for sourcing this file.

3 months agoci(busybox): disable DMSQUASH
Jo Zzsi [Wed, 21 Jan 2026 01:29:31 +0000 (20:29 -0500)] 
ci(busybox): disable DMSQUASH

Disable running DMSQUASH test without coreutils until a proper fix is
available.

Follow-up to 362ea81 .

3 months agoci: sort container job configs by tag name
Benjamin Drung [Tue, 20 Jan 2026 13:35:20 +0000 (14:35 +0100)] 
ci: sort container job configs by tag name

Sort container job configs by tag name because the tag name is used as
job name.

3 months agofeat: add yamllint config
Benjamin Drung [Tue, 20 Jan 2026 13:29:22 +0000 (14:29 +0100)] 
feat: add yamllint config

Add a yamllint config allowing a line length of 120 characters for the
beginning. The next steps would wrap the too long lines and add a linter
job running `yamllint .`.

3 months agoci: use container tag name as job name
Benjamin Drung [Tue, 20 Jan 2026 13:22:26 +0000 (14:22 +0100)] 
ci: use container tag name as job name

Use the full container tag name as job name (e. g. `ubuntu:devel-amd`).
This is shorter and easy to read.

3 months agoci: remove duplicate ubuntu image jobs from container-extra
Benjamin Drung [Tue, 20 Jan 2026 13:13:04 +0000 (14:13 +0100)] 
ci: remove duplicate ubuntu image jobs from container-extra

The `ubuntu:devel` and `ubuntu:rolling` container images are already
built by the container job. There is no need to build them on the
container-extra job as well.

3 months agotest: add test case for booting root=live:<URL>
Benjamin Drung [Mon, 19 Jan 2026 18:36:42 +0000 (19:36 +0100)] 
test: add test case for booting root=live:<URL>

Add a test case for booting `root=live:<URL>` before adding new features
to the `livenet` Dracut module. Numbering the test is tricky, because it
uses live boot (range 30-39) and basic networking (range 60-69).

3 months agoci: only publish to GitHub Pages for dracut-ng repo
Benjamin Drung [Tue, 20 Jan 2026 11:31:09 +0000 (12:31 +0100)] 
ci: only publish to GitHub Pages for dracut-ng repo

Forking dracut-ng will also fork the CI configs and pushes to the forked
main branch will trigger the publish job which will fail (unless pages
are explicitly enabled).

So only publish to GitHub Pages when triggered from the dracut-ng
repository.

3 months agoci: also push tags when container jobs were triggered manually
Benjamin Drung [Tue, 20 Jan 2026 11:01:22 +0000 (12:01 +0100)] 
ci: also push tags when container jobs were triggered manually

The CI jobs for building the containers might be triggered manually. The
event name is `workflow_dispatch` then and the tag update would not be
pushed. That defeats the purpose of running those jobs manually.

3 months agoci: name container jobs after CI name
Benjamin Drung [Tue, 20 Jan 2026 10:25:26 +0000 (11:25 +0100)] 
ci: name container jobs after CI name

Name the container jobs after their CI name instead of `amd64` since
they also build `arm64` images.

3 months agochore(gitignore): ignore html files in test directory
Benjamin Drung [Mon, 19 Jan 2026 18:47:15 +0000 (19:47 +0100)] 
chore(gitignore): ignore html files in test directory

I sometimes convert the test log file to HTML using `ansi2html` to make
the logs nicer to read. Ignore those HTML files in `.gitignore` as well.

3 months agochore(gitignore): sort .gitignore file
Benjamin Drung [Mon, 19 Jan 2026 18:46:54 +0000 (19:46 +0100)] 
chore(gitignore): sort .gitignore file

```
LANG=C sort .gitignore | sponge .gitignore
```

3 months agoci: explicitly install python3 in containers
Benjamin Drung [Mon, 19 Jan 2026 17:13:23 +0000 (18:13 +0100)] 
ci: explicitly install python3 in containers

Explicitly install python3 in the containers to allow testing the
`livenet` module using Python 3 `http.server` as HTTP server. Many of
the containers already have Python installed as dependency.

3 months agochore(gitignore): ignore .testdir and test logs
Benjamin Drung [Mon, 19 Jan 2026 12:14:28 +0000 (13:14 +0100)] 
chore(gitignore): ignore .testdir and test logs

`test/test-functions` creates a `.testdir` file with `-$TEST_RUN_ID` as
suffix. It also create log files named `server.log` and
`test${TEST_RUN_ID:+-$TEST_RUN_ID}.log`.

Make the `.gitignore` pattern match those files.

3 months agotest(DMSQUASH): fix autooverlay test checks the entire root.img
Nadzeya Hutsko [Mon, 19 Jan 2026 09:57:29 +0000 (10:57 +0100)] 
test(DMSQUASH): fix autooverlay test checks the entire root.img

The test searched for the marker string in the entire root.img, but
the string also existed literally in test-init.sh embedded in the
first partition, causing a false positive. Fix by extracting and
searching only the second (overlay) partition.

Fixes: #2054
3 months agotest(DMSQUASH): fix do_live_overlay not being called
Nadzeya Hutsko [Mon, 19 Jan 2026 09:59:53 +0000 (10:59 +0100)] 
test(DMSQUASH): fix do_live_overlay not being called

The test disk image contained raw rootfs instead of the live
structure (LiveOS/rootfs.img), so FSIMG was empty and do_live_overlay()
was never called. Fix by using the live structure on disk.

3 months agotest(DMSQUASH): add sync after writing the marker
Nadzeya Hutsko [Mon, 19 Jan 2026 09:59:44 +0000 (10:59 +0100)] 
test(DMSQUASH): add sync after writing the marker

The change is done to ensure it is flushed to the persist
partition before shutdown.

3 months agochore: update obsolete comments and documentation
Jo Zzsi [Sat, 17 Jan 2026 10:35:50 +0000 (05:35 -0500)] 
chore: update obsolete comments and documentation

Change the comment and make it more generic.

3 months agoci: rename network-systemd job to match the derauct module name
Jo Zzsi [Sun, 18 Jan 2026 21:57:05 +0000 (16:57 -0500)] 
ci: rename network-systemd job to match the derauct module name

network-systemd is testing the systemd-networkd dracut module.
Let us use the dracut module name as the name of the job.

3 months agochore(dracut): call the public determine_kernel_image function
Jo Zzsi [Fri, 16 Jan 2026 13:02:21 +0000 (08:02 -0500)] 
chore(dracut): call the public determine_kernel_image function

Instead of repeating and reimplementing the function to find
kernel image, call the public function.

Follow-up to df93355 .

3 months agofeat(dracut): expose determine_kernel_image as a public function
Jo Zzsi [Thu, 15 Jan 2026 22:52:35 +0000 (17:52 -0500)] 
feat(dracut): expose determine_kernel_image as a public function

Expose determine_kernel_image as a public and documented helper
function.

3 months agotest(DRACUT-CPIO): correct test_check condition
Jo Zzsi [Fri, 16 Jan 2026 12:15:03 +0000 (07:15 -0500)] 
test(DRACUT-CPIO): correct test_check condition

Partial revert to correct test_check condition.

The current code checks if dracut-cpio is found in PATH and skips
the test in case dracut-cpio is found.

Follow-up to b687756 .

3 months agotest: use assertion.sh hook for test-root
Benjamin Drung [Fri, 16 Jan 2026 17:12:11 +0000 (18:12 +0100)] 
test: use assertion.sh hook for test-root

The test-root `test-init.sh` script can run test case specific test
assertion if `/assertion.sh` is present.

Use this infrastructure for `TEST-30-DMSQUASH`. This fixes the issue
(found by Nadzeya) that `test-init.sh` tried to read `/proc/cmdline` but
`/proc` was not mounted and the directory did not exist. `test-init.sh`
takes care of mounting `/proc`.

3 months agofix(systemd-networkd): ensure zzzz-dracut-default.network cleanup
Jo Zzsi [Thu, 8 Jan 2026 16:01:47 +0000 (11:01 -0500)] 
fix(systemd-networkd): ensure zzzz-dracut-default.network cleanup

zzzz-dracut-default.network should be only installed when
systemd-network-generator does not generate any files in
files in /run/systemd/network .

Place dracut-default.network in /usr/lib/dracut/
and do not change /usr as part of managing .network
files in initramfs.

Follow-up to 523c9b0 .