]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
2 years agofix(90kernel-modules): add psmouse for some Fujitsu laptops
Reilly Brogan [Sun, 18 Feb 2024 02:21:09 +0000 (20:21 -0600)] 
fix(90kernel-modules): add psmouse for some Fujitsu laptops

As reported on the Solus issue tracker and on the Arch forum some Fujitsu laptops apparently require the psmouse module to be loaded in order for the keyboard to be functional. At least the Fujitsu Lifebook T938 model laptop is known to require this.

2 years agoci: add rng-tools package to all test containers to test rngd dracut module
Laszlo Gombos [Fri, 17 May 2024 01:34:09 +0000 (21:34 -0400)] 
ci: add rng-tools package to all test containers to test rngd dracut module

2 years agoci: switch to ubuntu-latest
Laszlo Gombos [Wed, 15 May 2024 01:58:34 +0000 (21:58 -0400)] 
ci: switch to ubuntu-latest

All other CI jobs run on ubuntu-latest.

2 years agofeat(90systemd-cryptsetup): socket key files
Kamil Szczęk [Sat, 4 May 2024 17:58:03 +0000 (19:58 +0200)] 
feat(90systemd-cryptsetup): socket key files

systemd v248 introduced support for using AF_UNIX stream sockets as key
files in /etc/crypttab. This commit enhances the 90systemd-cryptsetup
module to identify socket units with matching socket file paths.
It then includes the first matching socket unit along with its
corresponding service unit. This correspondence is determined by
checking the Service= option in the socket unit or, if that's not
available, by replacing the .socket suffix with either @.service or
.service, depending on the Accept= option (see systemd.socket(5)).

Futhermore, this functionality handles sockets located under
/run/cryptsetup-keys.d/, which are automatically discoverable by
the systemd-cryptsetup utility when the key file field in /etc/crypttab
is empty.

2 years agofeat(systemd-pcrphase): include systemd-pcrphase if dependencies are met
Laszlo Gombos [Sun, 28 Apr 2024 19:25:48 +0000 (15:25 -0400)] 
feat(systemd-pcrphase): include systemd-pcrphase if dependencies are met

2 years agoperf(crypt): move more rules to systemd-cryptsetup
Laszlo Gombos [Sat, 4 May 2024 13:00:58 +0000 (09:00 -0400)] 
perf(crypt): move more rules to systemd-cryptsetup

In its current form, fido2, pkcs11, tpm2-tss dracut modules
depend on systemd.

2 years agotest: do not compress, makes the test runs faster
Laszlo Gombos [Sat, 4 May 2024 17:04:08 +0000 (13:04 -0400)] 
test: do not compress, makes the test runs faster

2 years agotest: silence qemu boot output when all we do is prepare the test
Laszlo Gombos [Sat, 4 May 2024 17:21:24 +0000 (13:21 -0400)] 
test: silence qemu boot output when all we do is prepare the test

2 years agotest: silence mkfs output to make test run output more readable
Laszlo Gombos [Sat, 4 May 2024 16:00:33 +0000 (12:00 -0400)] 
test: silence mkfs output to make test run output more readable

2 years agotest: silence dd output to make test run output more readable
Laszlo Gombos [Sat, 4 May 2024 13:08:10 +0000 (09:08 -0400)] 
test: silence dd output to make test run output more readable

2 years agofix: crypt-gpg-lib.sh
farfalleflickan [Tue, 7 May 2024 08:54:20 +0000 (08:54 +0000)] 
fix: crypt-gpg-lib.sh

Moved gpg-connect-agent to earlier in the script

2 years agofix(Dockerfile-Gentoo): pull in virtual/pkgconfig
Andrew Ammerlaan [Wed, 8 May 2024 12:53:31 +0000 (14:53 +0200)] 
fix(Dockerfile-Gentoo): pull in virtual/pkgconfig

Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
2 years agofix: module-setup.sh missing stty
farfalleflickan [Wed, 8 May 2024 11:02:28 +0000 (11:02 +0000)] 
fix: module-setup.sh missing stty

2 years agochore(deps): bump softprops/action-gh-release from 2.0.4 to 2.0.5
dependabot[bot] [Tue, 7 May 2024 20:43:18 +0000 (20:43 +0000)] 
chore(deps): bump softprops/action-gh-release from 2.0.4 to 2.0.5

Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.0.4 to 2.0.5.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.0.4...v2.0.5)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agofix(Dockerfile-Gentoo): add --deep, --autounmask-continue, and depclean
Andrew Ammerlaan [Mon, 6 May 2024 18:11:17 +0000 (20:11 +0200)] 
fix(Dockerfile-Gentoo): add --deep, --autounmask-continue, and depclean

This should help resolving the depgraph when the binhost pkgs require newer
glibc then the docker image provides.

Also remove conflicting --quiet and --verbose, keep only --quiet

Closes: https://github.com/dracut-ng/dracut-ng/issues/282
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
2 years agofix(github): add the recently introduced modules to the labeler
Laszlo Gombos [Sat, 4 May 2024 03:26:16 +0000 (23:26 -0400)] 
fix(github): add the recently introduced modules to the labeler

Add the follolwing labels:
 - systemd-bsod
 - systemd-network-management
 - numlock
 - systemd-cryptsetup

2 years agoperf(systemd): remove duplicate rules
Laszlo Gombos [Sat, 4 May 2024 03:04:52 +0000 (23:04 -0400)] 
perf(systemd): remove duplicate rules

