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.
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.
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.
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.
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.
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.
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.
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.
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")
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).
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.
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.
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.
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.
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.
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.
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
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:*`.
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.
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 .`.
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.
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).
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.
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.
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.
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`.
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.
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.
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`.
Jo Zzsi [Tue, 13 Jan 2026 17:48:54 +0000 (12:48 -0500)]
feat(dracut): add busybox support for 3cpio and enhanced_cpio
3cpio and enhanced_cpio is already supported with coreutils.
This PR adds support for 3cpio and enhanced_cpio for busybox as well.
busybox stat does not support `file-system` syntax, instead
it supports `-f` syntax only.
Li Tian [Wed, 14 Jan 2026 05:24:36 +0000 (13:24 +0800)]
fix(dracut): remove trailing null characters from SBATs when building UKIs
SBAT of kernel has null character paddings at the end. Using tools
like ukify will display massive amount of '\0' in SBAT. Ukify is
doing ".rstrip('b\x00')" when merging SBATs.
Benjamin Drung [Tue, 13 Jan 2026 14:36:22 +0000 (15:36 +0100)]
test(KERNEL-INSTALL): check kernel-install result
The kernel-install call should create an `initrd` file that the test
will use later in `test_run`. Check that this file has been created to
ease debugging in case of a failure.
Jo Zzsi [Sat, 6 Sep 2025 18:49:40 +0000 (14:49 -0400)]
fix(i18n): remove Gentoo workaround that is no longer needed
Gentoo no longer sets KEYMAP to something like "-u pl2", instead
it is set to "pl12".
This piece of code is part of the very original commit of the i18n
dracut module from 2010 - 87122af
There is no mention of '-u' in the oldest version of the wiki from 2013
https://wiki.gentoo.org/index.php?title=Keyboard_layout_switching&diff=1320347&oldid=16937
Remove this workaround that is no longer used or tested to
make it easier to reason about the code.
Benjamin Drung [Mon, 12 Jan 2026 12:16:25 +0000 (13:16 +0100)]
test: run QEMU with a timeout unless daemonized
Dracut tests might hang. The Dracut CI sets a timeout to kill those
hanging tests, but downstream might not configure something similar.
Run QEMU with a timeout (unless daemonized) to avoid hanging tests
forever.
The slowest tests executions that I have seen on Debian/Ubuntu:
* 33:44 for test 11 (5 client tests) on Ubuntu resolute on armhf
* 101:58 for test 60 (19 client tests) on Debian unstable on ppc64el
* 19:58 for test 70 (3 client tests) on Ubuntu resolute on arm64
* 22:35 for test 71 (4 client tests) on Ubuntu resolute on arm64
* 52:48 for test 72 (8 client tests) Debian unstable on ppc64el
These slow tests take between 5:22 and 6:45 for each client tests on
average (ignoring the setup cost). So set the timeout to 10 minutes as
default.
Jo Zzsi [Sat, 10 Jan 2026 13:53:01 +0000 (08:53 -0500)]
ci: combine omitsystemd x64 and arm64 into one GitHub action
Running tests on arm64 is just as stable as x64, there is
no need to separate them. Combine them into one GitHub
action should make it easier to reason about regressions.
Jo Zzsi [Sat, 10 Jan 2026 13:30:41 +0000 (08:30 -0500)]
ci: combine systemd x64 and arm64 into one GitHub action
Running tests on arm64 is just as stable as x64, there is
no need to separate them. Combine them into one GitHub
action should make it easier to reason about regressions.