]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
92 min agoci: disable running failing tests for daily network GA main
Jo Zzsi [Thu, 9 Apr 2026 12:36:19 +0000 (08:36 -0400)] 
ci: disable running failing tests for daily network GA

ubuntu:devel and ubuntu:rolling needs over an hour to run
test 72 and it times out. Other Linux distributions finish the test
in less than 30 min.

32 hours agofix(dracut): inst_libdir_file() does not have a -o option
Antonio Alvarez Feijoo [Wed, 8 Apr 2026 14:01:01 +0000 (16:01 +0200)] 
fix(dracut): inst_libdir_file() does not have a -o option

Follow-up for 5a4c3469338410b6aea9452994b4b0af1ba59be7

32 hours agofix(man): inst_libdir_file() does not have a -o option
Antonio Alvarez Feijoo [Wed, 8 Apr 2026 13:25:03 +0000 (15:25 +0200)] 
fix(man): inst_libdir_file() does not have a -o option

Fixes a04c26583f82f5b8bc272bb4938b3aafb90a7fbc

32 hours agorefactor: remove unneeded extra slash passed in some args to inst_libdir_file()
Antonio Alvarez Feijoo [Wed, 8 Apr 2026 11:37:38 +0000 (13:37 +0200)] 
refactor: remove unneeded extra slash passed in some args to inst_libdir_file()

35 hours agofix(squash-lib): inst_libdir_file() does not have a -o option
Antonio Alvarez Feijoo [Wed, 8 Apr 2026 09:10:32 +0000 (11:10 +0200)] 
fix(squash-lib): inst_libdir_file() does not have a -o option

So it tries to find a file named "-o". Spotted while debugging:

```
/usr/lib/dracut/modules.d/88squash-lib/module-setup.sh@56(squash_install): inst_libdir_file -o 'libgcc_s.so*'
/usr/lib/dracut/dracut-functions.sh@1434(inst_libdir_file): _files=()
/usr/lib/dracut/dracut-functions.sh@1434(inst_libdir_file): local -a _files
/usr/lib/dracut/dracut-functions.sh@1435(inst_libdir_file): local _path
/usr/lib/dracut/dracut-functions.sh@1440(inst_libdir_file): declare -p _libdir_file_cache
/usr/lib/dracut/dracut-functions.sh@1440(inst_libdir_file): grep -q 'declare -A'
/usr/lib/dracut/dracut-functions.sh@1447(inst_libdir_file): [[ -o == \-n ]]
/usr/lib/dracut/dracut-functions.sh@1463(inst_libdir_file): for _dir in $libdirs
/usr/lib/dracut/dracut-functions.sh@1464(inst_libdir_file): for _i in "$@"
/usr/lib/dracut/dracut-functions.sh@1465(inst_libdir_file): for _f in "${dracutsysrootdir-}$_dir"/$_i
/usr/lib/dracut/dracut-functions.sh@1466(inst_libdir_file): _path=/lib64/-o
/usr/lib/dracut/dracut-functions.sh@1467(inst_libdir_file): [[ -e /lib64/-o ]]
/usr/lib/dracut/dracut-functions.sh@1464(inst_libdir_file): for _i in "$@"
/usr/lib/dracut/dracut-functions.sh@1465(inst_libdir_file): for _f in "${dracutsysrootdir-}$_dir"/$_i
/usr/lib/dracut/dracut-functions.sh@1466(inst_libdir_file): _path=/lib64/libgcc_s.so.1
/usr/lib/dracut/dracut-functions.sh@1467(inst_libdir_file): [[ -e /lib64/libgcc_s.so.1 ]]
/usr/lib/dracut/dracut-functions.sh@1467(inst_libdir_file): [[ '' != 1 ]]
/usr/lib/dracut/dracut-functions.sh@1468(inst_libdir_file): _files+=("$_path")
/usr/lib/dracut/dracut-functions.sh@1469(inst_libdir_file): _libdir_file_cache[$_path]=1
/usr/lib/dracut/dracut-functions.sh@1463(inst_libdir_file): for _dir in $libdirs
/usr/lib/dracut/dracut-functions.sh@1464(inst_libdir_file): for _i in "$@"
/usr/lib/dracut/dracut-functions.sh@1465(inst_libdir_file): for _f in "${dracutsysrootdir-}$_dir"/$_i
/usr/lib/dracut/dracut-functions.sh@1466(inst_libdir_file): _path=/usr/lib64/-o
/usr/lib/dracut/dracut-functions.sh@1467(inst_libdir_file): [[ -e /usr/lib64/-o ]]
/usr/lib/dracut/dracut-functions.sh@1464(inst_libdir_file): for _i in "$@"
/usr/lib/dracut/dracut-functions.sh@1465(inst_libdir_file): for _f in "${dracutsysrootdir-}$_dir"/$_i
/usr/lib/dracut/dracut-functions.sh@1466(inst_libdir_file): _path=/usr/lib64/libgcc_s.so.1
/usr/lib/dracut/dracut-functions.sh@1467(inst_libdir_file): [[ -e /usr/lib64/libgcc_s.so.1 ]]
/usr/lib/dracut/dracut-functions.sh@1467(inst_libdir_file): [[ '' != 1 ]]
/usr/lib/dracut/dracut-functions.sh@1468(inst_libdir_file): _files+=("$_path")
/usr/lib/dracut/dracut-functions.sh@1469(inst_libdir_file): _libdir_file_cache[$_path]=1
/usr/lib/dracut/dracut-functions.sh@1463(inst_libdir_file): for _dir in $libdirs
/usr/lib/dracut/dracut-functions.sh@1464(inst_libdir_file): for _i in "$@"
/usr/lib/dracut/dracut-functions.sh@1465(inst_libdir_file): for _f in "${dracutsysrootdir-}$_dir"/$_i
/usr/lib/dracut/dracut-functions.sh@1466(inst_libdir_file): _path=/lib/-o
/usr/lib/dracut/dracut-functions.sh@1467(inst_libdir_file): [[ -e /lib/-o ]]
/usr/lib/dracut/dracut-functions.sh@1464(inst_libdir_file): for _i in "$@"
/usr/lib/dracut/dracut-functions.sh@1465(inst_libdir_file): for _f in "${dracutsysrootdir-}$_dir"/$_i
/usr/lib/dracut/dracut-functions.sh@1466(inst_libdir_file): _path='/lib/libgcc_s.so*'
/usr/lib/dracut/dracut-functions.sh@1467(inst_libdir_file): [[ -e /lib/libgcc_s.so* ]]
/usr/lib/dracut/dracut-functions.sh@1463(inst_libdir_file): for _dir in $libdirs
/usr/lib/dracut/dracut-functions.sh@1464(inst_libdir_file): for _i in "$@"
/usr/lib/dracut/dracut-functions.sh@1465(inst_libdir_file): for _f in "${dracutsysrootdir-}$_dir"/$_i
/usr/lib/dracut/dracut-functions.sh@1466(inst_libdir_file): _path=/usr/lib/-o
/usr/lib/dracut/dracut-functions.sh@1467(inst_libdir_file): [[ -e /usr/lib/-o ]]
```