Consolidate systemd-sysctl logic into the systemd-sysctl module.

dracut-systemd module depends indirectly on systemd-sysctl.
(via systemd-initrd --> systemd-udevd --> systemd-sysctl).

2 years agofix(dracut): add support for RISC-V EFI
Valentin David [Fri, 3 May 2024 22:28:55 +0000 (18:28 -0400)] 
fix(dracut): add support for RISC-V EFI

2 years agofeat(ifcfg): minimize s390-specific network configuration aspects
Steffen Maier [Wed, 26 Jul 2023 10:59:19 +0000 (12:59 +0200)] 
feat(ifcfg): minimize s390-specific network configuration aspects

Since consolidated s390 network device configuration with zdev is used,
it takes care of all s390-specific settings.
None of the s390-specific ifcfg variables should be used anymore.
NETTYPE and OPTIONS can be removed entirely.
SUBCHANNELS is kept because there are some dependency chains
(probably around the interface identifiying key, which is not HWADDR):

modules.d/35network-legacy/module-setup.sh
parses (sources) each of /etc/sysconfig/network-scripts/ifcfg-*
and if that contains SUBCHANNELS, creates a symlink from the ifcfg file to
/etc/sysconfig/network-scripts/ccw-${SUBCHANNELS}.conf

modules.d/35network-legacy/ifup.sh installed as /sbin/ifup
checks during team setup if a slave interface is an s390 channel-attached
network interface and then parses (sources)
/etc/sysconfig/network-scripts/ccw-${SUBCHANNELS}.conf
from above, if that file exists

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agorefactor(ifcfg): delete code duplication using iface_get_subchannels()
Steffen Maier [Wed, 26 Jul 2023 10:42:03 +0000 (12:42 +0200)] 
refactor(ifcfg): delete code duplication using iface_get_subchannels()

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agofix(znet): append to udev rules so each rd.znet_ifname is effective
Steffen Maier [Fri, 26 May 2023 17:47:35 +0000 (19:47 +0200)] 
fix(znet): append to udev rules so each rd.znet_ifname is effective

Otherwise the last rd.znet_ifname statement overwrites the persistent
network interface settings of previous such statements.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agofeat(qeth_rules): remove qeth handling consolidated in 95znet
Steffen Maier [Fri, 26 May 2023 17:51:09 +0000 (19:51 +0200)] 
feat(qeth_rules): remove qeth handling consolidated in 95znet

Dracut module 95znet handles a superset of qeth_rules as of the preceding
commit ("feat(znet): use zdev for consolidated device configuration").

The instmods list in installkernel() seemed to have been incomplete because
qeth needs one or both of qeth_l2 and qeth_l3 but qeth intentionally does
not depend on them so depmod cannot resolve that.

In contrast to the old dracut module 95znet, 95qeth_rules also did not seem
to have parsing for the upstream dracut cmdline options "rd.znet=" and
"rd.znet_ifname=".

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agodocs(dracut.cmdline): generalize description of rd.znet
Steffen Maier [Fri, 26 May 2023 17:25:41 +0000 (19:25 +0200)] 
docs(dracut.cmdline): generalize description of rd.znet

