In kdump, When the dump device was removed, dracut will drop to shell during second kernel boot. That means kdump isn't even started. But in this case, if the target isn't presented, we should dump to a rootfs device as a default action. Here call exception_handle_check and specify a handler continue_on_fail which may be wanted by user, like kdump. If kdump add a cmdline like rd.exceptionhandler=continue_on_fail, then nothoing done and go on. If no cmdline rd.exceptionhandler=continue_on_fail added, just drop into shell as before. Signed-off-by: Baoquan He <bhe@xxxxxxxxxx> --- modules.d/98systemd/dracut-initqueue.sh | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh index e9da432..c10b32f 100755 --- a/modules.d/98systemd/dracut-initqueue.sh +++ b/modules.d/98systemd/dracut-initqueue.sh @@ -17,6 +17,7 @@ RDRETRY=${RDRETRY:-30} RDRETRY=$(($RDRETRY*2)) export RDRETRY +failure="no" main_loop=0 export main_loop @@ -61,9 +62,14 @@ while :; do fi main_loop=$(($main_loop+1)) - [ $main_loop -gt $RDRETRY ] && emergency_shell "Could not boot." + [ $main_loop -gt $RDRETRY ] && failure="yes" && break done +if [ "$failure" = "yes" ]; then + failure="no" + exception_handler_check -h "continue_on_fail" "Could not boot" +fi + unset job unset queuetriggered unset main_loop -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html