Follow-up for 5ab18dee996f0eeb2b0bfe354570e1b1af46d025

35 hours agofix(dracut): determine hostonly_cmdline after hostonly setting
Benjamin Drung [Tue, 7 Apr 2026 09:55:18 +0000 (11:55 +0200)] 
fix(dracut): determine hostonly_cmdline after hostonly setting

Commit 04af3c097797 enabled `hostonly_cmdline` in host-only mode again,
but determining that was done too early. In case `/dev` is not mounted,
the host-only mode is turned off. At that point `hostonly_cmdline` has
already be enabled.

So determine the default for `hostonly_cmdline` after the final check
for `hostonly`.

Bug-Debian: https://bugs.debian.org/1132794
Fixes: 04af3c097797 ("fix(dracut): enable hostonly_cmdline in hostonly mode again")
2 days agofix(SYSTEMD-IMPORT): remount /sysroot with dev and suid flags
Benjamin Drung [Wed, 25 Mar 2026 18:44:54 +0000 (19:44 +0100)] 
fix(SYSTEMD-IMPORT): remount /sysroot with dev and suid flags

When using `systemd-import` combined with a tarball, the resulting root
filesystem retains the `nosuid` mount flag. This breaks any `setuid`
binaries in the booted OS, causing critical utilities like sudo to fail
with:

```
sudo: sudo must be owned by uid 0 and have the setuid bit set
```

Apply a workaround to remount `/sysroot` with the `dev` and `suid`
flags. This workaround can be dropped when systemd is fixed or made
conditional to only the affected systemd versions.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2318
Bug-Ubuntu: https://launchpad.net/bugs/2146342
Woraround for: https://github.com/systemd/systemd/issues/41352

4 days agoci: add daily zfs test
Jo Zzsi [Sun, 5 Apr 2026 01:58:32 +0000 (21:58 -0400)] 
ci: add daily zfs test

Use the void CI container to run tests with the zfs dracut
module.

4 days agoci(void): fix zfs kernel module installation
Jo Zzsi [Sun, 5 Apr 2026 00:05:35 +0000 (20:05 -0400)] 
ci(void): fix zfs kernel module installation

To use DKMS on Void Linux, you must install the linux-headers
package corresponding to your active kernel.

6 days agoci: increase test timeout
Jo Zzsi [Wed, 1 Apr 2026 21:58:33 +0000 (17:58 -0400)] 
ci: increase test timeout

Test 26 on ubuntu:devel on ARM needs more than 30 minutes.

Set the GitHub Action timeout to 60 min to allow the test to run to
its conclusion.

Follow-up to f378df5 .

7 days agodocs: fix typo on doc_site
Elias [Thu, 2 Apr 2026 11:28:30 +0000 (11:28 +0000)] 
docs: fix typo on doc_site

8 days agoperf: export DRACUT_ARCH globally
Antonio Alvarez Feijoo [Wed, 1 Apr 2026 14:41:39 +0000 (16:41 +0200)] 
perf: export DRACUT_ARCH globally

Usually `DRACUT_ARCH` is not set, so we are calling `uname -m` multiple times to
get always the same value. Hence, get its external value at the beginning and
export it globally, in the same way we do with other global variables.

