]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
4 days agofix(systemd-networkd): get DHCP options values from networkctl main
Luca Boccassi [Sun, 31 May 2026 14:29:50 +0000 (15:29 +0100)] 
fix(systemd-networkd): get DHCP options values from networkctl

The internal lease is no longer saved to the private /run/ directory
of networkd since v261, so it cannot be read from there. It was always
clearly marked as private anyway.
Use the new 'dhcp-lease' networkctl verb to print it instead.

4 days agofix(systemd-*): add new dlopen dependencies to modules lists
Luca Boccassi [Sun, 31 May 2026 13:47:15 +0000 (14:47 +0100)] 
fix(systemd-*): add new dlopen dependencies to modules lists

systemd v261 moved more dependencies to dlopen, including libssl which
is required by various components, like resolved

6 days agofix(bluetooth): skip warning when module is explicitly requested
Esat [Wed, 27 May 2026 15:42:56 +0000 (18:42 +0300)] 
fix(bluetooth): skip warning when module is explicitly requested

10 days agofix: replace true by :
Benjamin Drung [Fri, 8 May 2026 13:35:20 +0000 (15:35 +0200)] 
fix: replace true by :

Calling the `true` command is not needed in most cases. Use the `:`
no-operation command instead.

11 days agotest(container): install busybox in distro images
Nadzeya Hutsko [Tue, 26 May 2026 16:49:30 +0000 (18:49 +0200)] 
test(container): install busybox in distro images

3 weeks agotest(SYSTEMD-SYSEXT): use pre-pivot hook
Benjamin Drung [Thu, 7 May 2026 12:45:24 +0000 (14:45 +0200)] 
test(SYSTEMD-SYSEXT): use pre-pivot hook

The initqueue might run before the system extension is loaded.

Use the pre-pivot hook instead of the initqueue which definitively runs
late enough.

4 weeks agofix(iscsi): handle empty URI in firmware boot mode
gomid4497 [Mon, 13 Apr 2026 09:31:15 +0000 (15:01 +0530)] 
fix(iscsi): handle empty URI in firmware boot mode

When rd.iscsi.firmware=1 is set, netroot is either 'iscsi' or 'iscsi:'
with no real URI. parse_iscsi_root() was called with these values causing
'shift count out of range' errors as shift was called on empty positional
parameters.

Add two guards in parse_iscsi_root() to return early when there are no
parameters left to parse, and skip handle_netroot() in iscsiroot.sh when
netroot has no real target.

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

4 weeks agochore(doc_site): fix missed renames to dracut-ng/dracut
Benjamin Drung [Thu, 7 May 2026 23:21:25 +0000 (01:21 +0200)] 
chore(doc_site): fix missed renames to dracut-ng/dracut

Fixes: bff857d028f ("chore: update dracut-ng/dracut-ng to dracut-ng/dracut")
4 weeks agofix(kernel-modules): add Mediatek MTU3 USB controller
Icenowy Zheng [Sat, 18 Apr 2026 16:42:00 +0000 (00:42 +0800)] 
fix(kernel-modules): add Mediatek MTU3 USB controller

This is the USB dual-role controller used by some MediaTek SoCs.

Adding it fixes booting from USB storage on Lenovo Chromebook Duet EDU
G2 (mt8188-geralt-ciri). That device does not have any SD slot, so USB
storage is the only usable external storage.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
4 weeks agochore(docs): fix name of the compatibility doc file
Neal Gompa [Wed, 6 May 2026 23:33:36 +0000 (19:33 -0400)] 
chore(docs): fix name of the compatibility doc file

4 weeks agofix(docs): declare the correct location to report vulnerabilities
Neal Gompa [Wed, 6 May 2026 19:40:08 +0000 (15:40 -0400)] 
fix(docs): declare the correct location to report vulnerabilities

We use the GitHub Security Advisory system for this purpose, and
Harald Hoyer hasn't been involved in quite some time.

4 weeks agochore: update dracut-ng/dracut-ng to dracut-ng/dracut
Neal Gompa [Wed, 6 May 2026 19:29:13 +0000 (15:29 -0400)] 
chore: update dracut-ng/dracut-ng to dracut-ng/dracut

The project URL has changed, update accordingly.

4 weeks agoci(debian): drop GNU coreutils workaround for Ubuntu 25.10
Benjamin Drung [Thu, 7 May 2026 12:38:54 +0000 (14:38 +0200)] 
ci(debian): drop GNU coreutils workaround for Ubuntu 25.10

