From be56205d06d05ce7d1d6313cf5141a34bec597e2 Mon Sep 17 00:00:00 2001 From: Lichen Liu Date: Jul 24 2024 03:42:33 +0000 Subject: dracut: Disable ostree-prepare-root Resolves: RHEL-35885 commit 42cdc05a8c99a2c0834377faca04b583404cb86f Author: Colin Walters Date: Fri Jul 19 14:23:39 2024 -0400 dracut: Disable ostree-prepare-root In some images such as the recent fedora/rhel bootc base image, the ostree dracut module is statically enabled: https://gitlab.com/fedora/bootc/base-images/-/blob/40df0eb3827763039e4d17264968e37f850b70e5/tier-0/initramfs.yaml#L9 And also recently, we changed the ostree systemd unit to enter emergency.target if it fails in: https://github.com/ostreedev/ostree/pull/3220/commits/05b3b662756def30026fc722d0832a24a33d9803 These two things combine mean we'll fail before kdump gets a chance to run. For our use case we don't need ostree in the initrd. I tried to override this with `--omit=ostree` in our dracut invocation, but that causes an error (dracut doesn't let the cmdline override static config). For now, let's just mask the service in our initrd. Signed-off-by: Lichen Liu --- diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 6af8f3b..99685fe 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -1088,6 +1088,9 @@ install() { # Also redirect dracut-emergency to kdump error handler ln_r "$systemdsystemunitdir/emergency.service" "$systemdsystemunitdir/dracut-emergency.service" + # Disable ostree as we only need the physical root + systemctl -q --root "$initdir" mask ostree-prepare-root.service + # Check for all the devices and if any device is iscsi, bring up iscsi # target. Ideally all this should be pushed into dracut iscsi module # at some point of time.