8 days agoci(void): prefer btrfs storage module
Jo Zzsi [Wed, 1 Apr 2026 12:30:41 +0000 (08:30 -0400)] 
ci(void): prefer btrfs storage module

Disabling zfs lead to test 20 failing. Switch to btrfs
(from the default ext4), to enable the test to pass.

Follow-up to 4d7a60d.

8 days agochore(deps): bump actions/deploy-pages from 4 to 5
dependabot[bot] [Tue, 31 Mar 2026 20:53:37 +0000 (20:53 +0000)] 
chore(deps): bump actions/deploy-pages from 4 to 5

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

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

Signed-off-by: dependabot[bot] <support@github.com>
8 days agochore(deps): bump actions/configure-pages from 5 to 6
dependabot[bot] [Tue, 31 Mar 2026 20:53:28 +0000 (20:53 +0000)] 
chore(deps): bump actions/configure-pages from 5 to 6

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

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

Signed-off-by: dependabot[bot] <support@github.com>
9 days agoci: increase QEMU timeout
Jo Zzsi [Tue, 31 Mar 2026 11:55:46 +0000 (07:55 -0400)] 
ci: increase QEMU timeout

Test 26 on ubuntu:devel on ARM needs more than 20 minutes.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2315
10 days agoci: do not force Void CI continer to test zfs
Jo Zzsi [Mon, 30 Mar 2026 18:24:54 +0000 (14:24 -0400)] 
ci: do not force Void CI continer to test zfs

Running some tests with zfs enabled fails on Void.
Disable testing with zfs until the issue is resolved.

10 days agoci: increase timeout for tests
Jo Zzsi [Mon, 30 Mar 2026 16:06:16 +0000 (12:06 -0400)] 
ci: increase timeout for tests

Tests seems to need more time to pass.

Give 30 min timeout for non-networking tests and
40 min for networked tests.

10 days agoci: switch from ubuntu:devel to a more stable debian:latest
Jo Zzsi [Mon, 30 Mar 2026 12:50:33 +0000 (08:50 -0400)] 
ci: switch from ubuntu:devel to a more stable debian:latest

Switch some of the daily runners over to a mores table container
to avoid running into non-dracut related issues and regressions.

10 days agoci: temporary remove Fedora Rawhide CI
Jo Zzsi [Mon, 30 Mar 2026 13:52:05 +0000 (09:52 -0400)] 
ci: temporary remove Fedora Rawhide CI

There is an acknoledged unresolved regression on the Fedora Rawhide CI
container with no workaround.

Since this container generation fails, attempting to run this
CI does not actually increases the code coverage for the dracut project
and removing this container does not actually decreases the code
coverage for dracut.

11 days agoci(debian): install ipxe-qemu
Benjamin Drung [Sat, 28 Mar 2026 18:00:52 +0000 (19:00 +0100)] 
ci(debian): install ipxe-qemu

Test 50 fails on ubuntu:rolling on arm with:

```
qemu-system-aarch64: -device virtio-net-pci,netdev=lan0: failed to find romfile "efi-virtio.rom"
```

So install ipxe-qemu explicitly.

12 days agofix(crypt): use systemd generator for setting the timeout
Benjamin Drung [Thu, 19 Mar 2026 21:55:16 +0000 (22:55 +0100)] 
fix(crypt): use systemd generator for setting the timeout

Test 72 "NBD root=LABEL=dracut netroot=nbd:IP:port" can fail on slow
architectures.

```
603s [   36.841605] dracut-cmdline[178]: + set_systemd_timeout_for_dev /dev/nbd0
[...]
603s [   37.015613] dracut-cmdline[178]: + mkdir -p /etc/systemd/system/dev-nbd0.device.d
603s [   37.020616] dracut-cmdline[178]: + echo [Unit]
603s [   37.025872] dracut-cmdline[178]: + echo JobTimeoutSec=infinity
603s [   37.031417] dracut-cmdline[178]: + echo JobRunningTimeoutSec=infinity
603s [   37.036838] dracut-cmdline[178]: + type mark_hostonly
603s [   37.043508] dracut-cmdline[178]: + _needreload=1
603s [   37.047966] dracut-cmdline[178]: + [ -z  ]
603s [   37.055568] dracut-cmdline[178]: + [ 1 = 1 ]
603s [   37.060790] dracut-cmdline[178]: + [ -z  ]
603s [   37.065785] dracut-cmdline[178]: + /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
[...]
[ TIME ] Timed out waiting for device dev-nbd0.device - /dev/nbd0.
679s [DEPEND] Dependency failed for systemd-cryp...0e2d54-ab3c-44b1-b289-7e1921480385.
679s [DEPEND] Dependency failed for cryptsetup.target - Local Encrypted Volumes.
679s [  113.311607] systemd[1]: dev-nbd0.device: Job dev-nbd0.device/start timed out.
679s [  113.332671] systemd[1]: Timed out waiting for device dev-nbd0.device - /dev/nbd0.
[...]
751s          Starting dracut-initqueue.service - dracut initqueue hook...
[...]
822s [  255.665608] dracut-initqueue[495]: + /usr/bin/systemctl daemon-reload
[...]
835s [  269.333700] systemd[1]: Reload requested from client PID 593 ('systemctl') (unit dracut-initqueue.service)...
835s [  269.378921] systemd[1]: Reloading...
894s [  328.119996] systemd[1]: Reloading finished in 67715 ms.
```

