Melab Posted July 22, 2020 Share Posted July 22, 2020 I've searched for this and I've found nothing that addresses this. Is there a way to boot Clover's EfiLdr file (named "boot"), and possibly load the EfiVar.bin file alongside it, directly from GRUB2? That means without loading any of the intermediate boot sector files. If possible, can this be done loading it as a multiboot image (there are two specifications: multiboot and multiboot2). Link to comment https://www.insanelymac.com/forum/topic/344631-booting-clover-from-grub2/ Share on other sites More sharing options...
Slice Posted July 23, 2020 Share Posted July 23, 2020 6 hours ago, Melab said: I've searched for this and I've found nothing that addresses this. Is there a way to boot Clover's EfiLdr file (named "boot"), and possibly load the EfiVar.bin file alongside it, directly from GRUB2? That means without loading any of the intermediate boot sector files. If possible, can this be done loading it as a multiboot image (there are two specifications: multiboot and multiboot2). I can't say this is impossible but this is the question rather to grub2 developers if they can reproduce bootsectors behaviors and start some file in real mode with set of predefined cpu registers. Clover itself resolved similar task and the procedure exists in the file LegacyBoot.cpp. Link to comment https://www.insanelymac.com/forum/topic/344631-booting-clover-from-grub2/#findComment-2731474 Share on other sites More sharing options...
Melab Posted August 11, 2020 Author Share Posted August 11, 2020 On 7/23/2020 at 12:44 AM, Slice said: I can't say this is impossible but this is the question rather to grub2 developers if they can reproduce bootsectors behaviors and start some file in real mode with set of predefined cpu registers. Clover itself resolved similar task and the procedure exists in the file LegacyBoot.cpp. Does Clover's EfiLdr have to start in real mode? Am I correct in believing that it's produced by concatenating several files? And that one of those files contains the code that runs in protected mode? Assuming that I choose to chainload the boot sector files from GRUB2 in order to load Clover, do I have to chainload boot0ss or can GRUB2 jump to boot1f32 instead? Can I load boot1f32 from a file or does it have to be installed to the ESP's PBR? Link to comment https://www.insanelymac.com/forum/topic/344631-booting-clover-from-grub2/#findComment-2733868 Share on other sites More sharing options...
Slice Posted August 11, 2020 Share Posted August 11, 2020 Yes, first code switches execution into protected mode. In theory you can start execution here preparing all memory and registers to work. If you want a chainload then look into LegacyBoot.cpp which did this. But the problem is PCI devices which were not properly initialised this way. For example SATA controller remains in undefined state. Link to comment https://www.insanelymac.com/forum/topic/344631-booting-clover-from-grub2/#findComment-2733886 Share on other sites More sharing options...
Recommended Posts