From 1d757f451fa0b8510091233574d2c012afbc4d91 Mon Sep 17 00:00:00 2001 From: jbtrystram Date: Thu, 8 Feb 2024 11:52:26 +0100 Subject: [PATCH] 05core: skip sysroot.mount for remote kdump If kdump is setup to upload logs to a remote host, the XFS module may not be loaded, which cause sysroot.mount to fail. If the target for logs is SSH, kdump will boot with a `kdump_remote_ip` karg. Skip generating sysroot.mount in that case so kdump can boot without having to load XFS. This is a temporary fix until we migrate older systems to have a root karg: https://github.com/coreos/fedora-coreos-tracker/issues/1675 See https://issues.redhat.com/browse/OCPBUGS-27935 --- .../modules.d/35coreos-ignition/coreos-diskful-generator | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-diskful-generator b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-diskful-generator index 51d61cbc30..0bee1e6b63 100755 --- a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-diskful-generator +++ b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-diskful-generator @@ -66,7 +66,11 @@ mkdir -p ${UNIT_DIR} # We want to generate sysroot.mount on ostree systems, but we don't want # to run if there's already a root= karg, where the systemd-fstab-generator # should win. -if test -n "$(cmdline_arg ostree)" && test -z "$(cmdline_arg root)"; then +# We also don't want to generate sysroot.mount if we are booting a kdump kernel +# that aims to upload logs to a remote target, as the XFS kernel module won't be loaded +# https://issues.redhat.com/browse/OCPBUGS-27935 +# FIXME: this kdump case should be removed when we are done with https://github.com/coreos/fedora-coreos-tracker/issues/1675 +if test -n "$(cmdline_arg ostree)" && test -z "$(cmdline_arg root)" && test -z "$(cmdline_arg kdump_remote_ip)"; then cat >${UNIT_DIR}/sysroot.mount << 'EOF' [Unit] Before=initrd-root-fs.target