From: Zbigniew Jędrzejewski-Szmek Date: Tue, 3 Dec 2019 11:54:52 +0000 (+0000) Subject: systemctl: enhance message about kexec missing kernel X-Git-Tag: v245-rc1~332 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fec5854baa6f1262b9cb827bc4a8eb27b376b7d;p=thirdparty%2Fsystemd.git systemctl: enhance message about kexec missing kernel Fixes #7730. --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 619969c3da0..fe6595dcf32 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -32,6 +32,7 @@ #include "cpu-set-util.h" #include "dirent-util.h" #include "dropin.h" +#include "efi-loader.h" #include "efivars.h" #include "env-util.h" #include "escape.h" @@ -3514,8 +3515,13 @@ static int load_kexec_kernel(void) { return log_error_errno(errno, KEXEC" is not available: %m"); r = boot_entries_load_config_auto(NULL, NULL, &config); - if (r == -ENOKEY) /* The call doesn't log about ENOKEY, let's do so here. */ - return log_error_errno(r, "Cannot find the ESP partition mount point."); + if (r == -ENOKEY) + /* The call doesn't log about ENOKEY, let's do so here. */ + return log_error_errno(r, + "No kexec kernel loaded and autodetection failed.\n%s", + is_efi_boot() + ? "Cannot automatically load kernel: ESP partition mount point not found." + : "Automatic loading works only on systems booted with EFI."); if (r < 0) return r;