rhboot / shim

UEFI shim loader
Other
819 stars 289 forks source link

Failed to start the shim. #532

Open 15058718379 opened 1 year ago

15058718379 commented 1 year ago

shim version : 15.4 On a virtual machine,The shim fails to start from the /EFI/BOOT/BOOTX64.EFI and the following error is reported: error:../../grub-core/loader/efi/chainloader.c:87unknown error.

Press any key to continue... Failed to open \EFI\BOOT\grubx64.efi - Not Found Failed to load image \EFI\BOOT\grubx64.efi:Not Found start_image() returned Not Found

15058718379 commented 1 year ago

According to the printed information,the 'bootpath' is '\EFI\BOOT/BOOTX64.EFI',The value does not match the if in the following figure. image

15058718379 commented 1 year ago

I wonder if there are any rules for the following judgment, and can I add a line like this?

if (StrnCaseCmp(bootpath, L"\\EFI\\BOOT\\BOOT", 14) &&
        StrnCaseCmp(bootpath, L"\\EFI\\BOOT\\/BOOT", 15) &&
        StrnCaseCmp(bootpath, L"EFI\\BOOT\\BOOT", 13) &&
        StrnCaseCmp(bootpath, L"EFI\\BOOT\\/BOOT", 14) &&
        StrnCaseCmp(bootpath, L"\\EFI\\BOOT/BOOT", 14))
    goto error;