Apologies for my mistake, you are correct. The error message was
originated from the firmware, and i am not blaming grub. But the thing
is could you tell me what does "cannot load image" mean?

Well technically speaking, if you have a better error message than
mine then please tell me or improve it. My point is there must be some
better error message than "cannot load image". And yes i received that
message, trying to resolve it for 2 days because i didn't know what i
was meant. Well when i added this code well i know now. Please make
the error more descriptive.

My issue was i encountered from chainload command is because
`LoadImage()` was returning `EFI_UNSUPPORTED`.

My patch addresses this issue, i spent doing the hard work myself
instead of reporting as an enhancement, so apologies my mistakes.

diff --git a/grub-core/loader/efi/chainloader.c
b/grub-core/loader/efi/chainloader.c
index 869307bf3..4fd46dfda 100644
--- a/grub-core/loader/efi/chainloader.c
+++ b/grub-core/loader/efi/chainloader.c
@@ -346,6 +346,12 @@ grub_cmd_chainloader (grub_command_t cmd
__attribute__ ((unused)),
    {
      if (status == GRUB_EFI_OUT_OF_RESOURCES)
       grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of resources");
+      else if (status == GRUB_EFI_INVALID_PARAMETER)
+       grub_error (GRUB_ERR_BAD_ARGUMENT, "the image supplied
paramters are invalid");
+      else if (status == GRUB_EFI_NOT_FOUND)
+       grub_error (GRUB_ERR_FILE_NOT_FOUND, "the image not found");
+      else if (status == GRUB_EFI_UNSUPPORTED)
+       grub_error (GRUB_ERR_BAD_OS, "the image is unsupported");
      else
       grub_error (GRUB_ERR_BAD_OS, "cannot load image");

Please could you clarify, if there is some issue still there.

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to