Hello,

On May 30, 2023 12:42:39 PM EDT, Linux User #330250 <linuxuser330...@gmx.net> 
wrote:
> On 05/30 2023 17:13 Stan Johnson wrote:
> > On 5/30/23 7:16 AM, Ben Westover wrote:
> >> The GRUB Manual [1] says that the PPC port of GRUB only supports booting 
> >> Linux at the moment. AFAIK booting macOS with GRUB on x86 machines works 
> >> by just chainloading macOS' UEFI bootloader. I assume this is what yaboot 
> >> does as well, telling Open Firmware to load OS X's blessed binary instead 
> >> of the second stage of yaboot and Linux from there. All we need to do is 
> >> find a way to support Open Firmware chainloading from within GRUB.
> 
> AFAIR yaboot does its magic within the CHRP boot script. It would be
> relatively easy to add an option to load GRUB, I guess. The "chain"
> would then start by choosing Mac OS (Classic), Mac OS X, or GRUB, via
> the yaboot CHRP script. But then, GRUB would be only managing Linux.

That makes a lot more sense now. The "first stage" of yaboot where you select 
Linux, OS X, or CD Boot is actually a script run by Open Firmware, and that's 
how it can so easily chainload, since it's just a script selecting which binary 
for Open Firmware to load.

In that case, instead of trying to integrate chainloading functionality into 
GRUB itself, we could just set a similar script to run before GRUB that allows 
you to make that selection.

--
Ben Westover

Reply via email to