The `ubuntu:rolling` points to Ubuntu 26.04 now. So the GNU coreutils
workaround for Ubuntu 25.10 can be removed.

4 weeks agotest: exit after create-root.sh has been run
Benjamin Drung [Wed, 6 May 2026 16:36:43 +0000 (18:36 +0200)] 
test: exit after create-root.sh has been run

The `create-root.sh` scripts are installed as initqueue hook and soured
by it. So just having an exit hook is not enough. The script needs to
exit explicitly to shutdown the boot.

Fixes: 39e4b0a37bb5 ("test: drop poweroff call where poweroff is called by EXIT trap")
5 weeks agodocs: update NEWS.md and AUTHORS for release 111 111
Benjamin Drung [Sat, 2 May 2026 13:07:12 +0000 (15:07 +0200)] 
docs: update NEWS.md and AUTHORS for release 111

5 weeks agorevert: systemd requires cryptsetup targets installed earlier
Jo Zzsi [Fri, 17 Apr 2026 11:49:23 +0000 (07:49 -0400)] 
revert: systemd requires cryptsetup targets installed earlier

This commit reverts ad52085 and 181e1f1 .

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2395
5 weeks agofix(systemd-cryptsetup): only filter out modules for strict hostonly
Jo Zzsi [Mon, 13 Jan 2025 01:47:09 +0000 (20:47 -0500)] 
fix(systemd-cryptsetup): only filter out modules for strict hostonly

Exclude (Filter out) dracut modules only when hostonly_mode is set
to strict (needs opt in even in hostonly).

In sloppy mode all installable optional dependencies will be installed.

Helps with the discussion for https://github.com/dracut-ng/dracut-ng/issues/748

5 weeks agorefactor(dracut): remove unnecessary 'realpath' call if -k/--kmoddir specified
Mewt R [Mon, 20 Apr 2026 00:37:27 +0000 (20:37 -0400)] 
refactor(dracut): remove unnecessary 'realpath' call if -k/--kmoddir specified

No need to use 'realpath' to resolve a default directory to look for modules
if one has already been specified. 'realpath' will complain if the directory doesn't exist
which can lead a user to think that something went wrong.

5 weeks agofix(systemd-pcrextend): add NVPCR definition files
Jo Zzsi [Sun, 15 Feb 2026 23:06:43 +0000 (18:06 -0500)] 
fix(systemd-pcrextend): add NVPCR definition files

According to https://github.com/systemd/systemd/issues/40159#issuecomment-3760597003
the initramfs is expected to include the nvpcr definition files from systemd for
v259 compatibility.

5 weeks agoci(debian): drop --quiet from apt-get calls
Benjamin Drung [Thu, 30 Apr 2026 20:05:56 +0000 (22:05 +0200)] 
ci(debian): drop --quiet from apt-get calls

Make the Debian/Ubuntu container build logs more verbose and easier to
debug by dropping the `--quiet` flag.

5 weeks agotest(SYSTEMD-SYSEXT): introduce tests for systemd-sysext
Antonio Alvarez Feijoo [Wed, 22 Apr 2026 09:42:19 +0000 (11:42 +0200)] 
test(SYSTEMD-SYSEXT): introduce tests for systemd-sysext

- A confext creates a marker in /etc/dracut-confext with the content
"dracut-sysext-success".
- A sysext creates a script in
/usr/lib/dracut/hooks/initqueue/finished/dracut-sysext.sh that simply checks if
/etc/dracut-confext exists and prints a message with its content. If this
initqueue script does not succeed, the initqueue main loop will not exit and the
system will not boot.
- Also, check in the QEMU log that "dracut-sysext-success" was printed.

Note:
- systemd-repart creates erofs partitions by default. If it is not supported by
the running distribution, override it to use squashfs.

5 weeks agotest: allow configuring the message to search for in check_qemu_log()
Antonio Alvarez Feijoo [Wed, 22 Apr 2026 09:39:58 +0000 (11:39 +0200)] 
test: allow configuring the message to search for in check_qemu_log()

5 weeks agofix(systemd-sysext): add dependency to systemd-veritysetup
Antonio Alvarez Feijoo [Wed, 22 Apr 2026 09:38:11 +0000 (11:38 +0200)] 
fix(systemd-sysext): add dependency to systemd-veritysetup