`parse-crypt.sh` calls `set_systemd_timeout_for_dev /dev/nbd0` which
correctly creates the `timeout.conf` config. But for this configuration
to take action, the systemd daemon needs to be reloaded. This call is
added to the initqueue. Because the system is slow, `dev-nbd0.device`
times out before the systemd daemon is reloaded.

Move the systemd config generating code into a systemd generator. Then
calling `systemctl daemon-reload` is not needed.

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

12 days agoci(debian): use a single RUN to install packages
Benjamin Drung [Sat, 28 Mar 2026 00:38:49 +0000 (01:38 +0100)] 
ci(debian): use a single RUN to install packages

Installing Debian packages in multiple runs will keep layers for each
run which include the package cache. Merge all package installation
commands into one single `RUN` statement to reduce the container size.

12 days agofix(kernel-modules): install mmc drivers on all architectures
Benjamin Drung [Thu, 19 Mar 2026 16:17:09 +0000 (17:17 +0100)] 
fix(kernel-modules): install mmc drivers on all architectures

Some systems with Intel Atom CPUs (like Amston Lake, Alder Lake-N, Twin
Lake) have onboard eMMC as a default storage. These eMMC drivers are
missing in the initrd.

On Ubuntu 26.04 "resolute" with linux 7.0.0-7.7 on amd64 the generic
images increases by 0.5 MB (increase from 30.8 MB to 31.3 MB):

```
$ dracut --force -H
$ 3cpio -t /boot/initrd.img > before
$ 3cpio -e /boot/initrd.img
Start     End       Size      Compr.   Extracted
0 B       92.0 kB   92.0 kB   cpio     91.1 kB
92.0 kB   30.8 MB   30.7 MB   zstd     58.4 MB
$ # apply patch
$ dracut --force -H
$ 3cpio -t /boot/initrd.img > after
$ 3cpio -e /boot/initrd.img
Start     End       Size      Compr.   Extracted
0 B       92.0 kB   92.0 kB   cpio     91.1 kB
92.0 kB   31.3 MB   31.2 MB   zstd     59.0 MB
$ diff -u before after | grep '^[-+]usr'
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/misc/cardreader
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/misc/cardreader/alcor_pci.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/misc/cardreader/rtsx_pci.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/misc/cardreader/rtsx_usb.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/misc/cb710
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/misc/cb710/cb710.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/misc/tifm_core.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/core
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/core/mmc_block.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/core/sdio_uart.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/alcor.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/cb710-mmc.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/cqhci.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/mmc_hsq.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/mmc_spi.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/mtk-sd.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/of_mmc_spi.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/rtsx_pci_sdmmc.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/rtsx_usb_sdmmc.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/sdhci-acpi.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/sdhci-pci.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/sdhci-pltfm.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/sdhci-uhs2.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/sdhci-xenon-driver.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/sdhci.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/sdhci_f_sdh30.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/sdricoh_cs.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/tifm_sd.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/toshsd.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/usdhi6rol0.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/ushc.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/via-sdmmc.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/vub300.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/drivers/mmc/host/wbsd.ko.zst
+usr/lib/modules/7.0.0-7-generic/kernel/lib/crc/crc7.ko.zst
```

Bug-Ubuntu: https://launchpad.net/bugs/2143030

12 days agotest(FULL-SYSTEMD): increase device timeout to infinity
Benjamin Drung [Fri, 27 Mar 2026 21:08:44 +0000 (22:08 +0100)] 
test(FULL-SYSTEMD): increase device timeout to infinity

Test 41 fails to boot on arm64 on Debian in the autopkgtest because the
service waiting for `/dev/disk/by-label/dracutusr` times out after 90
seconds. This is just caused by the arm64 runner being slow.

So increase the device timeout to infinity to make the test succeed on
slow systems.

See also: d62de66d35d ("test(SYSTEMD-INITRD): increase device timeout to infinity")

12 days agoci(debian): drop installing libarchive13t64 explicitly
Benjamin Drung [Fri, 27 Mar 2026 22:48:48 +0000 (23:48 +0100)] 
ci(debian): drop installing libarchive13t64 explicitly

systemd-container 259.1-1 added the missing dependency on
`libarchive13t64`. So installing `libarchive13t64` explicitly is not
needed any more.

13 days agofix(dracut): properly detect kernel version with --sysroot
Antonio Alvarez Feijoo [Wed, 25 Mar 2026 15:58:54 +0000 (16:58 +0100)] 
fix(dracut): properly detect kernel version with --sysroot

Both `uname -r` and `cd /lib/modules` do not give the proper kernel version of
the sysroot directory.

E.g. of the wrong behavior:

```
$ dracut -f --sysroot /srv/tw --no-kernel test.img
realpath: /srv/tw/lib/modules/6.19.6-1-default: No such file or directory
$ uname -r
6.19.6-1-default
$ ls -l /srv/tw/usr/lib/modules
total 0
drwxr-xr-x. 1 root root 630 Mar 25 16:30 6.19.8-1-default
```

Follow-up for 2b2debd7947b7d5a357c1a89691a75dfd3565747

13 days agofix(dracut): enable hostonly_cmdline in hostonly mode again
Benjamin Drung [Fri, 27 Mar 2026 19:53:54 +0000 (20:53 +0100)] 
fix(dracut): enable hostonly_cmdline in hostonly mode again

A fresh Ubuntu 26.04 installation with a RAID 1 fails to boot due to not
assembling the RAID, because it neither sets `rd.auto` nor includes the
cmdline (with `rd.md.uuid` set).

The documentation for `hostonly_cmdline` says:

> If **hostonly="yes"** and this option is not configured, it's
> automatically set to "yes".

When `hostonly=yes` was made the default, `hostonly_cmdline` was not set
to `yes` any more in the default case.

Bug-Ubuntu: https://launchpad.net/bugs/2144948
Fixes: 24fb4c28538b ("feat(dracut): make hostonly the default")
13 days agoci(debian): replace qemu-kvm by arch specific qemu-system-*
Benjamin Drung [Thu, 26 Mar 2026 12:47:38 +0000 (13:47 +0100)] 
ci(debian): replace qemu-kvm by arch specific qemu-system-*

qemu 1:9.2.0+ds-5 provides `qemu-system-native`. `qemu-kvm` is not
available on armhf any more.

Install the correct `qemu-system-*` for the architecture.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2313
13 days agotest(run-qemu): double QEMU timeout to 20 min on ARM
Benjamin Drung [Thu, 26 Mar 2026 17:38:43 +0000 (18:38 +0100)] 
test(run-qemu): double QEMU timeout to 20 min on ARM

Test 72 might fail on ubuntu:devel and ubuntu:rolling on arm, because
`qemu-system-aarch64` runs into the 10 minute timeout.

So double the QEMU timeout to 20 min on ARM.

2 weeks agofix(base): move initrd.target.wants symlink creation to wait_for_dev
Benjamin Drung [Fri, 20 Mar 2026 14:54:36 +0000 (15:54 +0100)] 
fix(base): move initrd.target.wants symlink creation to wait_for_dev

Commit 4d9d767da2e5 ("crypt/parse-crypt.sh: hide encrypted devices from
systemd timeout warnings.") split parts of `wait_for_dev` into
`set_systemd_timeout_for_dev` to allow setting the systemd timeout
separately. `parse-crypt.sh` is the only direct caller of
`set_systemd_timeout_for_dev`.

Fixes: 4d9d767da2e5 ("crypt/parse-crypt.sh: hide encrypted devices from systemd timeout warnings.")
2 weeks agofix(zipl): repair parsing of rd.zipl=LABEL|UUID|...=
Fabian Vogt [Tue, 24 Mar 2026 15:23:22 +0000 (16:23 +0100)] 
fix(zipl): repair parsing of rd.zipl=LABEL|UUID|...=

label_uuid_to_dev needs the LABEL=|UUID=|... prefix as well to determine
the full path.

Without this fix it hangs waiting for just the UUID/LABEL/... without
the /dev path, breaking boot, e.g.:

Warning: 200c78bc-7099-3c44-f3b5-6adf477ffd15 does not exist

3 weeks agotest(SYSTEMD-INITRD): increase device timeout to infinity
Benjamin Drung [Tue, 17 Mar 2026 11:18:54 +0000 (12:18 +0100)] 
test(SYSTEMD-INITRD): increase device timeout to infinity

Test 42 fails to boot on very slow systems like an emulated nested VM
with riscv64. `dev-disk-by\x2dlabel-dracut.device` runs into the 90
seconds timeout:

```
[ TIME ] Timed out waiting for device dev-d…device - /dev/disk/by-label/dracut.
[DEPEND] Dependency failed for sysroot.mount - /sysroot.
[  343.011821] systemd[1]: dev-disk-by\x2dlabel-dracut.device: Job dev-disk-by\x2dlabel-dracut.device/start timed out.
[DEPEND] Dependency failed for initrd-root-fs.target - Initrd Root File System.
[DEPEND] Dependency failed for initrd-parse…points Configured in the Real Root.
[  345.255798] systemd[1]: Timed out waiting for device dev-disk-by\x2dlabel-dracut.device - /dev/disk/by-label/dracut.
[  346.279436] systemd[1]: Dependency failed for sysroot.mount - /sysroot.
[  349.048942] systemd[1]: Dependency failed for initrd-root-fs.target - Initrd Root File System.
[DEPEND] Dependency failed for initrd-root-device.target - Initrd Root Device.
[  350.551967] systemd[1]: Dependency failed for initrd-parse-etc.service - Mountpoints Configured in the Real Root.
[  352.855207] systemd[1]: initrd-parse-etc.service: Job initrd-parse-etc.service/start failed with result 'dependency'.
[  354.805576] systemd[1]: initrd-parse-etc.service: Triggering OnFailure= dependencies.
[  356.883912] systemd[1]: initrd-parse-etc.service: Failed to enqueue OnFailure=emergency.target job, ignoring: Unit emergency.service not found.
[  359.654920] systemd[1]: initrd-root-fs.target: Job initrd-root-fs.target/start failed with result 'dependency'.
[  363.225631] systemd[1]: initrd-root-fs.target: Triggering OnFailure= dependencies.
[  365.516207] systemd[1]: initrd-root-fs.target: Failed to enqueue OnFailure=emergency.target job, ignoring: Unit emergency.service not found.
[  367.211266] systemd[1]: sysroot.mount: Job sysroot.mount/start failed with result 'dependency'.
[  369.327748] systemd[1]: Dependency failed for initrd-root-device.target - Initrd Root Device.
[  371.703782] systemd[1]: initrd-root-device.target: Job initrd-root-device.target/start failed with result 'dependency'.
```

Full log: https://ci.debian.net/packages/d/dracut/testing/riscv64/69536717/#L19714

So increase the device timeout to infinity to make the test succeed on
slow systems.

3 weeks agofix(systemd-networkd): create /run/systemd/network if missing
Benjamin Drung [Wed, 18 Mar 2026 11:45:43 +0000 (12:45 +0100)] 
fix(systemd-networkd): create /run/systemd/network if missing

During testing this error could be found in the logs:

```
[FAILED] Failed to start systemd-network-generator.service - Generate Network Units from Kernel Command Line.
[...]
[    3.034981] dracut-cmdline[198]: + cp -a /usr/lib/dracut/dracut-default.network /run/systemd/network/zzzz-dracut-default.network
[    3.038326] dracut-cmdline[301]: cp: cannot create regular file '/run/systemd/network/zzzz-dracut-default.network': No such file or directory
```

`systemd-network-generator` creates `/run/systemd/network` in
`context_save` by calling `mkdir_p(p, 0755)`. In case
`systemd-network-generator.service` fails this directory might not have
been created.

So create `/run/systemd/network` if missing.

3 weeks agotest: use TEST_KERNEL_CMDLINE in test 72 as well
Benjamin Drung [Tue, 17 Mar 2026 16:40:21 +0000 (17:40 +0100)] 
test: use TEST_KERNEL_CMDLINE in test 72 as well

All tests add `TEST_KERNEL_CMDLINE` to their kernel command line
options except for test 72. Setting `DEBUGFAIL` in test 72 has no
effect, because this will only be added to `TEST_KERNEL_CMDLINE`.

So use `TEST_KERNEL_CMDLINE` in test 72 as well.

3 weeks agofix(dracut.sh): use printf instead of echo in mark_hostonly
Benjamin Drung [Mon, 16 Mar 2026 10:22:33 +0000 (11:22 +0100)] 
fix(dracut.sh): use printf instead of echo in mark_hostonly

POSIX requires to interpreted escape sequences. The filenames passed to
`mark_hostonly` might contain backslashes and therefore might be
interpreted (dash 0.5.13.1 will do that).

So use `printf` instead to avoid escaping the filenames.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2280
3 weeks agofeat(overlayfs): support tmpfs size parameter in rd.overlay
Nadzeya Hutsko [Tue, 24 Feb 2026 16:46:48 +0000 (17:46 +0100)] 
feat(overlayfs): support tmpfs size parameter in rd.overlay

When rd.overlay=tmpfs:size=<size> is passed on the kernel command line,
mount a dedicated tmpfs at /run/initramfs/overlay with the specified
options for the OverlayFS upper directory, instead of using the default
/run tmpfs.

Supported options (comma-separated after tmpfs:) are size=, nr_blocks=
and nr_inodes=. If mounting fails, the script falls back gracefully to
the default /run tmpfs overlay.

3 weeks agofix(network-legacy): add input validation to RFC 3442 route parser
Andrey Prokopenko [Mon, 12 Jan 2026 12:47:20 +0000 (13:47 +0100)] 
fix(network-legacy): add input validation to RFC 3442 route parser

The parse_option_121() function that parses DHCP option 121 (classless
static routes) could fail with shell errors when processing malformed
or truncated data:

- "integer expression expected" when comparing non-numeric mask values
- "shift count out of range" when not enough arguments remain

Add validation to:
- Verify mask is a number between 0-32
- Pre-calculate required argument count before consuming
- Validate destination octets are numeric before multicast check
- Add bounds checking before shifts

Tested with Hetzner cloud infrastructure which sends RFC 3442 routes.

3 weeks agofix(crypt): use -d instead of -f to check for $NEWROOT/proc directory
Sidharth Sankar [Wed, 11 Mar 2026 13:27:56 +0000 (18:57 +0530)] 
fix(crypt): use -d instead of -f to check for $NEWROOT/proc directory

All other instances of checks for the existence of $NEWROOT/proc use
-d or at least -e, but incorrectly using -f to check for the existence
of just a file at that path would fail to exit as it should if the
directory exists.

Fixes: d0d1ea3 ("prompt the crypto disk, when asking for a password")
Signed-off-by: Sidharth Sankar <sidstuffhere@gmail.com>
3 weeks agofix(crypt): honor timeout setting when using UUID, LABEL, etc
Benjamin Drung [Fri, 13 Mar 2026 13:45:50 +0000 (14:45 +0100)] 
fix(crypt): honor timeout setting when using UUID, LABEL, etc

Test 20 fails on slow architectures, because it runs into a timeout:

```
[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device - /dev/disk/by-uuid/1dc514cd-8268-4a33-873f-84f8eb02d3e0.
[DEPEND] Dependency failed for systemd-cryptsetup@testluks.service - Cryptography Setup for testluks.
[DEPEND] Dependency failed for cryptsetup.target - Local Encrypted Volumes.
[  118.452336] systemd[1]: dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device: Job dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device/start timed out.
[  118.465917] systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device - /dev/disk/by-uuid/1dc514cd-8268-4a33-873f-84f8eb02d3e0.
[  118.483854] systemd[1]: Dependency failed for systemd-cryptsetup@testluks.service - Cryptography Setup for testluks.
[  118.500894] systemd[1]: Dependency failed for cryptsetup.target - Local Encrypted Volumes.
[  118.519552] systemd[1]: cryptsetup.target: Job cryptsetup.target/start failed with result 'dependency'.
[  118.535383] systemd[1]: systemd-cryptsetup@testluks.service: Job systemd-cryptsetup@testluks.service/start failed with result 'dependency'.
[  118.549404] systemd[1]: dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device: Job dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device/start failed with result 'timeout'.
```

`parse-crypt.sh` is supposed to set the timeout for this device
(defaulting to `infinity`), but it uses the wrong unit name in case the
source device in `/etc/crypttab` uses `UUID`, `PARTLABEL`, `LABEL`, or
`PARTUUID`. For example: it converts
`UUID=1dc514cd-8268-4a33-873f-84f8eb02d3e0` to
`UUID\x3d1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device`
instead of
`dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device`.

Use `label_uuid_to_dev` to map the source device from `/etc/crypttab` to
a device path.

3 weeks agorevert(ci): skip void:latest due to dash 0.5.13.1 bug
Benjamin Drung [Fri, 13 Mar 2026 14:02:09 +0000 (15:02 +0100)] 
revert(ci): skip void:latest due to dash 0.5.13.1 bug

As dash has not acknowledged the bug report yet, and more issues with
that version of dash were reported, void have reverted to the previous
version 0.5.12.

This reverts commit 96d8bb130d1f83f5902f3456dcdf9d35126ecc44.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2280
3 weeks agochore(deps): bump docker/login-action from 3 to 4
dependabot[bot] [Tue, 10 Mar 2026 20:53:32 +0000 (20:53 +0000)] 
chore(deps): bump docker/login-action from 3 to 4

Bumps [docker/login-action](https://github.com/docker/login-action) from 3 to 4.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks agochore(deps): bump docker/build-push-action from 6 to 7
dependabot[bot] [Tue, 10 Mar 2026 20:53:38 +0000 (20:53 +0000)] 
chore(deps): bump docker/build-push-action from 6 to 7

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6 to 7.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks agochore(deps): bump docker/setup-buildx-action from 3 to 4
dependabot[bot] [Tue, 10 Mar 2026 20:53:43 +0000 (20:53 +0000)] 
chore(deps): bump docker/setup-buildx-action from 3 to 4

Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks agoci(opensuse): install libarchive13 for TEST-45-SYSTEMD-IMPORT
Antonio Alvarez Feijoo [Thu, 12 Mar 2026 14:06:35 +0000 (15:06 +0100)] 
ci(opensuse): install libarchive13 for TEST-45-SYSTEMD-IMPORT

This should fix the recent CI failure:

```
2026-03-12T13:16:04.1863272Z dracut-install: WARNING: could not locate dlopen dependency for archive feature requested by '/usr/lib64/systemd/libsystemd-shared-259.3-1.1.so'
```

4 weeks agotest: add commented DEBUGFAIL to test 20
Benjamin Drung [Tue, 10 Mar 2026 10:28:14 +0000 (11:28 +0100)] 
test: add commented DEBUGFAIL to test 20

To ease debugging, add a commented `DEBUGFAIL` setting (similar to the
other test cases).

4 weeks agotest(run-qemu): check if /dev/kvm is readable and writable
Benjamin Drung [Mon, 9 Mar 2026 21:47:12 +0000 (22:47 +0100)] 
test(run-qemu): check if /dev/kvm is readable and writable

In case `/dev/kvm` is not readable or writable, enabling KVM will fail:

```
run-qemu: timeout --foreground 600 /usr/bin/qemu-system-aarch64 -enable-kvm -cpu host [...]
qemu-system-aarch64: Could not access KVM kernel module: Permission denied
qemu-system-aarch64: failed to initialize kvm: Permission denied
```

4 weeks agotest(run-qemu): group checks for /dev/kvm
Benjamin Drung [Mon, 9 Mar 2026 21:43:21 +0000 (22:43 +0100)] 
test(run-qemu): group checks for /dev/kvm

Group the checks for `/dev/kvm` to avoid duplicate code.

4 weeks agotest: drop poweroff call where poweroff is called by EXIT trap
Benjamin Drung [Thu, 5 Mar 2026 23:20:04 +0000 (00:20 +0100)] 
test: drop poweroff call where poweroff is called by EXIT trap

Several scripts set an EXIT trap to call `poweroff -f`. So these scripts
do not need to call `poweroff -f` at the end any more. They can just
rely on the EXIT trap.

4 weeks agotest: create /var/lib/nfs/rmtab in server rootfs
Benjamin Drung [Thu, 5 Mar 2026 23:14:56 +0000 (00:14 +0100)] 
test: create /var/lib/nfs/rmtab in server rootfs

The server log shows this warning:

```
rpc.mountd[674]: can't open /var/lib/nfs/rmtab for writing
```

So create `/var/lib/nfs/rmtab` in the server rootfs.

4 weeks agotest: use "set -eu" in server rootfs test scripts
Benjamin Drung [Thu, 5 Mar 2026 23:10:10 +0000 (00:10 +0100)] 
test: use "set -eu" in server rootfs test scripts

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

4 weeks agotest: use EXIT trap in server-init.sh to poweroff on exit
Benjamin Drung [Thu, 5 Mar 2026 23:05:04 +0000 (00:05 +0100)] 
test: use EXIT trap in server-init.sh to poweroff on exit

Use an EXIT trap in `server-init.sh` to poweroff on exit to make the
code similar to the client init scripts. This will allow to run those
scripts with `set -e`.

4 weeks agotest: build minimal server rootfs for test 70-72
Benjamin Drung [Thu, 5 Mar 2026 21:23:24 +0000 (22:23 +0100)] 
test: build minimal server rootfs for test 70-72

Build a minimal server rootfs for test 70 to 72 using
`build_rootfs_base` and functions from `dracut-functions.sh` instead of
using `dracut.sh` (which would build a bigger rootfs).

4 weeks agotest: add /var/run -> /run symlink for tgtd
Benjamin Drung [Thu, 5 Mar 2026 21:03:46 +0000 (22:03 +0100)] 
test: add /var/run -> /run symlink for tgtd

tgtd wants to write to `/var/run`. So add the legacy symlink from
`/var/run` -> `/run`.

4 weeks agotest: move sourcing dracut-functions.sh to build_rootfs_base
Benjamin Drung [Thu, 5 Mar 2026 21:02:26 +0000 (22:02 +0100)] 
test: move sourcing dracut-functions.sh to build_rootfs_base

Move sourcing `dracut-functions.sh` to `build_rootfs_base` to make it
available for future other consumers.

5 weeks agotest: rely on server initrd to load af_packet
Benjamin Drung [Thu, 26 Feb 2026 21:06:36 +0000 (22:06 +0100)] 
test: rely on server initrd to load af_packet

To keep the server rootfs small, rely on the initrd to load `af_packet`.

5 weeks agotest: switch from isc-dhcp-server to dnsmasq
Benjamin Drung [Thu, 5 Mar 2026 18:19:29 +0000 (19:19 +0100)] 
test: switch from isc-dhcp-server to dnsmasq

isc-dhcp-server is no longer activly maintained and has been removed
from Debian testing.

Use dnsmasq as DHCP server instead.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1451
5 weeks agoci: install tcpdump in containers
Benjamin Drung [Thu, 5 Mar 2026 01:11:24 +0000 (02:11 +0100)] 
ci: install tcpdump in containers

Test 60 fails with dnsmasq: no DHCP discover packet reached dsnmasq. The
workaround is to run tcpdump on the server.

See https://github.com/dracut-ng/dracut-ng/issues/2283

5 weeks agotest(test.sh): pass through USE_NETWORK environment variable
Benjamin Drung [Thu, 5 Mar 2026 00:03:24 +0000 (01:03 +0100)] 
test(test.sh): pass through USE_NETWORK environment variable

Allow setting the `USE_NETWORK` environment variable when running the
tests locally with `test/test.sh`.

5 weeks agofix(dracut): remove unused dracut_no_switch_root
Benjamin Drung [Sat, 7 Feb 2026 18:54:02 +0000 (19:54 +0100)] 
fix(dracut): remove unused dracut_no_switch_root

Commit 19e575859086 ("squash: also squash systemctl if switch-root is
not needed") added the function `dracut_no_switch_root` but never used
it. https://codesearch.debian.net shows no user as well.

So remove the unused `dracut_no_switch_root` function.

https://codesearch.debian.net

5 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

5 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.

5 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.

5 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`.

5 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.

5 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

5 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>
5 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.

5 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
5 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.

5 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.
```

5 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.

5 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.

5 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.

5 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.

5 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.

6 weeks 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>
6 weeks 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
7 weeks 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.

7 weeks 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.

7 weeks 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.

7 weeks 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.

7 weeks 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

7 weeks 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.

8 weeks 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.

8 weeks 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`.

8 weeks 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
8 weeks 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
8 weeks 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
8 weeks 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
8 weeks 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

8 weeks 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

8 weeks 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")
8 weeks 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")
8 weeks 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.

8 weeks 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.

8 weeks 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 .

8 weeks 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.

8 weeks 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.

8 weeks 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`