Currently it's difficult to check whether a makedumpfile command-line is valid or not without a dump test. This is inefficient and if a wrong configuration is not tested, you will miss the vmcore when a panic occurs.
In order to check it when generating initramfs, use makedumpfile --check-params option, which was recently added.
With this patchset, kdumpctl can point out mistakes in core_collector option and fail. For example, if there is a practical mistake that dump_level is -1:
# cat /etc/kdump.conf core_collector makedumpfile -l --message-level 1 -d -1
# kdumpctl start Detected change(s) in the following file(s):
/etc/kdump.conf Rebuilding /boot/initramfs-5.4.19-200.fc31.x86_64kdump.img Dump_level(-1) is invalid. makedumpfile parameter check failed. mkdumprd: failed to make kdump initrd Starting kdump: [FAILED]
Kazuhito Hagio (2): makedumpfile: Introduce --check-params option mkdumprd: Use makedumpfile --check-params option
...mpfile-Introduce-check-params-option.patch | 255 ++++++++++++++++++ kexec-tools.spec | 2 + mkdumprd | 24 +- 3 files changed, 275 insertions(+), 6 deletions(-) create mode 100644 kexec-tools-2.0.20-makedumpfile-Introduce-check-params-option.patch