diff --git a/dracut-early-kdump.sh b/dracut-early-kdump.sh index 23bb369..a4e14a4 100755 --- a/dracut-early-kdump.sh +++ b/dracut-early-kdump.sh @@ -53,6 +53,9 @@ early_kdump_load() EARLY_KEXEC_ARGS="$EARLY_KEXEC_ARGS -s" fi + # Here, only output the messages, but do not save these messages + # to a file because the target disk may not be mounted yet, the + # earlykdump is too early. ddebug "earlykdump: $KEXEC ${EARLY_KEXEC_ARGS} $standard_kexec_args \ --command-line=$EARLY_KDUMP_CMDLINE --initrd=$EARLY_KDUMP_INITRD \ $EARLY_KDUMP_KERNEL" diff --git a/kdumpctl b/kdumpctl index e816719..94e4f5a 100755 --- a/kdumpctl +++ b/kdumpctl @@ -719,6 +719,10 @@ load_kdump() ddebug "$KEXEC $KEXEC_ARGS $standard_kexec_args --command-line=$KDUMP_COMMANDLINE --initrd=$TARGET_INITRD $KDUMP_KERNEL" + # The '12' represents an intermediate temporary file descriptor + # to store the standard error file descriptor '2', and later + # restore the error file descriptor with the file descriptor '12' + # and release it. exec 12>&2 exec 2>> $KDUMP_LOG_PATH/kdump.log PS4='+ $(date "+%Y-%m-%d %H:%M:%S") ${BASH_SOURCE}@${LINENO}: '