http://bugzilla.opensuse.org/show_bug.cgi?id=954126
http://bugzilla.opensuse.org/show_bug.cgi?id=954126#c18
--- Comment #18 from Michael Chang
OK, I found bootmgfw.efi, and it confirms it. The problem is in grub2-efi-chainload-harder.patch that adds check for valid PE32+ header; but this check is wrong.
if (grub_memcmp (pe32->signature, "PE\0\0", 4) != 0
pe32 header is not located at fixed address. pe32 is of type grub_pe32_header and expects header at offset 0x80; but botomgfw.efi has header at offset 0xe0. See PE COFF specification. Code should fetch header address at fixed offset 0x3b.
You're right, we should check msdos header from offset 0x3c for looking up file offset of pe header. I was misguided by this comment in include/grub/efi/pe32.h so that I went straight to ignore the msdos header. And it happened to work well with my testing with xen.efi. :( /* The MSDOS compatibility stub. This was copied from the output of objcopy, and it is not necessary to care about what this means. */ I'm going to build a test package. -- You are receiving this mail because: You are on the CC list for the bug.