]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
15 months agofeat(90dm): close crypt devices using cryptsetup
Kamil Szczęk [Sun, 19 May 2024 16:12:52 +0000 (18:12 +0200)] 
feat(90dm): close crypt devices using cryptsetup

This commit changes the behavior of the shutdown script in the 90dm
module to use more specialized tools for removing dm-crypt mappers.
When dealing with a dm-crypt mapper, the shutdown script will try to use
systemd-cryptsetup, cryptsetup or dmsetup, whichever is available in the
specified order. This lets systemd-cryptsetup or cryptsetup perform any
necessary cleanup steps when detaching volumes activated by those tools.

Resolves #204

15 months agotest: no need to include network meta module when network-legacy is included
Laszlo Gombos [Sat, 25 May 2024 16:21:33 +0000 (12:21 -0400)] 
test: no need to include network meta module when network-legacy is included

15 months agotest: only run test 30 with network-legacy as it is unstable otherwise
Laszlo Gombos [Sat, 25 May 2024 16:10:02 +0000 (12:10 -0400)] 
test: only run test 30 with network-legacy as it is unstable otherwise

15 months agotest(RAID-DEG): run the test only with the required modules
Laszlo Gombos [Sat, 25 May 2024 15:51:31 +0000 (11:51 -0400)] 
test(RAID-DEG): run the test only with the required modules

15 months agotest(DRACUT-CPIO): resolve regression
Laszlo Gombos [Sat, 25 May 2024 03:46:33 +0000 (23:46 -0400)] 
test(DRACUT-CPIO): resolve regression

Test regressed on void container after 7ad57d696c451d9f85d612f9aebee52d54dbf1b1.

15 months agotest: only install sfdisk if it is needed to make the root filesystem
Laszlo Gombos [Sat, 25 May 2024 03:11:54 +0000 (23:11 -0400)] 
test: only install sfdisk if it is needed to make the root filesystem

15 months agotest: install mkfs.ext4 in test-makeroot dracut module
Laszlo Gombos [Sat, 25 May 2024 02:56:16 +0000 (22:56 -0400)] 
test: install mkfs.ext4 in test-makeroot dracut module

15 months agotest: add watchdog dracut module for each test run for consistency
Laszlo Gombos [Wed, 22 May 2024 13:11:14 +0000 (09:11 -0400)] 
test: add watchdog dracut module for each test run for consistency

15 months agofeat(pcmcia): factor out pcmcia support into its own module
Laszlo Gombos [Sat, 25 May 2024 13:20:19 +0000 (09:20 -0400)] 
feat(pcmcia): factor out pcmcia support into its own module

15 months agofix(systemd-cryptsetup): add potentially needed modules to generic initrd
Daniel Winzen [Sat, 25 May 2024 15:38:06 +0000 (17:38 +0200)] 
fix(systemd-cryptsetup): add potentially needed modules to generic initrd

15 months agofix(crypt): unlock encrypted devices by default during boot
Daniel Winzen [Sat, 25 May 2024 16:20:12 +0000 (18:20 +0200)] 
fix(crypt): unlock encrypted devices by default during boot

15 months agofix(01systemd-ldconfig): install ldconfig.real
Nick Rosbrook [Thu, 23 May 2024 14:28:14 +0000 (10:28 -0400)] 
fix(01systemd-ldconfig): install ldconfig.real

Also restore enablement of ldconfig.service in TEST-04-FULL-SYSTEMD.

15 months agofix(base): add support for rd.udev.log_level
Laszlo Gombos [Mon, 20 May 2024 02:57:04 +0000 (22:57 -0400)] 
fix(base): add support for rd.udev.log_level

15 months agofix(fips): remove /dev/{random,urandom} pre-creation
Vitaly Kuznetsov [Thu, 23 May 2024 12:20:43 +0000 (14:20 +0200)] 
fix(fips): remove /dev/{random,urandom} pre-creation

Random device nodes were required to workaround libgcrypt initialization
problem (see https://bugzilla.redhat.com/show_bug.cgi?id=1401444) which
is gone since libgcrypt-1.10 (2022): modern Linux kernels (3.17+) support
getrandom() syscall and libgcrypt has switch to using getentropy()
(glibc-2.25+).

The requirement to run dracut as root (which is needed to mknod
/dev/{random,urandom}) is a particular problem for building UKIs in distro
build systems where packages are not built by a privileged user.

Note, dracut itself always pre-creates /dev/{null,kmsg,console,random,urandom}
devices when running privileged so the patch has no effect on 'traditional'
setup.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
15 months agofix(systemd-ask-password): no graphical output in aarch64
Antonio Alvarez Feijoo [Fri, 24 May 2024 11:40:57 +0000 (13:40 +0200)] 
fix(systemd-ask-password): no graphical output in aarch64

A password cannot be entered if there is no graphical output during boot, as is
the case in aarch64, where efifb does not work with qemu-system-aarch64:
- virtio-gpu-pci does not expose a linear framebuffer
- virtio-vga is not supported
- ramfb is not enough

Therefore, depend on the drm module if virtio_gpu is loaded on the system.

15 months agorevert(dracut-install): check the existing file—not the source
Laszlo Gombos [Thu, 23 May 2024 02:16:30 +0000 (22:16 -0400)] 
revert(dracut-install): check the existing file—not the source

This reverts commit 5ac581ef66dd8f1939e771419824137aebbc8f66.

15 months agofix(base): install /etc/udev/udev.conf in hostonly mode only
Laszlo Gombos [Mon, 20 May 2024 04:24:37 +0000 (00:24 -0400)] 
fix(base): install /etc/udev/udev.conf in hostonly mode only

Remove duplicated rule from systemd-udevd.

15 months agofix(base): log the full udev database in rdsosreport
Laszlo Gombos [Mon, 20 May 2024 04:11:02 +0000 (00:11 -0400)] 
fix(base): log the full udev database in rdsosreport

15 months agotest: configure watchdog-action in run-qemu
Laszlo Gombos [Mon, 20 May 2024 03:41:39 +0000 (23:41 -0400)] 
test: configure watchdog-action in run-qemu

15 months agofix(dracut): bsdcpio compatibility
Tomasz Paweł Gajc [Sun, 19 May 2024 22:30:03 +0000 (18:30 -0400)] 
fix(dracut): bsdcpio compatibility

15 months agofix: /etc/modprobe.d --> /run/modprobe.d
Laszlo Gombos [Sun, 19 May 2024 18:58:17 +0000 (14:58 -0400)] 
fix: /etc/modprobe.d --> /run/modprobe.d

Change /etc/modprobe.d path to /run/modprobe.d in hooks.

/etc might be mounted as read-only.

15 months agofix(configure): resolve regression for crosscompiling
Bernhard Rosenkraenzer [Sun, 19 May 2024 17:57:44 +0000 (13:57 -0400)] 
fix(configure): resolve regression for crosscompiling

15 months agoci: add tpm2-tools package to all test containers to test tpm2-tss dracut module
Laszlo Gombos [Sun, 19 May 2024 17:05:25 +0000 (13:05 -0400)] 
ci: add tpm2-tools package to all test containers to test tpm2-tss dracut module

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

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

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

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

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

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

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

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

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

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

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

16 months 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>
16 months agofix: module-setup.sh missing stty
farfalleflickan [Wed, 8 May 2024 11:02:28 +0000 (11:02 +0000)] 
fix: module-setup.sh missing stty

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

16 months 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).

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

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

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

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

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

16 months 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).

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

16 months 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>
16 months 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>
16 months 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).

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

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

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

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

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

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

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

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

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