diff --git a/src/bootctl/bootctl.c b/src/bootctl/bootctl.c index b0c1fb2934..a74a131c24 100644 --- a/src/bootctl/bootctl.c +++ b/src/bootctl/bootctl.c @@ -145,8 +145,8 @@ int acquire_xbootldr( int r; r = find_xbootldr_and_warn(arg_root, arg_xbootldr_path, unprivileged_mode, &np, ret_uuid, ret_devid); - if (r == -ENOKEY) { - log_debug_errno(r, "Didn't find an XBOOTLDR partition, using the ESP as $BOOT."); + if (r == -ENOKEY || path_equal(np, arg_esp_path)) { + log_debug("Didn't find an XBOOTLDR partition, using the ESP as $BOOT."); arg_xbootldr_path = mfree(arg_xbootldr_path); if (ret_uuid)