The common use case is a bootloader or a UEFI boot stub (e.g. systemd-stub(7))
that follows the BLS adding extensions found in the ESP to the /.extra directory
in the initrd. In this case, it's used by default a strict
"root=signed+absent:usr=signed+absent" image policy (see
systemd.image-policy(7)). This means, Verity authentication and a PKCS#7
signature of the Verity root hash.

5 weeks agofix(systemd-veritysetup): validate dm-verity signatures in userspace
Antonio Alvarez Feijoo [Wed, 22 Apr 2026 09:37:06 +0000 (11:37 +0200)] 
fix(systemd-veritysetup): validate dm-verity signatures in userspace

Since [1], if the validation against the kernel does not work, systemd searches
for PKCS#7 certificates in `/{etc,usr/lib}/verity.d` as a fallback mechanism to
validate dm-verity signatures.

[1] https://github.com/systemd/systemd/commit/c2fa92e7e8907d9658646595261fa2d3433e6e4b

5 weeks agofix(systemd-sysext): install kernel modules for common disk images
Antonio Alvarez Feijoo [Wed, 22 Apr 2026 09:35:53 +0000 (11:35 +0200)] 
fix(systemd-sysext): install kernel modules for common disk images

Although erofs is the default, other common filesystem types used to create disk
images without partition table are squashfs and ext4.

5 weeks agoperf(systemd-sysext): do not attempt to install extension metadata
Antonio Alvarez Feijoo [Wed, 22 Apr 2026 09:34:44 +0000 (11:34 +0200)] 
perf(systemd-sysext): do not attempt to install extension metadata

Files under /usr/lib/extension-release.d/extension-release.* and
/etc/extension-release.d/extension-release.* are self contained in sysexts and
confexts respectively. The important file to check if an extension can be
installed is the os-release.

5 weeks agofix(dmsquash-live): correct det_img_fs implementation
Jo Zzsi [Thu, 30 Apr 2026 12:26:34 +0000 (08:26 -0400)] 
fix(dmsquash-live): correct det_img_fs implementation

The `=` is being treated as an assignment operator, not part of a
suffix-strip pattern, so the trimming never happens.

Fix it by separate them.

Follow-up for 7c0298a

5 weeks agofix(dmsquash-live): load kernel module before mount
Jo Zzsi [Sat, 7 Feb 2026 14:21:47 +0000 (09:21 -0500)] 
fix(dmsquash-live): load kernel module before mount

The mount call may require the kernel module for the filesystem
type to be loaded in order to succeed.

Follow the already established sequence of calls for mounting.

```
det_img_fs
load_fstype
mount
```

5 weeks agofix(functions): prevent find_binary from dropping last PATH element
Matéo Pourrier [Tue, 28 Apr 2026 15:23:23 +0000 (17:23 +0200)] 
fix(functions): prevent find_binary from dropping last PATH element

When `read` encounters EOF before the delimiter, it returns a non-zero
exit status, causing the while loop to terminate immediately. As a result,
if the PATH string doesn't end with a colon, the very last directory in
PATH is ignored by find_binary().

This caused regressions on split-usr architectures where critical
binaries reside exclusively in /bin, and /bin happens to be
appended at the very end of the PATH by dracut.sh.

Appending a virtual colon to the Here-String ensures the loop processes
all directories correctly.

Fixes dracut-ng issue #1467.

5 weeks agofeat(dmsquash-live): add busybox blkid compatibility
Jo Zzsi [Sat, 7 Feb 2026 17:09:13 +0000 (12:09 -0500)] 
feat(dmsquash-live): add busybox blkid compatibility

busybox blkid does not support -s argument. Use POSIX shell
to filter out the tags needed from the output of the blkid
invocation.

Fixes https://github.com/dracut-ng/dracut-ng/issues/2207
for the dmsquash-live module.

5 weeks agofix(shutdown): warning printed unconditionally
Jo Zzsi [Sat, 25 Apr 2026 11:12:33 +0000 (07:12 -0400)] 
fix(shutdown): warning printed unconditionally

The shutdown dracut module unconditionally warns
"Killing all remaining processes" on every shutdown, even when
no processes need to be killed.

This produces unnecessary warning noise on the console during clean shutdowns.

The warning was introduced in commit 551c2dd (Jan 2013) and was
historically invisible because older dracut versions (e.g. 048) had a less
reliable console redirect. Since version 051,
the improved console redirect logic (echo </dev/console subshell check)
makes the warning reliably visible.

Fixes: https://github.com/dracutdevs/dracut/issues/2725
Co-authored-by: Artem Kirkor <akirkor@incomm.com>
5 weeks agofeat(systemd-sysusers-service): systemd-sysusers.service module
Jo Zzsi [Sun, 26 Apr 2026 22:22:54 +0000 (18:22 -0400)] 
feat(systemd-sysusers-service): systemd-sysusers.service module

This new dracut module allows to run systemd-sysusers as part of the initrd boot process.

Including this module is the preferred way for openSUSE.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1360
5 weeks agofix: disable hostonly_cmdline for Gentoo by default
Nowa Ammerlaan [Fri, 24 Apr 2026 08:35:26 +0000 (10:35 +0200)] 
fix: disable hostonly_cmdline for Gentoo by default

Our new users are stumbling over a check we added that prevents
accidentally including a cmdline for the live system in the initramfs
for the new install. Since the overall majority of our new users will
be setting a cmdline via the bootloader or system firmware anyway this
setting is not really useful for our users and only creates confusion
because there are now two knobs which control the same thing.

For that reason we would like to disable the hostonly_cmdline by
default (like Fedora does as well).

See-also: https://bugs.gentoo.org/971572
Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
5 weeks agofix: explicitly set and document Gentoo defaults
Nowa Ammerlaan [Sun, 19 Apr 2026 12:39:00 +0000 (14:39 +0200)] 
fix: explicitly set and document Gentoo defaults

Explicitly set Gentoo configuration defaults that we have been
controlling implicitly via other packages. By documenting this
explicitly I hope that users reading this configuration file will
have an (even) easier time finding "the Gentoo way" of doing things
like including microcode or building an UKI. We control these things
outside the scope of Dracut since optional external dependencies are
required for these functions.
(linux-firmware, intel-microcode systemd-stub, ukify, etc).

See-also: https://bugs.gentoo.org/971572
Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
5 weeks agodocs: document hookdir variable as always declared
Jo Zzsi [Mon, 27 Apr 2026 20:21:34 +0000 (16:21 -0400)] 
docs: document hookdir variable as always declared

hookdir variable is the recommended way to refer to the path
of the directory used for dracut hooks during boot.

This variable is part of the API for 3rd party dracut modules.

Follow-up to 04d5e29 .

5 weeks agofeat(dracut-catimages.sh): move images directory from /boot to /var/lib
Antonio Alvarez Feijoo [Thu, 12 Mar 2026 13:08:44 +0000 (14:08 +0100)] 
feat(dracut-catimages.sh): move images directory from /boot to /var/lib

/boot/dracut in not the right place to save images for multiple reasons, the
most obvious is that it can be a different partition with size constraints, but
also in transactional systems /boot is mounted read-only. Replace this default
directory with /var/lib/dracut/images.

5 weeks agofix(dracut-catimages.sh): do not create overlay image without image directory
Antonio Alvarez Feijoo [Thu, 12 Mar 2026 13:07:58 +0000 (14:07 +0100)] 
fix(dracut-catimages.sh): do not create overlay image without image directory

Images created using the content of the overlay directory are saved in the image
directory, ignoring --noimagedir, and then not appending it to the base image
either.

```
$ dracut-catimages -v --noimagedir -f test-cat.img test-base.img
Creating image /boot/dracut/90-overlay.img from directory /var/lib/dracut/overlay
Using base image test-base.img
Created test-cat.img
```

So, skip creation of overlay image with `--noimagedir`.

5 weeks agofix(dracut-catimages.sh): do not call shift for options without arguments
Antonio Alvarez Feijoo [Thu, 12 Mar 2026 12:55:46 +0000 (13:55 +0100)] 
fix(dracut-catimages.sh): do not call shift for options without arguments

`--nooverlay` and `--noimagedir` do not expect any arguments, so calling shift
after processing them has unintended effects.

5 weeks agofix(dracut-catimages.sh): log proper missing images directory
Antonio Alvarez Feijoo [Thu, 12 Mar 2026 09:03:14 +0000 (10:03 +0100)] 
fix(dracut-catimages.sh): log proper missing images directory

5 weeks agoci: reduce peak ci load
Jo Zzsi [Sun, 26 Apr 2026 19:07:23 +0000 (15:07 -0400)] 
ci: reduce peak ci load

I noticed that running several GitHub Actions at the same time
increases the chances of flakiness.

Spread out the daily jobs to reduce peak load and decrease the
chances of jobs overlapping.

6 weeks agoci: separate NBD tests into their own GitHub Action
Jo Zzsi [Sat, 25 Apr 2026 11:08:37 +0000 (07:08 -0400)] 
ci: separate NBD tests into their own GitHub Action