As of the preceding commit ("feat(znet): use zdev for consolidated device
configuration"), rd.znet is no longer specific to RHEL/Fedora.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agofeat(znet): use zdev for consolidated device configuration
Steffen Maier [Tue, 25 Jul 2023 17:43:05 +0000 (19:43 +0200)] 
feat(znet): use zdev for consolidated device configuration

Remove any distribution-specifics from s390 channel-attached network device
configuration.

Similar to 95qeth_rules, copy the existing persistent network configuration
into the initrd. This needs to go via chzdev import so chzdev updates (adds
to) the cio_ignore persistent config inside the initrd, because other
dracut modules such as zdev from s390-tools also import
persistent (non-network) config into initrd and the set union of devices
needs to end up in the cio_ignore persistent config inside the initrd.

Additional debugging output can be generated with e.g. dracut option
"--stdlog 5" (or short -L5). It shows the chzdev export result, the output
of chzdev imports, and an overview of the resulting persistent config
within the initrd. Typically combined with "--debug" to get a shell trace
from building an initrd (Note: --debug does not increase the log levels).

Note that nm-initrd-generator also parses rd.znet and rd.znet_ifname
to fill in s390 options of a NetworkManager connection definition.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agofeat(dasd): minimize dasd handling consolidated in s390-tools
Steffen Maier [Thu, 23 Mar 2023 18:33:52 +0000 (19:33 +0100)] 
feat(dasd): minimize dasd handling consolidated in s390-tools

Parsing of rd.dasd is handled by s390-tools zdev dracut module 95zdev as of
https://github.com/ibm-s390-linux/s390-tools/commit/99270236805972544932feab9692ee7122a343b8
("zdev/dracut: add rd.dasd cmdline option handling").

Even though this removes the last implementation of parsing rd.dasd in
dracut, above s390-tools change introduces another implementation of
parsing the exact same rd.dasd syntax. Therefore, it would be good to keep
the documentation in man/dracut.cmdline.7 of dracut as one central place
describing all s390 device types that dracut handles.

For the time being, keep copying /etc/dasd.conf.
The corresponding call to dasd_cio_free is in 95dasd_mod/parse-dasd-mod.sh
and indirectly triggers processing of /etc/dasd.conf even with the typical
cio_ignore kernel boot parameter ignoring most devices.

Preparation for consolidating persistent configuration with zdev.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agofeat(dasd_mod): minimize dasd handling consolidated in s390-tools
Steffen Maier [Thu, 23 Mar 2023 17:22:56 +0000 (18:22 +0100)] 
feat(dasd_mod): minimize dasd handling consolidated in s390-tools

Parsing of rd.dasd is handled by s390-tools zdev dracut module 95zdev as of
https://github.com/ibm-s390-linux/s390-tools/commit/99270236805972544932feab9692ee7122a343b8
("zdev/dracut: add rd.dasd cmdline option handling").

Even though this removes one implementation of parsing rd.dasd in dracut,
above s390-tools change introduces another implementation of parsing the
exact same rd.dasd syntax. Therefore, it would be good to keep the
documentation in man/dracut.cmdline.7 of dracut as one central place
describing all s390 device types that dracut handles.

95dasd/modules-setup.sh copies /etc/dasd.conf from root-fs into initrd.
Retain the call of dasd_cio_free here so /etc/dasd.conf gets processed even
with the typical cio_ignore kernel boot parameter ignoring most devices.

Preparation for consolidating persistent configuration with zdev.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agofeat(dasd_rules): remove dasd handling consolidated in s390-tools
Steffen Maier [Thu, 23 Mar 2023 17:06:23 +0000 (18:06 +0100)] 
feat(dasd_rules): remove dasd handling consolidated in s390-tools

These are handled by s390-tools zdev dracut module 95zdev as of
https://github.com/ibm-s390-linux/s390-tools/commit/99270236805972544932feab9692ee7122a343b8
("zdev/dracut: add rd.dasd cmdline option handling").

Even though this removes one implementation of parsing rd.dasd in dracut,
above s390-tools change introduces another implementation of parsing the
exact same rd.dasd syntax. Therefore, it would be good to keep the
documentation in man/dracut.cmdline.7 of dracut as one central place
describing all s390 device types that dracut handles.

module-setup.sh having copied all udev rules from the root-fs into the
initrd conflicted with s390-tools dracut module zdev-kdump, which
intentionally only activates the dependencies of the kdump target.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agofeat(zfcp): minimize zfcp handling consolidated in s390-tools
Steffen Maier [Tue, 31 Jan 2023 08:14:40 +0000 (09:14 +0100)] 
feat(zfcp): minimize zfcp handling consolidated in s390-tools

Parsing of rd.zfcp is handled by s390-tools zdev dracut module 95zdev as of
https://github.com/ibm-s390-linux/s390-tools/commit/06a30ae529a5d6ad2369ed81da056bf3a6147bb6
("zdev/dracut: add rd.zfcp cmdline option handling").

Even though this removes the last implementation of parsing rd.zfcp in
dracut, above s390-tools change introduces another implementation of
parsing the exact same rd.zfcp syntax. Therefore, it would be good to keep
the documentation in man/dracut.cmdline.7 of dracut as one central place
describing all s390 device types that dracut handles.

For the time being, keep copying /etc/zfcp.conf.
Retain the call of zfcp_cio_free so /etc/zfcp.conf gets processed even
with the typical cio_ignore kernel boot parameter ignoring most devices.
Also keep handling rd.zfcp.conf=0 so users can, at boot time, ignore
/etc/zfcp.conf already copied into initrd.

Preparation for consolidating persistent configuration with zdev.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agofeat(zfcp_rules): remove zfcp handling consolidated in s390-tools
Steffen Maier [Fri, 20 Jan 2023 17:22:19 +0000 (18:22 +0100)] 
feat(zfcp_rules): remove zfcp handling consolidated in s390-tools

These are handled by s390-tools zdev dracut module 95zdev as of
https://github.com/ibm-s390-linux/s390-tools/commit/06a30ae529a5d6ad2369ed81da056bf3a6147bb6
("zdev/dracut: add rd.zfcp cmdline option handling").

Even though this removes one implementation of parsing rd.zfcp in dracut,
above s390-tools change introduces another implementation of parsing the
exact same rd.zfcp syntax. Therefore, it would be good to keep the
documentation in man/dracut.cmdline.7 of dracut as one central place
describing all s390 device types that dracut handles.

This also fixes problems such as RHBZ 1552619/1745470. It was due to a
duplicate configuration because the SUSE-specific module 95zfcp_rules does
not have any distro-specific dependency and thus also ran in Red Hat
distros.

That also caused a kind of competition with 95zfcp regarding the same hook
registration:
    inst_hook cmdline 30 "$moddir/parse-zfcp.sh"
"luckily" 95zfcp wins since it runs lexicographically first
and the first one registering the hook via inst_simple wins.

Because commit c8aa1d949aec ("95zfcp_rules: simplified rd.zfcp commandline
for NPIV") extended the emitted rd.zfcp syntax for hostonly-cmdline in
95zfcp_rules, kdump initrds built with hostonly-cmdline parsed such rd.zfcp
with 95zfcp, which did not understand the extended syntax yet and aborted
early boot with a syntax error.

It also seems that parse-zfcp.sh on its own is without effect because
create_udev_rule() [similar to what zfcp_disk_configure had generated] does
not handle the pre-requisite of setting an FCP device (vHBA) online first.
So the rport match does not trigger unless something else happens to set an
FCP device online [such as rules generated by zfcp_host_configure]. Related
to commit d40c49a8dfe2 ("fix(zfcp_rules): remove collect based udev rule
creators").

module-setup.sh having copied all udev rules from the root-fs into the
initrd conflicted with s390-tools dracut module zdev-kdump, which
intentionally only activates the dependencies of the kdump target.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agorefactor(cms): remove now unnecessary inclusion of full s390utils-base
Steffen Maier [Thu, 8 Feb 2024 17:38:48 +0000 (18:38 +0100)] 
refactor(cms): remove now unnecessary inclusion of full s390utils-base

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agorefactor(cms): use consolidated network config with zdev from s390-tools
Steffen Maier [Wed, 26 Jul 2023 11:50:03 +0000 (13:50 +0200)] 
refactor(cms): use consolidated network config with zdev from s390-tools

This is just internal to initrd, so we can already migrate the code to
consolidated network device configuration with zdev
https://github.com/ibm-s390-linux/s390-tools/tree/master/zdev/.
The code change is transparent to users after dracut switch root.

The generated persistent config of chzdev are pure udev rules so it has no
dependency on the zdev dracut module.

Keep the dependency on dracut module znet to at least pull in the required
kernel device drivers.

Since consolidated s390 network device configuration with zdev is used,
it takes care of all s390-specific settings.
None of the s390-specific ifcfg variables should be used anymore.
NETTYPE, OPTIONS, PORTNAME, and CTCPROT can be removed entirely.
SUBCHANNELS is kept because there are some dependency chains
(probably around the key identifiying an interface which is not HWADDR):

modules.d/35network-legacy/module-setup.sh
parses (sources) each of /etc/sysconfig/network-scripts/ifcfg-*
and if that contains SUBCHANNELS, create a symlink from the ifcfg file to
/etc/sysconfig/network-scripts/ccw-${SUBCHANNELS}.conf

modules.d/35network-legacy/ifup.sh installed as /sbin/ifup
checks during team setup if a slave interface is an s390 channel-attached
network interface and then parses (sources)
/etc/sysconfig/network-scripts/ccw-${SUBCHANNELS}.conf
from above, if that file exists

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agorefactor(cms): use consolidated dasd config with zdev from s390-tools
Steffen Maier [Wed, 24 May 2023 17:04:48 +0000 (19:04 +0200)] 
refactor(cms): use consolidated dasd config with zdev from s390-tools

Depends on https://github.com/ibm-s390-linux/s390-tools commit
9b2fb1d4d2e2 ("zdev: add helper to convert from dasd_mod.dasd to zdev
config").

This is just internal to initrd, so it's possible to migrate the code to
consolidated dasd device configuration with zdev
https://github.com/ibm-s390-linux/s390-tools/tree/master/zdev/.
The code change is transparent to users after dracut switch root.

The generated persistent config of chzdev are pure udev rules so it has no
dependency on other dracut modules such as zdev, dasd, or dasd_mod.
Instead now install the corresponding kernel device drivers here directly.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agorefactor(cms): use consolidated zfcp config with zdev from s390-tools
Steffen Maier [Sat, 28 Jan 2023 00:58:29 +0000 (01:58 +0100)] 
refactor(cms): use consolidated zfcp config with zdev from s390-tools

This is just internal to initrd, so we can already migrate the code to
consolidated zfcp device configuration with zdev
https://github.com/ibm-s390-linux/s390-tools/tree/master/zdev/.
The code change is transparent to users after dracut switch root.

The generated persistent config of chzdev are pure udev rules so it has no
dependency on other dracut modules such as zdev, or zfcp.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agorefactor(cms): use zdev to simplify handling CMSDASD=... boot option
Steffen Maier [Wed, 24 May 2023 17:02:09 +0000 (19:02 +0200)] 
refactor(cms): use zdev to simplify handling CMSDASD=... boot option

This is just internal to initrd, so we can already migrate the code to
consolidated dasd device configuration with zdev
https://github.com/ibm-s390-linux/s390-tools/tree/master/zdev/.
The code change is transparent to users after dracut switch root.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
2 years agofeat(systemd-cryptsetup): new module for systemd-cryptsetup
Laszlo Gombos [Thu, 2 May 2024 01:30:46 +0000 (21:30 -0400)] 
feat(systemd-cryptsetup): new module for systemd-cryptsetup

2 years agotest: turn test-init.sh init default /sbin/init for test-root
Laszlo Gombos [Fri, 3 May 2024 21:54:05 +0000 (17:54 -0400)] 
test: turn test-init.sh init default /sbin/init for test-root

2 years agotest: execute test-init.sh at the end of each test case boot
Laszlo Gombos [Fri, 3 May 2024 13:29:59 +0000 (09:29 -0400)] 
test: execute test-init.sh at the end of each test case boot

2 years agotest: install dracut-dev.sh in test-root module
Laszlo Gombos [Fri, 3 May 2024 12:21:27 +0000 (08:21 -0400)] 
test: install dracut-dev.sh in test-root module

2 years agoperf(systemd): remove duplicate rules
Laszlo Gombos [Fri, 3 May 2024 23:14:58 +0000 (19:14 -0400)] 
perf(systemd): remove duplicate rules

Consolidate systemd-modules-load logic into the systemd-modules-load module.

dracut-systemd module depends indirectly on systemd-modules-load
(via systemd-initrd --> systemd-udevd --> systemd-sysctl --> systemd-modules-load).

2 years agofix(install.d): prevent failure when kernel-install command is not `add`
Andrew Gunnerson [Fri, 3 May 2024 02:12:46 +0000 (22:12 -0400)] 
fix(install.d): prevent failure when kernel-install command is not `add`

PR #195 added `:?` checks to ensure that required variables are set, but
the checks also apply to KERNEL_IMAGE, which isn't present when running
`kernel-install remove <version>`. This commit removes the check from
that variable, similar to what systemd's `90-loadentry.install` does.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2 years agofix(35-network-manager): let the kernel generate a UUID for /etc/machine-id
Andrew Ammerlaan [Fri, 3 May 2024 18:41:13 +0000 (20:41 +0200)] 
fix(35-network-manager): let the kernel generate a UUID for /etc/machine-id

This allows the module to work without systemd.

See-also: https://github.com/dracutdevs/dracut/pull/534
Bug: https://bugs.gentoo.org/677554
Co-authored-by: Mike Gilbert <floppym@gentoo.org>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
2 years agoperf(systemd): remove duplicate rules
Laszlo Gombos [Fri, 3 May 2024 01:02:10 +0000 (21:02 -0400)] 
perf(systemd): remove duplicate rules

Consolidate systemd-udevd logic into the systemd-udevd module.

2 years agofix(memstrack): move the console warning to be a comment
Laszlo Gombos [Fri, 3 May 2024 03:04:11 +0000 (23:04 -0400)] 
fix(memstrack): move the console warning to be a comment

memstrack is debugging tool and it is typically not installed.
the package name procps-ng is distribution specific and confusing
to print out in the console in a non-verbose mode.

2 years agoperf(dracut-systemd): check for systemd binary
Laszlo Gombos [Fri, 3 May 2024 02:42:13 +0000 (22:42 -0400)] 
perf(dracut-systemd): check for systemd binary

dracut-systemd is the "top" level dracut module that pulls in
all the systemd dependent modules.

For non-systemd based distributions this check makes the initrd
generation faster as it skip the processing of systemd-initrd
and systemd-udevd dracut modules.

2 years agotest(NFS): increase virtual disk space to accomodate Ubuntu 24.04
Laszlo Gombos [Thu, 2 May 2024 13:22:40 +0000 (09:22 -0400)] 
test(NFS): increase virtual disk space to accomodate Ubuntu 24.04

Newer distribution versions needs more space.

2 years agotest(UEFI): run it both hostonly and no-hostonly
Laszlo Gombos [Thu, 2 May 2024 14:08:57 +0000 (10:08 -0400)] 
test(UEFI): run it both hostonly and no-hostonly

2 years agofix(systemd-ask-password): resolve regression
Laszlo Gombos [Thu, 2 May 2024 23:29:25 +0000 (19:29 -0400)] 
fix(systemd-ask-password): resolve regression

Follow-up to 6c5520dff67a63df4ee735ab4f618d3faaf869d9

2 years agoperf(systemd): remove duplicate rules
Laszlo Gombos [Thu, 2 May 2024 01:09:16 +0000 (21:09 -0400)] 
perf(systemd): remove duplicate rules

Since systemd-initrd module depends on
systemd-journald and systemd-tmpfiles directly, they will be
always pulled in by systemd-initrd module, so it should not be repeated
by the systemd module.

2 years agotest(UEFI): add support for OVMF_CODE_4M.fd for Ubuntu 24.04
Laszlo Gombos [Thu, 2 May 2024 00:35:19 +0000 (20:35 -0400)] 
test(UEFI): add support for OVMF_CODE_4M.fd for Ubuntu 24.04

2 years agoci: add systemd-boot-efi package to Ubuntu container for UEFI stub
Laszlo Gombos [Wed, 1 May 2024 14:00:12 +0000 (10:00 -0400)] 
ci: add systemd-boot-efi package to Ubuntu container for UEFI stub

Without this package UEFI test would fail with the following error

dracut[F]: Can't find a uefi stub '/usr/lib/systemd/boot/efi/linuxx64.efi.stub' \
to create a UEFI executable

2 years agofix(iscsi): do not add host's runtime iscsi configure files in initrd
Wenchao Hao [Fri, 6 May 2022 13:13:58 +0000 (21:13 +0800)] 
fix(iscsi): do not add host's runtime iscsi configure files in initrd

module-setup would add user defined configure in initrd which including
ifaces, nodes and send_targets database like following:

root@testmachine # lsinitrd /boot/initramfs-5.14.10-300.fc35.x86_64.img | grep iscsi
Arguments:  --add 'iscsi' -f
iscsi
drwxr-xr-x   5 root  root     0 May  8 23:09 etc/iscsi
drwxr-xr-x   2 root  root     0 May  8 23:09 etc/iscsi/ifaces
-rw-r--r--   1 root  root  6176 Apr 12 02:05 etc/iscsi/ifaces/iface.example
-rw-------   1 root  root   431 May  8 23:09 etc/iscsi/ifaces/test
-rw-r--r--   1 root  root    43 Apr 22 16:32 etc/iscsi/initiatorname.iscsi
-rw-r--r--   1 root  root 13737 Apr 12 02:05 etc/iscsi/iscsid.conf
drwxr-xr-x   3 root  root     0 May  8 23:09 etc/iscsi/nodes
drwxr-xr-x   3 root  root     0 May  8 23:09 etc/iscsi/nodes/iqn.1994-05.com.redhat:e1d3c4cb3d4
drwxr-xr-x   2 root  root     0 May  8 23:09 etc/iscsi/nodes/iqn.1994-05.com.redhat:e1d3c4cb3d4/192.168.1.12,3260,1
-rw-------   1 root  root  2179 May  6 22:45 etc/iscsi/nodes/iqn.1994-05.com.redhat:e1d3c4cb3d4/192.168.1.12,3260,1/default
drwxr-xr-x   5 root  root     0 May  8 23:09 etc/iscsi/send_targets
drwxr-xr-x   2 root  root     0 May  8 23:09 etc/iscsi/send_targets/192.168.1.12,3260
-rw-------   1 root  root   578 May  6 22:45 etc/iscsi/send_targets/192.168.1.12,3260/st_config
drwxr-xr-x   2 root  root     0 May  8 23:09 etc/iscsi/send_targets/192.168.1.15,3260
-rw-------   1 root  root   578 Apr 22 16:36 etc/iscsi/send_targets/192.168.1.15,3260/st_config
drwxr-xr-x   2 root  root     0 May  8 23:09 etc/iscsi/send_targets/192.168.1.3,3260
-rw-------   1 root  root   577 Apr 12 02:05 etc/iscsi/send_targets/192.168.1.3,3260/st_config

These files should not be added in initrd. For eaxmple:

iscsiadm thought userdefined ifaces's priority is higher than
default, so it would use these userdefined ifaces to perform discovery
and login. While these ifaces configure might bound to specific network
interface, if the bound interface is not inited durning boot in initrd,
the discovery would failed.

What's more, the send_targets db contains configure of AUTH like
authmethod and passwd, these configures should be configured by user's
cmdline.

So here we do not added these files in initrd any more to address this
issue.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
2 years agofix(systemd-initrd): systemd based initrd needs journald and tmpfiles
Laszlo Gombos [Fri, 26 Apr 2024 12:30:14 +0000 (08:30 -0400)] 
fix(systemd-initrd): systemd based initrd needs journald and tmpfiles

Add systemd-journald systemd-tmpfiles as explicit dependencies to
systemd-initrd.

2 years agotest: update all tests to build initrd with test_dracut
Laszlo Gombos [Fri, 26 Apr 2024 21:29:31 +0000 (17:29 -0400)] 
test: update all tests to build initrd with test_dracut

2 years agofix(systemd-networkd): drop networkctl as it has a dependency on dbus
Laszlo Gombos [Wed, 24 Apr 2024 11:34:48 +0000 (07:34 -0400)] 
fix(systemd-networkd): drop networkctl as it has a dependency on dbus

2 years agoperf(systemd): remove duplicate rules
Laszlo Gombos [Fri, 26 Apr 2024 12:45:17 +0000 (08:45 -0400)] 
perf(systemd): remove duplicate rules

Remove duplicated systemd-ask-password rules from the systemd dracut
module. systemd-ask-password gets already pulled in by dracut-systemd
as a dependency.

2 years agotest(FULL-SYSTEMD): remove ldconfig.service from the target rootfs
Laszlo Gombos [Fri, 26 Apr 2024 13:36:45 +0000 (09:36 -0400)] 
test(FULL-SYSTEMD): remove ldconfig.service from the target rootfs

This change makes sure that ldconfig.service is not included in the
target rootfs that the test case is booting into.

2 years agofix(numlock): use the same shebang as other dracut modules
Laszlo Gombos [Wed, 24 Apr 2024 22:07:29 +0000 (18:07 -0400)] 
fix(numlock): use the same shebang as other dracut modules

2 years agofix(dracut-systemd): include systemd-ask-password module
Laszlo Gombos [Wed, 24 Apr 2024 13:03:03 +0000 (09:03 -0400)] 
fix(dracut-systemd): include systemd-ask-password module

rd.cmdline=ask requires systemd-ask-password dracut module.

2 years agofix(numlock): use the same shebang as other dracut modules
Laszlo Gombos [Wed, 24 Apr 2024 11:40:00 +0000 (07:40 -0400)] 
fix(numlock): use the same shebang as other dracut modules

2 years agofix: network-manager should include kernel-network-modules
Laszlo Gombos [Tue, 23 Apr 2024 02:38:15 +0000 (22:38 -0400)] 
fix: network-manager should include kernel-network-modules

The systemd-networkd module already includes kernel-network-modules.
Do the same for other networking related dracut modules.

2 years agofix: clean Makefile rule
Laszlo Gombos [Tue, 23 Apr 2024 01:27:31 +0000 (21:27 -0400)] 
fix: clean Makefile rule

dracut.html is now checked in, 'make clean' should no longer remove it

2 years agofix(cpio): eliminate compile time warning
Laszlo Gombos [Mon, 22 Apr 2024 12:08:41 +0000 (08:08 -0400)] 
fix(cpio): eliminate compile time warning

run `cargo fix --bin "dracut-cpio"`

the type `Path` does not implement `Clone`, so calling
`clone` on `&Path` copies the reference,
which does not do anything and can be removed.

2 years agoci: add (back) extended to the run the extended testsuite
Laszlo Gombos [Mon, 22 Apr 2024 11:36:09 +0000 (07:36 -0400)] 
ci: add (back) extended to the run the extended testsuite

2 years agodocs: remove incomplete and distribution specific information
Laszlo Gombos [Sun, 21 Apr 2024 00:04:19 +0000 (20:04 -0400)] 
docs: remove incomplete and distribution specific information

Incorporate README.generic into man/dracut.usage.asc.

2 years agofix(multipath): explicitly check if `hostonly_cmdline` is `yes`
Antonio Alvarez Feijoo [Fri, 16 Jun 2023 14:28:26 +0000 (16:28 +0200)] 
fix(multipath): explicitly check if `hostonly_cmdline` is `yes`

`hostonly_cmdline` can be `no`, so the current check is invalid.

2 years agofix(dmsquash-live): do not check ISO md5 if image filesystem
Federico Vaga [Wed, 20 Dec 2023 11:02:15 +0000 (12:02 +0100)] 
fix(dmsquash-live): do not check ISO md5 if image filesystem

The ISO checksum code was executed independently of the provided
`$livedev`. Often, this is a loop device pointing to an ISO image, but
in other cases `dmsquash-live-root` receives the path to a filesystem
image. In this case, we can't use `udevadm` to extract information
because it is not a device, and trying to do that leads to `udevadm`
error messages (but not blocking).

Therefore, the ISO checksum check must be performed only if the provided
`$livedev` is **not** a regular file.

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
2 years agofix(dmsquash-live): use load_fstype to load driver for filesystems
Federico Vaga [Tue, 19 Dec 2023 22:55:38 +0000 (23:55 +0100)] 
fix(dmsquash-live): use load_fstype to load driver for filesystems

Looking for directories in `/sys/fs` is not exhaustive. Not all available
filesystems are listed there.

A library function has been already developed for such a use case. It is
`load_fstype``.

This patch replaces custom code with a call to `load_fstype`

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
2 years agotest(ISCSI-MULTI): make use of test dracut modules
Laszlo Gombos [Tue, 23 Apr 2024 11:43:18 +0000 (07:43 -0400)] 
test(ISCSI-MULTI): make use of test dracut modules

Switch over ISCSI-MULTI to run on systemd-networkd on the CI
to have more tests coverage for systemd-networkd.

The test itself is not specific to systemd-networkd (as before).

2 years agotest(UEFI): remove duplicated functions
Laszlo Gombos [Tue, 23 Apr 2024 11:24:09 +0000 (07:24 -0400)] 
test(UEFI): remove duplicated functions

2 years agotest: iscsiuio.socket is required to run the ISCSI tests
Laszlo Gombos [Tue, 23 Apr 2024 11:13:04 +0000 (07:13 -0400)] 
test: iscsiuio.socket is required to run the ISCSI tests

2 years agotest: do not double-include ping from test-root
Laszlo Gombos [Tue, 23 Apr 2024 02:22:28 +0000 (22:22 -0400)] 
test: do not double-include ping from test-root

2 years agotest: do not double-include drivers from test-makeroot
Laszlo Gombos [Tue, 23 Apr 2024 02:03:40 +0000 (22:03 -0400)] 
test: do not double-include drivers from test-makeroot

2 years agotest(NBD): make use of test dracut modules
Laszlo Gombos [Mon, 22 Apr 2024 23:01:00 +0000 (19:01 -0400)] 
test(NBD): make use of test dracut modules

2 years agotest: simplify code by removing unused variables
Laszlo Gombos [Mon, 22 Apr 2024 21:50:04 +0000 (17:50 -0400)] 
test: simplify code by removing unused variables

2 years agotest(DRACUT-CPIO): switch to test dracut module for consistency
Laszlo Gombos [Mon, 22 Apr 2024 14:22:57 +0000 (10:22 -0400)] 
test(DRACUT-CPIO): switch to test dracut module for consistency

2 years agotest(UEFI): remove support for gummiboot as it is not longer working
Laszlo Gombos [Mon, 22 Apr 2024 14:20:01 +0000 (10:20 -0400)] 
test(UEFI): remove support for gummiboot as it is not longer working

2 years agofix(systemd-networkd): dbus is not a mandatory dependency
Laszlo Gombos [Sun, 21 Apr 2024 11:30:27 +0000 (07:30 -0400)] 
fix(systemd-networkd): dbus is not a mandatory dependency

2 years agoci: add more packages to Debian and Ubuntu container to enable more testing
Laszlo Gombos [Tue, 23 Apr 2024 11:08:29 +0000 (07:08 -0400)] 
ci: add more packages to Debian and Ubuntu container to enable more testing

2 years agoci: add more packages to the Void container to enable more testing
Laszlo Gombos [Tue, 23 Apr 2024 01:24:56 +0000 (21:24 -0400)] 
ci: add more packages to the Void container to enable more testing

The newly added packages are all present in the Arch container.

2 years agofeat(numlock): add module to turn Num Lock on
Manuel Fombuena [Mon, 22 Apr 2024 20:50:33 +0000 (21:50 +0100)] 
feat(numlock): add module to turn Num Lock on

This module adds setleds and a shell script to turn Num Lock on.

Useful when you have to type a  password or a PIN to unlock a volume.

2 years agoci: add Fedora on arm64 to the integration tests
Laszlo Gombos [Sun, 21 Apr 2024 14:10:02 +0000 (10:10 -0400)] 
ci: add Fedora on arm64 to the integration tests

2 years agoci: multiplatform container needs to be built as one step
Laszlo Gombos [Sun, 21 Apr 2024 11:44:04 +0000 (07:44 -0400)] 
ci: multiplatform container needs to be built as one step

2 years agoci: enable Fedora for arm64
Laszlo Gombos [Sun, 21 Apr 2024 02:10:26 +0000 (22:10 -0400)] 
ci: enable Fedora for arm64

biosdevname is not available on arm64, remove it form
the container as it is not essential for testing.

install qemu instead of qemu-system-x86-core.

2 years agoci: do not use qemu step for amd64 containers to improve performance
Laszlo Gombos [Sun, 21 Apr 2024 01:53:48 +0000 (21:53 -0400)] 
ci: do not use qemu step for amd64 containers to improve performance

2 years agofix(dracut-init.sh): force to perform the actual action
Laszlo Gombos [Sun, 14 Apr 2024 13:27:38 +0000 (09:27 -0400)] 
fix(dracut-init.sh): force to perform the actual action

2 years agoperf(systemd-udevd): remove duplicate rules
Laszlo Gombos [Thu, 18 Apr 2024 14:01:18 +0000 (10:01 -0400)] 
perf(systemd-udevd): remove duplicate rules

During a typical systemd-enabled initrd generation both udev-rules
and systemd-udevd gets installed. This leads to duplicate file copying,
that can be easily avoided just by removing the duplicate rules.

The performance benefit of this PR is negligent. More importantly
this PR makes it easier to read, reason and maintain the code.

2 years agofix(systemd-initrd): only included if another module depends on it
Laszlo Gombos [Sat, 20 Apr 2024 17:23:10 +0000 (13:23 -0400)] 
fix(systemd-initrd): only included if another module depends on it

2 years agofix(systemd-initrd): add systemd-udevd dependency
Laszlo Gombos [Wed, 17 Apr 2024 00:07:32 +0000 (20:07 -0400)] 
fix(systemd-initrd): add systemd-udevd dependency

2 years agofix(systemd-udevd): add systemd-sysctl dependency
Laszlo Gombos [Tue, 16 Apr 2024 23:50:15 +0000 (19:50 -0400)] 
fix(systemd-udevd): add systemd-sysctl dependency

99-systemd.rules depends on systemd-sysctl

2 years agofix(crypt): add systemd-ask-password dependency if systemd is used
Laszlo Gombos [Tue, 16 Apr 2024 19:17:47 +0000 (15:17 -0400)] 
fix(crypt): add systemd-ask-password dependency if systemd is used

2 years agofix(systemd-journald): add systemd dependency
Laszlo Gombos [Tue, 16 Apr 2024 19:12:53 +0000 (15:12 -0400)] 
fix(systemd-journald): add systemd dependency

2 years agofeat(systemd-bsod): dracut module for systemd-bsod
Laszlo Gombos [Sun, 14 Apr 2024 18:21:23 +0000 (14:21 -0400)] 
feat(systemd-bsod): dracut module for systemd-bsod

2 years agofix(dracut-fuctions.sh): correct wrong regex pattern for LVM dm devices
Antonio Alvarez Feijoo [Wed, 16 Nov 2022 13:48:25 +0000 (14:48 +0100)] 
fix(dracut-fuctions.sh): correct wrong regex pattern for LVM dm devices

The regex pattern to detect LVM device-mapper devices used in `check_vol_slaves`
and `check_vol_slaves_all` is incorrect, as it matches any occurrence of the LVM
string within dm/uuid, not just at the beggining.

A similar check is correctly implemented in `lvm_internal_dev`, so this patch
creates a new `get_lvm_dm_dev` function using it to avoid duplicate code.

Fixes issue #1149

2 years agotest: switch to virtio for the QEMU drive
Laszlo Gombos [Sat, 20 Apr 2024 16:07:28 +0000 (12:07 -0400)] 
test: switch to virtio for the QEMU drive

2 years agoci: install rust into each CI container
Laszlo Gombos [Sat, 20 Apr 2024 16:12:39 +0000 (12:12 -0400)] 
ci: install rust into each CI container

Enabled to test dracut-cpio on all CI Linux distribution.

2 years agoci: make checkout faster and fix concurrency rules
Laszlo Gombos [Sat, 20 Apr 2024 13:26:44 +0000 (09:26 -0400)] 
ci: make checkout faster and fix concurrency rules

2 years agoci: run GETARG test on arm64
Laszlo Gombos [Sat, 20 Apr 2024 03:07:40 +0000 (23:07 -0400)] 
ci: run GETARG test on arm64

This is an easy test to start with as it does not require a VM.

Only set CPU to IvyBridge-v2 for AMD64.

2 years agotest: switch to virtio for the QEMU drive
Laszlo Gombos [Fri, 19 Apr 2024 02:52:47 +0000 (22:52 -0400)] 
test: switch to virtio for the QEMU drive

2 years agotest(LVM-THIN): make test 17 use the test dracut modules
Laszlo Gombos [Thu, 18 Apr 2024 13:39:36 +0000 (09:39 -0400)] 
test(LVM-THIN): make test 17 use the test dracut modules

2 years agotest(ENC-RAID-LVM): make test 13 use the test dracut modules
Laszlo Gombos [Tue, 16 Apr 2024 01:00:20 +0000 (21:00 -0400)] 
test(ENC-RAID-LVM): make test 13 use the test dracut modules