]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
22 months agofix(busybox): install busybox symlinks later in the generation process
Laszlo Gombos [Mon, 22 Jul 2024 12:51:09 +0000 (08:51 -0400)] 
fix(busybox): install busybox symlinks later in the generation process

22 months agofix(busybox): install busybox symlinks manually
Laszlo Gombos [Mon, 22 Jul 2024 11:50:34 +0000 (07:50 -0400)] 
fix(busybox): install busybox symlinks manually

Do not depend on CONFIG_FEATURE_INSTALLER.
Do not remove existing destination files.

22 months agofix(lsinitrd): check skipcpio file directly
Pavel Valena [Wed, 17 Jul 2024 14:04:37 +0000 (16:04 +0200)] 
fix(lsinitrd): check skipcpio file directly

as the folder in /usr/lib/dracut/src might just exist; but the file might not.

22 months agotest: make sure test marker is reset properly
Laszlo Gombos [Sun, 21 Jul 2024 20:15:12 +0000 (16:15 -0400)] 
test: make sure test marker is reset properly

sync explicitly to flush cashes.

22 months agotest: mount rootfs read-only to avoid subtests to interfere
Laszlo Gombos [Sun, 21 Jul 2024 19:41:21 +0000 (15:41 -0400)] 
test: mount rootfs read-only to avoid subtests to interfere

22 months agoci: remove duplicated dracut module dependencies
Laszlo Gombos [Sun, 21 Jul 2024 18:26:15 +0000 (14:26 -0400)] 
ci: remove duplicated dracut module dependencies

rootfs-block kernel-modules are already included with each
test-makeroot dracut module.

22 months agoci: only install required dracut modules for test-makeroot
Laszlo Gombos [Sun, 21 Jul 2024 18:18:29 +0000 (14:18 -0400)] 
ci: only install required dracut modules for test-makeroot

Use '-m' instead of '-a' to run tests faster and more reliably.

Restores earlier ci functionality and now that dracut regressions
are resolved ci can revert 51d06540d.

22 months agochore(mksh)!: remove mksh dracut module
Laszlo Gombos [Sun, 21 Jul 2024 13:11:25 +0000 (09:11 -0400)] 
chore(mksh)!: remove mksh dracut module

BREAKING CHANGE: the mksh dracut module no longer maintained
due to lack of interest.

22 months agorevert(crypt): do not unlock encrypted devices by default during boot
Laszlo Gombos [Sun, 21 Jul 2024 13:04:13 +0000 (09:04 -0400)] 
revert(crypt): do not unlock encrypted devices by default during boot

This reverts commit 2339acfaeee60d6bb26a1103db2e53bc8f9cb2d1.

This change needs more test cases and more granular conditionals.

22 months agofeat(busybox): use busybox --install to install itself
Laszlo Gombos [Sun, 21 Jul 2024 00:24:13 +0000 (20:24 -0400)] 
feat(busybox): use busybox --install to install itself

Previous commits in this PR exposed a bug whereby some utilities
(e.g. dd) had both a busybox applet version and a coreutils version.

The busybox dracut module should not enforce taking always the
busybox version. The `busybox --install` command is safer option
that does not overwrite an existing binary of already exists.

22 months agotest(RAID-DEG): bash is not a requirement for this test
Laszlo Gombos [Sat, 20 Jul 2024 22:53:51 +0000 (18:53 -0400)] 
test(RAID-DEG): bash is not a requirement for this test

Increase tests coverage by letting the sh meta package pick a
shell.

22 months agotest: do not force include dash, let sh module make a selection
Laszlo Gombos [Sat, 20 Jul 2024 22:49:38 +0000 (18:49 -0400)] 
test: do not force include dash, let sh module make a selection

This is important for alpine, so that it does not install both
dash and busybox dracut modules that are potentially conflicting.

22 months agofeat(shell-interpreter): meta package for improved shell selection
Laszlo Gombos [Sat, 20 Jul 2024 22:40:43 +0000 (18:40 -0400)] 
feat(shell-interpreter): meta package for improved shell selection

22 months agofeat(pcmcia): only include when another module requires it
Laszlo Gombos [Sat, 20 Jul 2024 11:48:31 +0000 (07:48 -0400)] 
feat(pcmcia): only include when another module requires it

While the module itself is relativly new the technology is rarely
used any more as part of the boot process.

22 months agochore!: drop support for prepare_udev_rules
Laszlo Gombos [Sat, 20 Jul 2024 03:03:50 +0000 (23:03 -0400)] 
chore!: drop support for prepare_udev_rules