Make daily tests more modular to improve management of potential
failures.

6 weeks agotest(SYSROOT): correct path for build-parameter.txt
Jo Zzsi [Sat, 25 Apr 2026 00:33:09 +0000 (20:33 -0400)] 
test(SYSROOT): correct path for build-parameter.txt

build-parameter.txt is stored under /lib. In most cases
/usr/lib is a symbolic link to /lib, but not always.

The canonical path for build-parameter.txt is under /lib/dracut/

Follow-up to 99738e5.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2407
6 weeks agofix(systemd-cryptsetup): load libcryptsetup via dlopen
Antonio Alvarez Feijoo [Thu, 23 Apr 2026 08:18:59 +0000 (10:18 +0200)] 
fix(systemd-cryptsetup): load libcryptsetup via dlopen

The `systemd-cryptsetup` binary no longer depends on `libcryptsetup`, and there
is no other binary installed with the `systemd-cryptsetup` or `crypt` modules
that installs it.

```
switch_root:/root# systemd-cryptsetup --version | head -1
systemd 261 (261~devel+git20260423.43dab5ea8)
switch_root:/root# systemd-cryptsetup help
Shared library 'libcryptsetup.so.12' is not available: libcryptsetup.so.12: cannot open shared object file: No such file or directory
switch_root:/root# echo $?
1
```

Required since https://github.com/systemd/systemd/commit/43dab5ea8797e45e0702f8ee89cdf25e577a652b

6 weeks agofix(systemd-repart): load libfdisk via dlopen
Antonio Alvarez Feijoo [Tue, 21 Apr 2026 06:25:28 +0000 (08:25 +0200)] 
fix(systemd-repart): load libfdisk via dlopen

Required since https://github.com/systemd/systemd/commit/a066396fbc72d06e503acaf38899f949edf16c4c

7 weeks agofix(overlayfs): unmount NEWROOT before mounting overlay
Benjamin Drung [Mon, 13 Apr 2026 11:15:14 +0000 (13:15 +0200)] 
fix(overlayfs): unmount NEWROOT before mounting overlay

When using `rd.overlay` the mount point `/run/rootfsbase` is not
accessible any more, because `LiveOS_rootfs` is mounted over it. This is
`/proc/mounts` from the `tmpfs overlay (rd.overlay)` test case:

```
tmpfs /run tmpfs rw,nosuid,nodev,size=194628k,nr_inodes=819200,mode=755,inode64 0 0
/dev/sda /run/rootfsbase ext4 ro,relatime 0 0
LiveOS_rootfs / overlay rw,relatime,lowerdir=/run/rootfsbase,upperdir=/run/overlayfs,workdir=/run/ovlwork,uuid=on,nouserxattr 0 0
LiveOS_rootfs /run/rootfsbase overlay rw,relatime,lowerdir=/run/rootfsbase,upperdir=/run/overlayfs,workdir=/run/ovlwork,uuid=on,nouserxattr 0 0
devtmpfs /dev devtmpfs rw,nosuid,size=159436k,nr_inodes=39859,mode=755,inode64 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,inode64,usrquota 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=600,ptmxmode=000 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot,memory_hugetlb_accounting 0 0
none /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0
bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0
configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
```

This breaks use cases where the underlying needs to be accessed.

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

7 weeks agorefactor(overlayfs): exit early in case LiveOS_rootfs is mounted
Benjamin Drung [Mon, 13 Apr 2026 11:10:20 +0000 (13:10 +0200)] 
refactor(overlayfs): exit early in case LiveOS_rootfs is mounted

Increase the code readability by exiting early in case LiveOS_rootfs is
already mounted.

7 weeks agofeat(systemd-sysext): include systemd-{sys,conf}ext-sysroot services
Vitaly Kuznetsov [Fri, 10 Apr 2026 12:55:30 +0000 (14:55 +0200)] 
feat(systemd-sysext): include systemd-{sys,conf}ext-sysroot services

systemd v261 introduces a pair of new systemd-{sys,conf}ext-sysroot services
that are used to merge system and configuration extensions for the main system
from the initramfs. This allows the extensions to update any part of the main
system, including services that run during early boot.

Include these services in the initramfs. systemd enables them by
default (through 90-systemd-initrd.preset), but dracut does not yet support
systemd presets, so these services are enabled manually. If the newly
introduced logic is undesirable for any reason, systemd provides the
'systemd.{sys,conf}ext=' kernel command-line options, meaning dracut does not
need its own.

7 weeks agochore(deps): bump actions/upload-pages-artifact from 4 to 5
dependabot[bot] [Tue, 14 Apr 2026 20:53:41 +0000 (20:53 +0000)] 
chore(deps): bump actions/upload-pages-artifact from 4 to 5

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

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

Signed-off-by: dependabot[bot] <support@github.com>
7 weeks agofix(overlayfs-crypt): make module-setup.sh executable
Benjamin Drung [Tue, 14 Apr 2026 11:43:07 +0000 (13:43 +0200)] 
fix(overlayfs-crypt): make module-setup.sh executable

All `module-setup.sh` scripts are executable except for overlayfs-crypt
one.

7 weeks agoci: generate modules in labeler.yml with a script
Benjamin Drung [Tue, 14 Apr 2026 10:43:58 +0000 (12:43 +0200)] 
ci: generate modules in labeler.yml with a script

To catch missing updates to `labeler.yml` use a Python script to
generate the modules in it. Add a CI job to check for needed updates.

7 weeks agoci: add overlayfs-crypt to labeler
Benjamin Drung [Tue, 14 Apr 2026 10:39:40 +0000 (12:39 +0200)] 
ci: add overlayfs-crypt to labeler

Fixes: c74f8ac20500 ("feat(overlayfs-crypt): add new encrypted persistent overlay support")
7 weeks agoci(labeler): fix glob for squash-erofs/squash-squashfs
Benjamin Drung [Tue, 14 Apr 2026 08:51:48 +0000 (10:51 +0200)] 
ci(labeler): fix glob for squash-erofs/squash-squashfs

The glob rule for `squash-erofs` and `squash-squashfs` does not match
the correct path.

7 weeks agoci: sort modules in labeler.yml
Benjamin Drung [Mon, 13 Apr 2026 22:28:31 +0000 (00:28 +0200)] 
ci: sort modules in labeler.yml

Sort modules in `labeler.yml` and keep them last. This is done in
preparation to generate this part of `labeler.yml` with a script.

7 weeks agotest(ISCSI): wait for tgtd startup
Benjamin Drung [Mon, 13 Apr 2026 20:25:37 +0000 (22:25 +0200)] 
test(ISCSI): wait for tgtd startup

Test 71 (ISCSI-MULTI) sometimes fails when starting the server:

```
+ tgtd
+ tgtadm --lld iscsi --mode target --op new --tid 1 --targetname iqn.2009-06.dracut:target0
tgtadm: failed to send request hdr to tgt daemon, Transport endpoint is not connected
+ _poweroff
+ local exit_code=107
+ set +x
Error: /sbin/init failed with exit code 107.
Powering down.
```

The tgtadm command is called before tgtd finished starting up. So add
waiting for tgtd service to be ready.

7 weeks agofix: avoid arguments for dot commands
Vitaly Kuznetsov [Mon, 13 Apr 2026 13:23:08 +0000 (15:23 +0200)] 
fix: avoid arguments for dot commands

Dot commands don't support arguments in Dash/ posix shell, this is
SC2240. Use 'set' instead.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/346
7 weeks agofeat(dracut): add module to add fw files from DT firmware-name properties
Hans de Goede [Sun, 1 Mar 2026 18:28:41 +0000 (19:28 +0100)] 
feat(dracut): add module to add fw files from DT firmware-name properties

Devicetree based platforms may need board / model specific firmwares in
the initrd.

E.g. on Qualcomm Snapdragon X1e Windows (WoA) laptops the qcom_q6v5_pas
ADSP driver gets added to the initrd because dracut includes all pinctrl
drivers in the initrd and the 6e80000.pinctrl lpass-lpi-pinctrl device
has a supplier:platform:6800000.remoteproc symlink, dragging the ADSP
driver into the initrd.

The ADSP driver tries to load model-specific firmware files with the
filenames to use specified in a devicetree firmware-name properties.

This module adds support for retrieving the firmware-names from these
devicetree properties and adding the firmware files to the initrd.

The ADSP driver, being a remoteproc driver does bind even without the
firmware files, operating in a degraded mode. This means e.g. no battery
readings and no working audio, since both depend on the ADSP. These
firmware files need to be in the initrd to avoid this degraded mode.

The ADSP driver getting brought into the initrd is actually a good thing,
since the ADSP also controls the Type-C PD-controller(s) and when the
firmware is present and loaded this results in a reset of all Type-C USB
ports, so this needs to happen early on, to e.g. avoid USB-storage devices
getting disconnected and filesystems on top getting in a broken state.

