diff --git a/SOURCES/dracut-module-setup.sh b/SOURCES/dracut-module-setup.sh index 6af8f3b..99685fe 100755 --- a/SOURCES/dracut-module-setup.sh +++ b/SOURCES/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. diff --git a/SOURCES/kdump-lib-initramfs.sh b/SOURCES/kdump-lib-initramfs.sh index 41dc751..6eaec93 100755 --- a/SOURCES/kdump-lib-initramfs.sh +++ b/SOURCES/kdump-lib-initramfs.sh @@ -101,8 +101,15 @@ get_fs_type_from_target() get_mntpoint_from_target() { - # --source is applied to ensure non-bind mount is returned - get_mount_info TARGET source "$1" -f + local SOURCE TARGET + findmnt -k --pairs -o SOURCE,TARGET "$1" | while read line; do + eval "$line" + # omit sources that are bind mounts i.e. they contain a [/path/to/subpath]. + if [[ ! "$SOURCE" =~ \[ ]]; then + echo $TARGET + break + fi + done } is_ssh_dump_target() diff --git a/SOURCES/kdump-lib.sh b/SOURCES/kdump-lib.sh index 1890bb7..37ab75d 100755 --- a/SOURCES/kdump-lib.sh +++ b/SOURCES/kdump-lib.sh @@ -213,7 +213,7 @@ get_bind_mount_source() _fsroot=${_src#${_src_nofsroot}[} _fsroot=${_fsroot%]} - _mnt=$(get_mount_info TARGET source "$_src_nofsroot" -f) + _mnt=$(get_mntpoint_from_target "$_src_nofsroot") # for btrfs, _fsroot will also contain the subvol value as well, strip it if [[ $_fstype == btrfs ]]; then diff --git a/SPECS/kexec-tools.spec b/SPECS/kexec-tools.spec index f67fcb1..9a7b31c 100644 --- a/SPECS/kexec-tools.spec +++ b/SPECS/kexec-tools.spec @@ -5,7 +5,7 @@ Name: kexec-tools Version: 2.0.27 -Release: 8%{?dist}.2 +Release: 8%{?dist}.3 License: GPLv2 Summary: The kexec/kdump userspace component @@ -408,6 +408,10 @@ fi %endif %changelog +* Wed Jul 24 2024 Tao Liu - 2.0.27-8.3 +- lib: Ensure we don't find bind mounts for device target +- dracut: Disable ostree-prepare-root + * Thu Jul 4 2024 Tao Liu - 2.0.27-8.2 - Install the driver of physical device for a SR-IOV virtual device - Try to install PHY and MDIO bus drivers explicitly