Fix kdumpst-load.sh.in with btrfs subvolumes

This commit is contained in:
2026-02-19 22:04:58 -08:00
parent 782d912471
commit 84d682ea8c
2 changed files with 9 additions and 1 deletions

View File

@ -68,3 +68,7 @@ GRUB_AUTOSET=1
GRUB_BOOT_FILE="/boot/grub/grub.cfg"
GRUB_CFG_FILE="/etc/default/grub"
GRUB_CMDLINE="crashkernel=256M "
# If the BOOT_IMAGE kernel command line parameter begins with this, it will be
# removed. For example, if you use btrfs and have a root sub-volume called "@",
# set this to "/@"
GRUB_BOOT_IMAGE_PREFIX=""

View File

@ -200,7 +200,7 @@ KDUMP_CMDLINE="${KDUMP_CMDLINE} ${KDUMP_APPEND_CMDLINE}"
# information. If it fails, then attempt prepending /boot into that (faced
# both situations in the field so far).
VMLINUX="$(grep -o 'BOOT_IMAGE=[^ ]*' /proc/cmdline)"
VMLINUX="${VMLINUX#*BOOT_IMAGE=}"
VMLINUX="${VMLINUX#*BOOT_IMAGE=${GRUB_BOOT_IMAGE_PREFIX}}"
if [ ! -s "${VMLINUX}" ]; then
VMLINUX="/boot/${VMLINUX}"
if [ ! -s "${VMLINUX}" ]; then
@ -227,3 +227,7 @@ if ! kexec -s -p "${VMLINUX}" --initrd "${INITRD_FNAME}" --append="${KDUMP_CMDLI
exit 1
fi
logger "kdumpst: panic kexec loaded successfully"
# Local Variables:
# indent-tabs-mode: t
# End: