andreyv / sbupdate

Generate and sign kernel images for UEFI Secure Boot on Arch Linux
GNU General Public License v3.0
225 stars 20 forks source link

sbsign warning of gaps between PE/COFF sections #30

Closed dengeltheyounger closed 4 years ago

dengeltheyounger commented 4 years ago

I have noticed that whenever I use sbupdate to sign the .efi generated, it gives two warning:

warning: data remaining[26413568 vs 26423180]: gaps between PE/COFF sections? warning: data remaining[26413568 vs 26423184]: gaps between PE/COFF sections?

I can't find much information about it online, but it appears to be an issue with sbsign. It seems to resulting in an unbootable image.

Maryse47 commented 4 years ago

Those always happen but I never seen unbootable image while using this tool.

andreyv commented 4 years ago

@dengeltheyounger The warning should be harmless. What is the actual error during booting?

dengeltheyounger commented 4 years ago

@dengeltheyounger The warning should be harmless. What is the actual error during booting?

Basically, the firmware refuses to boot the image. After using sbupdate to create the image, I added the entry using efibootmgr. After that, I rebooted and turned on secure boot. When I save and reset the computer, it goes to straight to BIOS. If I manually choose the image while in BIOS, I get sent back to BIOS.

The issue no longer appears to be with signing. I attempted to boot using a signed grub executable, and the firmware did boot grub. Using grub has its own problems for my particular setup, which is why I'd prefer to use a unified image, but for some reason the firmware on my computer rejects the image.

The motherboard I have is asus m5a99fx pro r2.0. The BIOS has been updated to its latest version. In addition, the EFI version is 2.10.

dengeltheyounger commented 4 years ago

I just wanted to give an update. I booted into an efi shell and manually set the image as a boot option. That worked, and now the system is booting perfectly.

I'm not sure if it was user error, or if it was something with efibootmgr, but it appears that the image itself wasn't the issue either. At any rate, this should be marked as resolved. Thanks for getting back with me!

andreyv commented 4 years ago

Thanks, good to hear that.

ZJaume commented 3 years ago

Same problem here: warnings appear and when selecting the EFISTUB boot option it returns to BIOS. When Entering UEFI shell the boot option is there and is the default but won't boot. I have Gigabyte AB350M that has version 2.2 UEFI. Any advice?

EDIT: solved, created the entry with wrong path to efi file.