On Tue, Jul 12, 2016 at 12:52 PM, Leandro Gustavo Biss Becker
<lbec...@fedoraproject.org> wrote:
> Hello.
>
> I'm trying to use a newer version of GRUB2 (grub2-efi-2.02-0.34.fc24.x86_64) 
> for UEFI PXE booting Linux (Clonezilla) and also a custom UEFI application 
> (custom shell) that needs access to the TCP4 UEFI stack in firmware (depends 
> of the scenario). Using older versions of GRUB2 it is working, but with newer 
> versions, when it chainloads the custom UEFI application all the UEFI Network 
> Protocols are gone (error 14 when calling 
> gBS->LocateProtocol(&gEfiPxeBaseCodeProtocolGuid, ...).
>
> I need the newer version because the new netboot capabilities that looks for 
> a cfg file using the MAC Address as grub.cfg-01-AA-BB-CC-DD-EE-FF.
> Is newer versions of grub2 unloading UEFI protocols (maybe calling UEFI's 
> Boot Services ExitBootServices) before chainloading UEFI applications?
>
> PS: Is this the correct forum for this matter?

Sure. But maybe not too many people have done UEFI PXE booting. I've
done PXE and know enough about UEFI to stop now and forever hold my
peace, but I've never done UEFI PXE.

My understanding is that PXE is booting is going to talk to a DHCP
server which should be configured to recognize UEFI specifically, so
it can hand over the proper kind of bootloader, in this case an EFI
version of GRUB2. What I don't know is how that works exactly. Does
the PXE client-server connection permit the transfer of multiple
files? For example....

Fedora builds a grubx64.efi (the boot.img and core.img) within their
build system and then signs it in order to support UEFI Secure Boot.
But this signed binary doesn't contain all of GRUB's modules. Those
are in a separate package that isn't installed by default, in
grub2-efi-modules. So maybe the server doesn't have those modules
installed with the new version of GRUB? Or maybe they're not baked
into the Fedora built grubx64.efi?

So I'd figure out what's different between the old GRUB and new GRUB
verions, and see if what's missing is a regression, or if it's that
those modules were pulled out into grub2-efi-modules on  purpose. And
then if there's some way between PXE client-server and GRUB for GRUB
to get any of those modules, or if they must be baked into the
grubx64.efi (the actual EFI OSLoader, or bootloader). If it does, then
it might be that you have to build your own grubx64.efi using
grub2-install or one of the other script commands for this purpose,
and explicitly add in the modules that you need baked into that
grubx64.efi.

The next thing is whether or not you need Secure Boot support. If you
do, then there's a kind of chainloading that has to happen, where the
first thing loaded is shim.efi, then mokutil.efi so that your own key
can be registered with the firmware, and then your own signed
grubx64.efi.

Maybe that's enough for now to start looking.


-- 
Chris Murphy
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to