From ed9cbec2ee263b181ea0023c60b392c37c20071b Mon Sep 17 00:00:00 2001 From: Lichen Liu Date: Tue, 21 Jun 2022 16:55:09 +0800 Subject: [PATCH] kdump-lib: Add the CoreOS kernel dir to the boot_dirlist The kernel of CoreOS is not in the standard locations, add /boot/ostree/* to the boot_dirlist to find the vmlinuz. Signed-off-by: Lichen Liu Acked-by: Coiby Xu --- kdump-lib.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kdump-lib.sh b/kdump-lib.sh index 1c1dcea..f7b659e 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -644,6 +644,11 @@ prepare_kdump_kernel() boot_dirlist=${KDUMP_BOOTDIR:-"/boot /boot/efi /efi /"} boot_imglist="$KDUMP_IMG-$kdump_kernelver$KDUMP_IMG_EXT $machine_id/$kdump_kernelver/$KDUMP_IMG" + # The kernel of OSTree based systems is not in the standard locations. + if is_ostree; then + boot_dirlist="$(echo /boot/ostree/*) $boot_dirlist" + fi + # Use BOOT_IMAGE as reference if possible, strip the GRUB root device prefix in (hd0,gpt1) format boot_img="$(grep -P -o '^BOOT_IMAGE=(\S+)' /proc/cmdline | sed "s/^BOOT_IMAGE=\((\S*)\)\?\(\S*\)/\2/")" if [[ "$boot_img" == *"$kdump_kernelver" ]]; then