kdump-load/config: Add config option to override custom kdump kernel cmdline

Also document a bit better why some parameters are added and why
we remove huge pages parameters, for example.

Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
This commit is contained in:
Guilherme G. Piccoli
2023-01-19 10:58:09 -03:00
parent dc4e6b964c
commit 90b30b6d5d
2 changed files with 11 additions and 4 deletions

View File

@ -177,10 +177,11 @@ fi
cleanup_unused_initrd
grub_update kdump
# After some consideration, we've stolen the kdump parameters from
# Debian/Ubuntu implementation, it makes sense for us.
# The kdump kernel command-line has some parameters appended, check
# the configuration files in order to change that. We also remove huge
# pages settings here (and crashkernel reservation), to save memory on kdump.
KDUMP_CMDLINE=$(sed -re 's/(^| )(crashkernel|hugepages|hugepagesz)=[^ ]*//g;s/"/\\\\"/' /proc/cmdline)
KDUMP_CMDLINE="${KDUMP_CMDLINE} panic=-1 oops=panic fsck.mode=force fsck.repair=yes nr_cpus=1 reset_devices"
KDUMP_CMDLINE="${KDUMP_CMDLINE} ${KDUMP_APPEND_CMDLINE}"
# To obtain the vmlinux binary path, try first using directly the command-line
# information. If it fails, then attempt prepending /boot into that (faced