kdump-lib: Add the CoreOS kernel dir to the boot_dirlist
Resolves: bz2174836 Upstream: Fedora Conflict: None commit f9c32372d2c8d5e58024d2ddc0b70498c696b5d8 Author: Lichen Liu <lichliu@redhat.com> Date: Tue Jun 21 16:55:09 2022 +0800 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 <lichliu@redhat.com> Acked-by: Coiby Xu <coxu@redhat.com> Signed-off-by: Lichen Liu <lichliu@redhat.com>
This commit is contained in:
parent
1eb996d08f
commit
67f450cc9f
|
@ -649,6 +649,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
|
||||
|
|
Loading…
Reference in New Issue