Fix kdumpst-load.sh.in with btrfs subvolumes
This commit is contained in:
@ -68,3 +68,7 @@ GRUB_AUTOSET=1
|
|||||||
GRUB_BOOT_FILE="/boot/grub/grub.cfg"
|
GRUB_BOOT_FILE="/boot/grub/grub.cfg"
|
||||||
GRUB_CFG_FILE="/etc/default/grub"
|
GRUB_CFG_FILE="/etc/default/grub"
|
||||||
GRUB_CMDLINE="crashkernel=256M "
|
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=""
|
||||||
|
|||||||
@ -200,7 +200,7 @@ KDUMP_CMDLINE="${KDUMP_CMDLINE} ${KDUMP_APPEND_CMDLINE}"
|
|||||||
# information. If it fails, then attempt prepending /boot into that (faced
|
# information. If it fails, then attempt prepending /boot into that (faced
|
||||||
# both situations in the field so far).
|
# both situations in the field so far).
|
||||||
VMLINUX="$(grep -o 'BOOT_IMAGE=[^ ]*' /proc/cmdline)"
|
VMLINUX="$(grep -o 'BOOT_IMAGE=[^ ]*' /proc/cmdline)"
|
||||||
VMLINUX="${VMLINUX#*BOOT_IMAGE=}"
|
VMLINUX="${VMLINUX#*BOOT_IMAGE=${GRUB_BOOT_IMAGE_PREFIX}}"
|
||||||
if [ ! -s "${VMLINUX}" ]; then
|
if [ ! -s "${VMLINUX}" ]; then
|
||||||
VMLINUX="/boot/${VMLINUX}"
|
VMLINUX="/boot/${VMLINUX}"
|
||||||
if [ ! -s "${VMLINUX}" ]; then
|
if [ ! -s "${VMLINUX}" ]; then
|
||||||
@ -227,3 +227,7 @@ if ! kexec -s -p "${VMLINUX}" --initrd "${INITRD_FNAME}" --append="${KDUMP_CMDLI
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
logger "kdumpst: panic kexec loaded successfully"
|
logger "kdumpst: panic kexec loaded successfully"
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# indent-tabs-mode: t
|
||||||
|
# End:
|
||||||
|
|||||||
Reference in New Issue
Block a user