Follow-up to c95075e2c792cdb0e18aac6300ae8dc0dd6a6c1b.

22 months agofix(Makefile): install dracut config examples under /usr
Laszlo Gombos [Sat, 20 Jul 2024 18:09:44 +0000 (14:09 -0400)] 
fix(Makefile): install dracut config examples under /usr

22 months agofeat: add common config when networking is not desired
Laszlo Gombos [Sat, 20 Jul 2024 17:55:03 +0000 (13:55 -0400)] 
feat: add common config when networking is not desired

This is especially useful for distributions like Arch or Gentoo
that do not package networking dracut modules into its own
package.

22 months agofix(watchdog): change the priority of watchdog kernel modules
Laszlo Gombos [Sat, 20 Jul 2024 17:14:09 +0000 (13:14 -0400)] 
fix(watchdog): change the priority of watchdog kernel modules

i6300esb should be prioritized over ib700wdt.

Follow-up to f0a7fc5b4 .

22 months agotest(RAID-DEG): make it not flaky
Laszlo Gombos [Sat, 20 Jul 2024 16:57:24 +0000 (12:57 -0400)] 
test(RAID-DEG): make it not flaky

130f4dfce48b187944be9a0cacca794dd32428ad inadvertently made this
test flaky by including additional dracut modules not required
to pass the test.

22 months agotest: check for kernel module support from within the VM
Laszlo Gombos [Sat, 20 Jul 2024 12:10:46 +0000 (08:10 -0400)] 
test: check for kernel module support from within the VM

Testing kernel module support only works reliably form a VM
that is booted from the given Linux kernel version.

22 months agochore: remove empty check functions
Antonio Alvarez Feijoo [Thu, 18 Jul 2024 07:30:27 +0000 (09:30 +0200)] 
chore: remove empty check functions

22 months agochore: remove support for old mdadm versions
Antonio Alvarez Feijoo [Wed, 17 Jul 2024 07:45:04 +0000 (09:45 +0200)] 
chore: remove support for old mdadm versions

22 months agochore(github): use committer team for code owners
Neal Gompa [Thu, 18 Jul 2024 22:22:15 +0000 (18:22 -0400)] 
chore(github): use committer team for code owners

By using a GitHub team for the CODEOWNERS file, we can
easily add and remove people through the interface for
global committers and avoid unnecessary churn.

22 months agotest(DMSQUASH): no need to partition root_erofs disk
Laszlo Gombos [Sun, 14 Jul 2024 02:35:23 +0000 (22:35 -0400)] 
test(DMSQUASH): no need to partition root_erofs disk

22 months agofix(release): improve commit message
Laszlo Gombos [Sun, 14 Jul 2024 02:10:11 +0000 (22:10 -0400)] 
fix(release): improve commit message

Add new version commit number to the commit message.
Lock clog version to a version that is working well.
Allow clog to be installed in the user home as well.

22 months agofix(dracut): re-enable extended attributes in containers
Laszlo Gombos [Tue, 2 Jul 2024 19:50:37 +0000 (15:50 -0400)] 
fix(dracut): re-enable extended attributes in containers

add common config to make it easier to discable xattr.

Running inside a container is not a good proxy for making decisions
about filesystem properties.

22 months agofix(multipath): include module with "find_multipaths strict"
Martin Wilck [Tue, 16 Jul 2024 14:55:03 +0000 (16:55 +0200)] 
fix(multipath): include module with "find_multipaths strict"

The previous commits 377d52c and 4957ffa excluded the multipath module in
non-hostonly mode, with the purpose of avoiding to start multipath in the
initramfs on systems that don't use multipath. This is against the idea of
non-hostonly, which is to build an initramfs with all kernel modules and tools
that may be necessary to bring up the system.

This patch takes a different approach. In non-hostonly mode, if there are no
multipath devices and no multipath.conf, include the multipath module, but
require "find_multipaths strict" policy. This will ensure that users that don't
use dm-multipath won't be surprised by finding their root device under
multipath control. But the multipath tools will still be included in the
initramfs, allowing users to set up multipathing e.g. on the emergency shell if
necessary. Also, if /etc/multipath/wwids exists, it will be included in the
initramfs and will cause the WWIDs listed in that file to be multipathed.

Note that in multipath-tools upstream and many Linux distributions,
"find_multipaths strict" is the default anyway. Users of distributions with
different defaults (e.g. openSUSE) would just need to create
/etc/multipath.conf (possibly with empty contents) to override this behavior if
they intend to activate multipath in the initramfs.

Fixes: 377d52c ("fix(multipath): omit module if included with no multipath devices")
Fixes: 4957ffa ("fix(multipath): omit module if included with no multipath devices")
22 months agofix(systemd): move installation of libkmod to udev-rules module
Alexander Tsoy [Tue, 16 Jul 2024 05:48:54 +0000 (08:48 +0300)] 
fix(systemd): move installation of libkmod to udev-rules module

libkmod library should be installed even if systemd module is
omitted, so move its installation to udev-rules module.

22 months agodocs: update NEWS.md and AUTHORS for release 103 103
dracutng[bot] [Sat, 13 Jul 2024 13:34:31 +0000 (13:34 +0000)] 
docs: update NEWS.md and AUTHORS for release 103

22 months agotest(DMSQUASH): add test for part of erofs support
Brian C. Lane [Fri, 12 Jul 2024 22:43:12 +0000 (15:43 -0700)] 
test(DMSQUASH): add test for part of erofs support

This adds a test for using erofs on a bare partition by
creating a new disk image, root_erofs, and writing the erofs compressed
/source directory directly to partition 1 and then booting the image
with root=live:/dev/disk/by-label/dracut_erofs

This doesn't quite test the anaconda-dracut use case of calling
dmsquash-live-root with the path of an erofs compressed file, but it is
close enough for now.

22 months agofix(dmsquash-live): make sure erofs module is installed
Brian C. Lane [Fri, 12 Jul 2024 22:41:11 +0000 (15:41 -0700)] 
fix(dmsquash-live): make sure erofs module is installed

22 months agofeat(test): add erofs-utils to the containers
Brian C. Lane [Fri, 12 Jul 2024 14:43:57 +0000 (07:43 -0700)] 
feat(test): add erofs-utils to the containers

22 months agofeat(dmdquash-live): add support for using erofs
Brian C. Lane [Wed, 10 Jul 2024 23:30:09 +0000 (16:30 -0700)] 
feat(dmdquash-live): add support for using erofs

This adds support for rootfs compressed with erofs. Either as a plain
erofs image or a LiveOS/rootfs.img ext4 filesystem compressed with
erofs.

This patch does not make any attempt to change the squashfs directory
naming (or variable names) in order to make these changes as small as
possible and easy to review. It also does not make any attempt to
support the multitude of available options other than what is needed by
anaconda-dracut calling this script to setup the boot.iso root
filesystem.

(which isn't to say it doesn't work, it just hasn't been tested and is
outside the scope of this change).

22 months agofix(test): run test 14 with systemd again
Benjamin Drung [Fri, 12 Jul 2024 08:57:02 +0000 (10:57 +0200)] 
fix(test): run test 14 with systemd again

Commit 061a1068ba4c872e48605b9b0ecd282f4630ea8f ("test: avoid writing to
rootfs as it might be read-only") fixes the test failure with systemd
256. So revert the changes to `test/TEST-14-IMSM` from commit
130f4dfce48b187944be9a0cacca794dd32428ad.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
22 months agoci: run extended tests on openSUSE as well
Laszlo Gombos [Wed, 10 Jul 2024 15:21:51 +0000 (11:21 -0400)] 
ci: run extended tests on openSUSE as well

22 months agotest(FULL-SYSTEM): make sure systemd-pcrphase can be installed
Laszlo Gombos [Tue, 9 Jul 2024 13:34:45 +0000 (09:34 -0400)] 
test(FULL-SYSTEM): make sure systemd-pcrphase can be installed

22 months agotest(FULL-SYSTEMD): remove workaround for multipath
Laszlo Gombos [Wed, 10 Jul 2024 15:20:02 +0000 (11:20 -0400)] 
test(FULL-SYSTEMD): remove workaround for multipath

22 months agofix(multipath): omit module if included with no multipath devices
Laszlo Gombos [Wed, 10 Jul 2024 12:43:31 +0000 (08:43 -0400)] 
fix(multipath): omit module if included with no multipath devices

Follow-up to 4957ffa935. return 255 instead of 1 and change the order
of checks.

22 months agofeat(kernel-modules): install platform/chrome modules on ARM/RISC-V
Alper Nebi Yasak [Tue, 9 Jul 2024 21:21:18 +0000 (00:21 +0300)] 
feat(kernel-modules): install platform/chrome modules on ARM/RISC-V

Most ARM Chromebooks need the ChromiumOS Embedded Controller drivers
located under kernel/drivers/platform/chrome for essential functionality
like keyboard, USB, and display backlight. Add them to the non-hostonly
initramfs by adding them to the ARM/RISC-V-specific instmods call.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
22 months agofix(dracut-install): copy xattr when use clone ioctl
Huaxin Lu [Thu, 20 Jun 2024 05:38:26 +0000 (13:38 +0800)] 
fix(dracut-install): copy xattr when use clone ioctl

When use clone ioctl to copy a file, the extended attributes of files are
missing, which is inconsistent with the result by using the cp command.
This commit add the process to copy extended attributes after clone_file().

Signed-off-by: Huaxin Lu <luhuaxin1@huawei.com>
22 months agofix(Dockerfile-Gentoo): add requirements for systemd-pcrphase
Andrew Ammerlaan [Tue, 9 Jul 2024 06:49:19 +0000 (08:49 +0200)] 
fix(Dockerfile-Gentoo): add requirements for systemd-pcrphase

Closes: https://github.com/dracut-ng/dracut-ng/issues/481
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
22 months agotest(FULL-SYSTEMD): add test with rd.luks.name
Laszlo Gombos [Mon, 8 Jul 2024 13:11:47 +0000 (09:11 -0400)] 
test(FULL-SYSTEMD): add test with rd.luks.name

Arch wiki recommends this configuration and last release regressed
this configuration.

22 months agotest(FULL-SYSTEMD): do not disable kernel loglevel
Laszlo Gombos [Sun, 7 Jul 2024 23:39:49 +0000 (19:39 -0400)] 
test(FULL-SYSTEMD): do not disable kernel loglevel

No other tests sets it to zero by default.

22 months agotest(FULL-SYSTEMD): add tests for volatile mode
Laszlo Gombos [Sun, 7 Jul 2024 23:36:27 +0000 (19:36 -0400)] 
test(FULL-SYSTEMD): add tests for volatile mode

22 months agotest(FULL-SYSTEMD): remove managing drivers manually
Laszlo Gombos [Sun, 7 Jul 2024 23:23:34 +0000 (19:23 -0400)] 
test(FULL-SYSTEMD): remove managing drivers manually

Let the btrfs module manage the btrfs driver.

22 months agotest(FULL-SYSTEMD): align with other tests
Laszlo Gombos [Sun, 7 Jul 2024 20:48:42 +0000 (16:48 -0400)] 
test(FULL-SYSTEMD): align with other tests

22 months agotest(FULL-SYSTEMD): control decryption from command line
Laszlo Gombos [Sun, 7 Jul 2024 20:09:22 +0000 (16:09 -0400)] 
test(FULL-SYSTEMD): control decryption from command line

22 months agotest(FULL-SYSTEMD): no need for explicit bash dependency
Laszlo Gombos [Sun, 7 Jul 2024 20:01:22 +0000 (16:01 -0400)] 
test(FULL-SYSTEMD): no need for explicit bash dependency

22 months agotest(FULL-SYSTEMD): avoid hostonly files for a generic testcase
Laszlo Gombos [Sun, 7 Jul 2024 19:32:16 +0000 (15:32 -0400)] 
test(FULL-SYSTEMD): avoid hostonly files for a generic testcase

22 months agotest(FULL-SYSTEMD): add systemd-coredump for testing
Laszlo Gombos [Sun, 7 Jul 2024 19:19:15 +0000 (15:19 -0400)] 
test(FULL-SYSTEMD): add systemd-coredump for testing

22 months agotest: move /failed to /run/failed as rootfs might be read-only
Laszlo Gombos [Sun, 7 Jul 2024 19:10:43 +0000 (15:10 -0400)] 
test: move /failed to /run/failed as rootfs might be read-only

22 months agofix(dracut-init.sh): clarify the error message
Laszlo Gombos [Sat, 6 Jul 2024 12:29:57 +0000 (08:29 -0400)] 
fix(dracut-init.sh): clarify the error message

Clarify that dracut module is missing and not Linux command or package.

22 months agofix(systemd-pcrphase): make tpm2-tss an optional dependency
Laszlo Gombos [Fri, 5 Jul 2024 18:17:00 +0000 (14:17 -0400)] 
fix(systemd-pcrphase): make tpm2-tss an optional dependency

22 months agofix(multipath): omit module if included with no multipath devices
Laszlo Gombos [Mon, 8 Jul 2024 15:18:01 +0000 (11:18 -0400)] 
fix(multipath): omit module if included with no multipath devices

Instead of warning the user, lets omit the module to follow
'Principle of Least Surprise'.

22 months agofeat(multipath): warn if included with no multipath devices and no user conf
Antonio Alvarez Feijoo [Tue, 29 Nov 2022 14:21:04 +0000 (15:21 +0100)] 
feat(multipath): warn if included with no multipath devices and no user conf

The multipath module is always included in no-hostonly mode, but including it in
the initramfs might activate multipath on the root device, which could be
undesirable. This behavior can be manually fixed by explicitly excluding the
root device from multipath in /etc/multipath.conf.

Therefore, issue a warning in no-hostonly mode, if there is no multipath device
and the user has not configured multipath.

bsc#1069169

Signed-off-by: Martin Wilck <mwilck@suse.de>
Signed-off-by: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
22 months agofix(systemd): check for systemd-vconsole-setup.service
Laszlo Gombos [Thu, 4 Jul 2024 01:56:16 +0000 (21:56 -0400)] 
fix(systemd): check for systemd-vconsole-setup.service

22 months agofix(nfs): support rpcbind user named _rpc
Benjamin Drung [Mon, 8 Jul 2024 14:29:40 +0000 (16:29 +0200)] 
fix(nfs): support rpcbind user named _rpc

The Debian/Ubuntu package `rpcbind` creates a user named `_rpc`. Support
running `rpcbind` with that user. Add a helper function `get_rpc_user`
that derives the desired user from parsing `/etc/passwd`.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
22 months agofeat(dracut-install): configure if weak dep is still not supported in kmod
Jose Ignacio Tornos Martinez [Mon, 8 Jul 2024 11:41:24 +0000 (13:41 +0200)] 
feat(dracut-install): configure if weak dep is still not supported in kmod

The weak dependency feature is new and better be backward compatible.
So check in configure stage if the kmod used includes the weak dependency
feature so as not to include it here and avoid compilation errors.

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
22 months agofeat(dracut-install): add weak dependencies support
Jose Ignacio Tornos Martinez [Mon, 8 Jul 2024 11:06:56 +0000 (13:06 +0200)] 
feat(dracut-install): add weak dependencies support

It has been seen that for some network mac drivers (i.e. lan78xx) the
related module for the phy is loaded dynamically depending on the current
hardware. In this case, the associated phy is read using mdio bus and then
the associated phy module is loaded during runtime (kernel function
phy_request_driver_module). However, no software dependency is defined, so
the user tools will no be able to get this dependency. For example, if
dracut is used and the hardware is present, lan78xx will be included but no
phy module will be added, and in the next restart the device will not work
from boot because no related phy will be found during initramfs stage.

In order to solve this, we could define a normal 'pre' software dependency
in lan78xx module with all the possible phy modules (there may be some),
but proceeding in that way, all the possible phy modules would be loaded
while only one is necessary.

So, a new type of dependency has been created, that we are going to call
'weak' to be used only by the user tools that need to detect this situation.
In that way, for example, dracut could check the 'weak' dependency of the
modules involved in order to install these dependencies in initramfs too.
That is, for the commented lan78xx module, defining the 'weak' dependency
with the possible phy modules list, only the necessary phy would be loaded
on demand keeping the same behavior, but all the possible phy modules would
be available from initramfs.

The 'weak' dependency support has been already included in kmod:
https://github.com/kmod-project/kmod/commit/05828b4a6e9327a63ef94df544a042b5e9ce4fe7
And in kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=modules-next&id=1f3dacc0dcef6681c2acf5890e018012f6b53085
After these, 'weak' dependencies for modules will start to appear.
Read the possible weak dependencies from dracut in order to take them into
account.

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
22 months agoperf(dracut-install): use driver/module sysfs dirs for module name
Alper Nebi Yasak [Mon, 3 Jun 2024 09:12:39 +0000 (12:12 +0300)] 
perf(dracut-install): use driver/module sysfs dirs for module name

To handle fw_devlink suppliers as dependencies, we traverse every device
in /sys and collect a hashmap of module names to their suppliers before
starting module installation work. The module names are found by reading
and passing the "modalias" file to the `kmod_module_new_from_lookup()`
function from libkmod. This function is unexpectedly slow on ARM64
systems with device-tree where this work is primarily necessary.

Usually (but not always), the running kernel has already looked up the
modalias and bound a driver from the associated module. Get module names
by resolving the "driver/module" symbolic link and taking its basename.
If it doesn't exist, fall back to looking up the modalias.

It's possible that multiple modules match the modalias, in which case
others will be ignored in favor of the one already chosen by the kernel.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
22 months agotest: drop 'quiet' from kernel cmdline on verbose runs
Benjamin Drung [Mon, 8 Jul 2024 09:39:06 +0000 (11:39 +0200)] 
test: drop 'quiet' from kernel cmdline on verbose runs

If the test cases are run in verbose with (i.e. with `V=1` or `V=2`
set), do not add `quiet` to the kernel cmdline.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
22 months agofix(net-lib): require and install only the necessary binaries
Antonio Alvarez Feijoo [Mon, 8 Jul 2024 07:17:54 +0000 (09:17 +0200)] 
fix(net-lib): require and install only the necessary binaries

- `pgrep`, `tr` not needed.
- `sed` installed by `base`.

22 months agofeat(lsinitrd.sh): support configurable initrd filenames
Benjamin Drung [Tue, 2 Jul 2024 20:15:57 +0000 (22:15 +0200)] 
feat(lsinitrd.sh): support configurable initrd filenames

The initrd filename can be configured via `initrdname`. Support this
feature also in `lsinitrd` (similar to the code in
`dracut-initramfs-restore.sh`).

Fix: 28820e205328 ("feat(dracut.sh): make initramfs-${kernel}.img filename configurable")
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
22 months agofix: check for searched initrds to be present
Benjamin Drung [Tue, 2 Jul 2024 20:15:41 +0000 (22:15 +0200)] 
fix: check for searched initrds to be present

`find_initrd_for_kernel_version` uses the same search order than
`kernel-install` from systemd v249 [1]. When
`dracut-initramfs-restore.sh` or `lsinitrd.sh` searches for initrds,
they should check the presence of the files instead of assuming them to
be present. Otherwise the search might be stopped before an existing
initrd is found. On Ubuntu 24.10 (oracular) with a mounted `/boot`:

```
$ ls /boot/initr* -alh
lrwxrwxrwx 1 root root  27 Jun 20 15:31 /boot/initrd.img -> initrd.img-6.8.0-31-generic
-rw-r--r-- 1 root root 22M Jun 20 16:27 /boot/initrd.img-6.8.0-31-generic
lrwxrwxrwx 1 root root  27 Jun 20 15:31 /boot/initrd.img.old -> initrd.img-6.8.0-31-generic
$ lsinitrd 2>&1 | head -n1
No <initramfs file> specified and the default image '/boot/efi/6491959c70e6481eae6406d25e250d76/6.8.0-31-generic/initrd' cannot be accessed!
```

[1] https://github.com/systemd/systemd/blob/v249/src/kernel-install/kernel-install

22 months agorefactor: introduce find_initrd_for_kernel_version
Benjamin Drung [Tue, 2 Jul 2024 20:14:40 +0000 (22:14 +0200)] 
refactor: introduce find_initrd_for_kernel_version

Refactor `dracut-initramfs-restore.sh` and `lsinitrd.sh` to introduce a
`find_initrd_for_kernel_version` function to abstract the code. This
commit does not change the logic of the search order.

22 months agofeat(debug): add findmnt to help debugging
Laszlo Gombos [Sat, 6 Jul 2024 18:41:34 +0000 (14:41 -0400)] 
feat(debug): add findmnt to help debugging

Also sorted the list.

22 months agoci: run extended tests on Alpine and Void as well
Laszlo Gombos [Fri, 5 Jul 2024 18:05:11 +0000 (14:05 -0400)] 
ci: run extended tests on Alpine and Void as well

22 months agodocs: remove suggesting that hostonly option is only for experts
Laszlo Gombos [Sat, 6 Jul 2024 12:47:35 +0000 (08:47 -0400)] 
docs: remove suggesting that hostonly option is only for experts

Since some distributions set hostonly the default, suggesting
that it is only for experts is a bit of overstatement.

22 months agotest(TEST-40-NBD): tests should avoid managing kernel modules manually
Laszlo Gombos [Sat, 6 Jul 2024 13:17:09 +0000 (09:17 -0400)] 
test(TEST-40-NBD): tests should avoid managing kernel modules manually

Remove NFS related kernel modules from the NBD test.
Remove networking modules that are installed by kernel-network-modules.

Increase server disk space as now more kernel modules gets installed.

22 months agotest: delete hosts files that are not used by tests
Laszlo Gombos [Thu, 4 Jul 2024 02:53:40 +0000 (22:53 -0400)] 
test: delete hosts files that are not used by tests

CI uses IP addresses for simplicity.

22 months agotest: avoid writing to rootfs as it might be read-only
Laszlo Gombos [Sun, 7 Jul 2024 00:12:33 +0000 (20:12 -0400)] 
test: avoid writing to rootfs as it might be read-only

There is no need to remount rootfs read only right before shutdown.

22 months agotest(FULL-SYSTEMD): remove /etc/fstab from the rootfs
Laszlo Gombos [Sat, 6 Jul 2024 17:53:42 +0000 (13:53 -0400)] 
test(FULL-SYSTEMD): remove /etc/fstab from the rootfs

This PR moves /usr mounting into initrd instead of after
switch_root.

This PR makes the test more generic and allow more testcases.

22 months agotest(FULL-SYSTEMD): add a test for encrypted root
Laszlo Gombos [Sat, 6 Jul 2024 02:11:18 +0000 (22:11 -0400)] 
test(FULL-SYSTEMD): add a test for encrypted root

22 months agotest(FULL-SYSTEMD): include more systemd dracut modules
Laszlo Gombos [Wed, 3 Jul 2024 23:42:07 +0000 (19:42 -0400)] 
test(FULL-SYSTEMD): include more systemd dracut modules

Most of modules added had no test coverage in any of the tests on CI.

22 months agoci: add systemd-coredump to Debian/Ubuntu containers
Laszlo Gombos [Thu, 4 Jul 2024 02:29:16 +0000 (22:29 -0400)] 
ci: add systemd-coredump to Debian/Ubuntu containers

PR to enable testing systemd-coredump module.

22 months agotest: run iscsi and nbd tests sequentially to make it less flaky
Laszlo Gombos [Thu, 4 Jul 2024 12:15:31 +0000 (08:15 -0400)] 
test: run iscsi and nbd tests sequentially to make it less flaky

22 months agodocs: correct shutdown path disucssion
Ian Wienand [Wed, 3 Jul 2024 04:48:28 +0000 (14:48 +1000)] 
docs: correct shutdown path disucssion

Since 4f03054e540427682221e4c62b4d44f79424e38a, these shutdown steps have been
in response to the ExecStop= called from the sysinit.target.

Correct the doc in the two places it mentions this.

22 months agofeat: add common config for Integrity Measurement
Laszlo Gombos [Tue, 2 Jul 2024 17:57:27 +0000 (13:57 -0400)] 
feat: add common config for Integrity Measurement

22 months agotest: do not disable selinux for tests
Laszlo Gombos [Tue, 2 Jul 2024 15:08:36 +0000 (11:08 -0400)] 
test: do not disable selinux for tests

22 months agotest: increase VM memory size to pass test 40 on more VMs
Laszlo Gombos [Wed, 3 Jul 2024 03:12:50 +0000 (23:12 -0400)] 
test: increase VM memory size to pass test 40 on more VMs

22 months agofix: rename dracut.conf.d .conf files to conf.example
Laszlo Gombos [Wed, 3 Jul 2024 01:29:07 +0000 (21:29 -0400)] 
fix: rename dracut.conf.d .conf files to conf.example

Sadly, dracut.conf.d.*.conf files will be also picked up
during CI test runs and there is no trivial way to disable
that, so let's follow the existing .example pattern until
there is a better solution.

22 months agoci: add hmaccalc to the openSUSE CI containers
Laszlo Gombos [Sun, 30 Jun 2024 18:09:27 +0000 (14:09 -0400)] 
ci: add hmaccalc to the openSUSE CI containers

hmaccalc package is needed by the fido dracut module.

22 months agoci: run systemd-networkd and network-legacy tests on Debian as well
Laszlo Gombos [Mon, 1 Jul 2024 20:23:48 +0000 (16:23 -0400)] 
ci: run systemd-networkd and network-legacy tests on Debian as well

Debian CI (v12) not yet compatible with network-manager dracut
module.

22 months agofix(network): deprioritize connman for network selection
Laszlo Gombos [Mon, 1 Jul 2024 18:59:25 +0000 (14:59 -0400)] 
fix(network): deprioritize connman for network selection

Pick network-manager or networkd over connman if network preference
is otherwise not set. All networking tests fail with connman on Arch
currently.

22 months agoci: run network tests on Arch, Gentoo, openSUSE and Ubuntu
Laszlo Gombos [Mon, 1 Jul 2024 13:30:14 +0000 (09:30 -0400)] 
ci: run network tests on Arch, Gentoo, openSUSE and Ubuntu

Exclude test 40 as it is failing, except on Fedora.

22 months agotest: use use --add instead of --modules to create test-makeroot
Laszlo Gombos [Mon, 1 Jul 2024 12:58:31 +0000 (08:58 -0400)] 
test: use use --add instead of --modules to create test-makeroot

Use USE_NETWORK instead of network to be able to control the
network dracut module from outside of the tests.

22 months agotest: re-enable test 30 with default networking
Laszlo Gombos [Mon, 1 Jul 2024 11:42:41 +0000 (07:42 -0400)] 
test: re-enable test 30 with default networking

22 months agoci: run systemd-networkd tests on Ubuntu as well
Laszlo Gombos [Sat, 29 Jun 2024 18:46:25 +0000 (14:46 -0400)] 
ci: run systemd-networkd tests on Ubuntu as well

22 months agofix(dbus-daemon): actually enable the dbus service and socket
BtbN [Sun, 23 Jun 2024 12:14:54 +0000 (14:14 +0200)] 
fix(dbus-daemon): actually enable the dbus service and socket

22 months agoci: no need to set USE_NETWORK for default networking
Laszlo Gombos [Sat, 29 Jun 2024 17:37:23 +0000 (13:37 -0400)] 
ci: no need to set USE_NETWORK for default networking

22 months agotest: use network instead of network-legacy for client instance
Laszlo Gombos [Sat, 29 Jun 2024 16:32:35 +0000 (12:32 -0400)] 
test: use network instead of network-legacy for client instance

22 months agotest: use network instead of network-legacy for server instance
Laszlo Gombos [Sat, 29 Jun 2024 16:22:06 +0000 (12:22 -0400)] 
test: use network instead of network-legacy for server instance

22 months agofeat(hwdb): separate out hwdb module
Laszlo Gombos [Sun, 30 Jun 2024 23:53:44 +0000 (19:53 -0400)] 
feat(hwdb): separate out hwdb module

22 months agotest: virtual hardware watchdog not available on s390x
Laszlo Gombos [Sat, 29 Jun 2024 19:21:02 +0000 (15:21 -0400)] 
test: virtual hardware watchdog not available on s390x

22 months agofix(fips): remove reference to kernel module zlib in fips module
Cameron Baird [Wed, 29 May 2024 22:16:41 +0000 (22:16 +0000)] 
fix(fips): remove reference to kernel module zlib in fips module

Remove reference to kernel module zlib (deprecated in kernel v4.6+) since the
pedantic dracut behavior causes initramfs generation to fail otherwise.

22 months agofix(TEST-35-ISCSI-MULTI): increrase storage space
Laszlo Gombos [Sun, 30 Jun 2024 17:55:39 +0000 (13:55 -0400)] 
fix(TEST-35-ISCSI-MULTI): increrase storage space

More storage is needed as more files gets installed.

22 months agofix(udev-rules): install all rules even if systemd is not installed
Laszlo Gombos [Sun, 30 Jun 2024 15:32:55 +0000 (11:32 -0400)] 
fix(udev-rules): install all rules even if systemd is not installed

22 months agofix(rt): use singular argument for timeout value
Paul Charlton [Sun, 30 Jun 2024 18:37:31 +0000 (01:37 +0700)] 
fix(rt): use singular argument for timeout value

use singular argument for timeout value -- plural values create an invalid cryptsetup command line

Fixes: https://github.com/dracut-ng/dracut-ng/issues/424
Signed-off-by: Paul Charlton <techguru@byiq.com>
22 months agoperf(dracut-install): memoize find_kmod_module_from_sysfs_node
Hector Martin [Sun, 23 Jun 2024 12:24:11 +0000 (21:24 +0900)] 
perf(dracut-install): memoize find_kmod_module_from_sysfs_node

find_kmod_module_from_sysfs_node() is called for every platform device
in the system via find_suppliers(). In turn, this calls
kmod_module_new_from_lookup() for every device modalias. This is an
expensive call that reads the modalias files every single time from
scratch.

On many platforms, there are many identical platform devices (e.g.
multiple serial ports, or dozens or hundreds of power domain devices).
Therefore, it's worth memoizing this so we only perform the expensive
lookup once per unique modalias.

This cuts down dracut generation time on an Apple M1 Pro MacBook Pro
from 26 seconds to 17 seconds, give or take (which is close to the
performance prior to 3de4c7313, which introduced a major regression
which has been incrementally improved in prior commits already).

22 months agofeat(dracut-install): add hashmap_get_exists()
Hector Martin [Sun, 23 Jun 2024 12:23:16 +0000 (21:23 +0900)] 
feat(dracut-install): add hashmap_get_exists()

This variant of hashmap_get() returns whether the item exists, which
allows distinguishing a NULL item from a nonexistent one.