From edd45cfae14ac4a78f8daaf23c315dd40c4bcbb2 Mon Sep 17 00:00:00 2001 From: Coiby Xu Date: Tue, 24 Mar 2026 14:25:25 +0800 Subject: [PATCH] Forward core collector's stdout and stderr to /dev/console MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: RHEL-120489 Conflict: Upstream has dracut-kdump.sh moved to dracut/99kdumpbase/kdump.sh commit cd40be653eeb4dac4d8fead748c8152d9a23936a Author: Sourabh Jain Date: Mon May 19 11:46:16 2025 +0530 Forward core collector's stdout and stderr to /dev/console The default core collector, makedumpfile, has functionality to print the ETA for dump capture. However, due to a limitation/bug in systemd, executing the kdump.sh script via a systemd service does not print the ETA on the console, even though StandardError is set to journal+console. On machines with high memory in the terabyte range, processing the dump takes time. Since makedumpfile’s ETA is not printed on the console while collecting the dump, there have been a few instances where system administrators rebooted the system during dump capture, assuming the system was stuck. Until the systemd service issue [1] is fixed, forward the core collector’s stdout and stderr to /dev/console manually. This will print the ETA for dump capture and let the user know that dump capture is ongoing. [1] https://github.com/systemd/systemd/issues/37994 Signed-off-by: Sourabh Jain Signed-off-by: Coiby Xu --- dracut-kdump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 19afbdb..3ef2b88 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -171,7 +171,7 @@ dump_fs() save_opalcore_fs "$_dump_fs_path" dinfo "saving vmcore" - $CORE_COLLECTOR /proc/vmcore "$_dump_fs_path/vmcore-incomplete" + $CORE_COLLECTOR /proc/vmcore "$_dump_fs_path/vmcore-incomplete" > /dev/console 2>&1 _dump_exitcode=$? if [ $_dump_exitcode -eq 0 ]; then sync -f "$_dump_fs_path/vmcore-incomplete"