Resolves: #722
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2275920
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2455055
Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
---
Changes in v3:
- Move the `"$DRACUT_ARCH" = "aarch64"` check to the generic/non-hostonly path in `check()`
- Drop the `/lib/firmware/qcom` check from the generic/non-hostonly path in `check()`
- Make _fw_names and _fw_files arrays and drop the shellcheck disable=SC2086
- Refererence issue #722 and 2 Red Hat bugzillas in commit message

Changes in v2:
- Iterate over $fw_dir dirs to pickup firmwares from /lib/firmware/updates
- Directly use $DRACUT_ARCH instead of defining _arch local var
- Add the new module to labeler.yml and core.adoc
- Rename module from devicetree-fw to devicetree-firmware

7 weeks agofeat(dracut): add a DRACUT_EXTRA_ARGS environment variable
Jo Zzsi [Fri, 10 Apr 2026 13:21:51 +0000 (09:21 -0400)] 
feat(dracut): add a DRACUT_EXTRA_ARGS environment variable

Some build tools (e.g. autopkgtest-build-qemu) invoke dracut indirectly
through update-initramfs via dpkg triggers, making it impossible to pass
extra flags directly on the command line.

Add a DRACUT_EXTRA_ARGS environment variable whose contents are
word-split and prepended to the dracut argument list before option
parsing.  This allows callers to inject arbitrary flags without modifying
the configuration on disk:

  DRACUT_EXTRA_ARGS=--no-hostonly autopkgtest-build-qemu ...

The variable is intentionally word-split (like MAKEFLAGS), so arguments
that themselves contain spaces must be shell-quoted within the value:

  DRACUT_EXTRA_ARGS='--add "mod1 mod2"' dracut

Changed test 13 to provide test coverage for DRACUT_EXTRA_ARGS variable.

7 weeks agofeat(crypt-lib): introduce crypt-lib dracut module
Jo Zzsi [Sat, 11 Apr 2026 16:49:27 +0000 (12:49 -0400)] 
feat(crypt-lib): introduce crypt-lib dracut module

This new module is preferred solution to reuse crypt-lib.sh
between dracut modules.

7 weeks agoci(gentoo): arm64 openrc basic daily tests
Jo Zzsi [Sun, 12 Apr 2026 20:25:35 +0000 (16:25 -0400)] 
ci(gentoo): arm64 openrc basic daily tests

Use the newly introduced CI test container to run tests on
Gentoo arm64 openrc.

7 weeks agoci(gentoo): arm64 archtecture for openrc
Jo Zzsi [Sun, 12 Apr 2026 20:33:54 +0000 (16:33 -0400)] 
ci(gentoo): arm64 archtecture for openrc

Tag propely the newly created container image.

Follow-up to e775acc .

7 weeks agoci(gentoo): arm64 archtecture for openrc
Jo Zzsi [Sat, 11 Apr 2026 21:44:17 +0000 (17:44 -0400)] 
ci(gentoo): arm64 archtecture for openrc

Enable Gentoo based OpenRC testing on arm64 as well.

7 weeks agoci(gentoo): enable daily network-legacy testing for Gentoo
Jo Zzsi [Sat, 11 Apr 2026 21:44:17 +0000 (17:44 -0400)] 
ci(gentoo): enable daily network-legacy testing for Gentoo

It seems Gentoo community is interested in helping to maintain
network-legacy, see
https://github.com/gentoo/gentoo/commit/edce3a9b8cba345ad645502ec3c534b86060030c.

8 weeks agofeat(overlayfs-crypt): add new encrypted persistent overlay support
Nadzeya Hutsko [Fri, 10 Apr 2026 18:51:12 +0000 (20:51 +0200)] 
feat(overlayfs-crypt): add new encrypted persistent overlay support

Add a new overlayfs-crypt dracut module that supports LUKS-encrypted
persistent overlay devices via the rd.overlay.crypt kernel parameter,
similar to the overlayroot=crypt in cloud-initramfs-tools.

If the device already contains a LUKS volume, the user is prompted for
the passphrase interactively (via Plymouth if available, otherwise
TTY). Otherwise, the device is wiped, formatted with LUKS using a
randomly generated passphrase, and a new filesystem is created on it.

The overlayfs-crypt module depends on the overlayfs module and signals
mount-overlayfs.sh to proceed via a shared marker file
(/run/overlayfs-crypt-ready).

8 weeks agorefactor(70crypt): extract luks_open_interactive into crypt-lib
Nadzeya Hutsko [Fri, 10 Apr 2026 18:50:46 +0000 (20:50 +0200)] 
refactor(70crypt): extract luks_open_interactive into crypt-lib

Move the interactive LUKS open logic into a shared
luks_open_interactive function, allowing overlayfs-crypt to reuse it.

8 weeks agofix(dracut): do not record parameters that do not change the initrd
Benjamin Drung [Fri, 10 Apr 2026 21:22:47 +0000 (23:22 +0200)] 
fix(dracut): do not record parameters that do not change the initrd

`dracut --reproducible` encodes the command line in the output. This is
a bit of a hindrance to reproducibility, because it can encode a random
strings. Of all the things, the `--tmpdir` should matter the least for
the generated image(s).

So do not record parameters that do not change the initrd. These
parameters are:

* `--tmpdir`
* `-L`, `--stdlog`
* `-f`, `--force`
* `--debug`
* `--logfile`
* `-v`, `--verbose`
* `-q`, `--quiet`
* `--regenerate-all`
* `-p`, `--parallel`
* `--printsize`
* `--printconfig`

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2322
8 weeks agoci: reenable test 41 for Arch
Jo Zzsi [Sat, 11 Apr 2026 11:09:09 +0000 (07:09 -0400)] 
ci: reenable test 41 for Arch

It looks like this systemd test has recovered on Arch,
let's reenable it.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1677
8 weeks agoci: only run test 72 on arch as part of daily network test
Jo Zzsi [Sat, 11 Apr 2026 12:56:03 +0000 (08:56 -0400)] 
ci: only run test 72 on arch as part of daily network test

Test 72 on Arch regressed today. To keep the main integration
test runs green, disable running this test on arch.

8 weeks agoci(arch): ensure /etc/vconsole.conf exists
Jo Zzsi [Sat, 11 Apr 2026 11:24:47 +0000 (07:24 -0400)] 
ci(arch): ensure /etc/vconsole.conf exists

/etc/vconsole.conf no longer gets installed as part of
package installation. See

https://bbs.archlinux.org/viewtopic.php?id=310236

8 weeks agofix(dracut): remove leading space from recorded arguments
Benjamin Drung [Fri, 10 Apr 2026 21:07:19 +0000 (23:07 +0200)] 
fix(dracut): remove leading space from recorded arguments

`/lib/dracut/build-parameter.txt` records the dracut arguments, but
contains a leading space.

Remove the leading space when recording the arguments.

8 weeks agotest: run all tests with --no-hostonly-cmdline
Benjamin Drung [Fri, 10 Apr 2026 10:13:47 +0000 (12:13 +0200)] 
test: run all tests with --no-hostonly-cmdline

Several tests fail in a Ubuntu VM after commit 04af3c097797 enabled
`hostonly_cmdline` in hostonly mode again, because the host disks leak
into the `cmdline` config stored in the initrd. See 8c70c5bf99ea
("test(sysroot): run with --no-hostonly-cmdline") for a more detailed
explanation.

So run all tests with `--no-hostonly-cmdline`.

8 weeks agodocs: mention order of precedence
Benjamin Drung [Fri, 10 Apr 2026 11:45:52 +0000 (13:45 +0200)] 
docs: mention order of precedence

Document the order of precedence (from low to high):

* configuration files
* environment variables
* command-line options

8 weeks agofix: set DRACUT_TMPDIR before using it in dlog_init()
Jo Zzsi [Wed, 8 Apr 2026 20:57:32 +0000 (16:57 -0400)] 
fix: set DRACUT_TMPDIR before using it in dlog_init()

Otherwise, dracut is performing mkfifo /systemd-cat on the host.

Fixes: 8552a0f
Fixes: https://github.com/dracut-ng/dracut-ng/issues/2291
8 weeks agorefactor(dracut-functions): use array in _detect_library_directories
Benjamin Drung [Wed, 1 Apr 2026 14:20:51 +0000 (16:20 +0200)] 
refactor(dracut-functions): use array in _detect_library_directories

Use an array for `libdirs` to fix the shellcheck complaint.

8 weeks agoci: ci: disable running failing tests for daily basic GA
Jo Zzsi [Thu, 9 Apr 2026 22:57:48 +0000 (18:57 -0400)] 
ci: ci: disable running failing tests for daily basic GA

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

8 weeks agoci: disable running failing tests for daily network GA
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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2 months 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")

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