From f68b45b1c6820960f6c6a84919386c34b58d3048 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Piccoli" Date: Wed, 7 Dec 2022 13:15:34 -0300 Subject: [PATCH] kdump-load/00-default: Comment about some choices to follow Debian Tried here to give a brief reasoning on why we followed Debian; or at least, have it explicitely mentioned in the comments, also mentioning Ubuntu. These parameters make sense since Debian/Ubuntu parameter approach is quite simple, hence mimic'ed here. Signed-off-by: Guilherme G. Piccoli --- 00-default.conf | 2 +- kdump-load.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/00-default.conf b/00-default.conf index 079974a..e426a55 100644 --- a/00-default.conf +++ b/00-default.conf @@ -40,7 +40,7 @@ MNT_TMP="/tmp/.kdump_load.mnt" # If FULL_COREDUMP is !=0, we collect a full compressed vmcore, which might # require a lot of disk space. The MAKEDUMPFILE_*_CMD settings refer to # tunings on makedumpfile - we rely on zstd compression and maximum page -# exclusion for the full vmcore, mimic'ing Debian kdump +# exclusion for the full vmcore, mimic'ing Debian/Ubuntu kdump. FULL_COREDUMP=0 MAKEDUMPFILE_COREDUMP_CMD="-z -d 31" MAKEDUMPFILE_DMESG_CMD="--dump-dmesg" diff --git a/kdump-load.sh b/kdump-load.sh index 83a38aa..e3d5f77 100644 --- a/kdump-load.sh +++ b/kdump-load.sh @@ -159,10 +159,11 @@ fi cleanup_unused_initrd grub_update kdump -# Stolen from Debian kdump +# After some consideration, we've stolen the kdump parameters from +# Debian/Ubuntu implementation, it makes sense for us. 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" + VMLINUX="$(grep -o 'BOOT_IMAGE=[^ ]*' /proc/cmdline)" # In case we don't have a valid initrd, for some reason, try creating