On 06/05/2019 10:25, John Paul Adrian Glaubitz wrote: > On 5/5/19 2:47 PM, Mark Cave-Ayland wrote: >> Ah no, that's not correct - BootX is an enhanced bootloader written by Apple >> to >> enable multi-booting with MacOS X and grub-mkrescue is assuming that it is >> being >> installed on a HD containing MacOS X with BootX in the default location. >> Whilst this >> makes sense assuming that you are trying to fix booting a MacOS X partition >> in a >> multi-boot setup, this certainly isn't the case for an installer CD. And >> certainly >> this confuses things because in real life BootX is a COFF executable and not >> a >> bootinfo file. > > grub-mkrescue is definitely designed to create a bootable CD and I assume > that they > are doing this according to specification. As I said, I am mimicking what > grub-mkrescue > does. The options can found by reading source code for grub-mkrescue: > >> http://git.savannah.gnu.org/cgit/grub.git/tree/util/grub-mkrescue.c > > If you think this is not correct, we should fix this problem upstream first.
Certainly the /System/Library/CoreServices/grub.elf path is completely unnecessary, and not part of any standard or like anything else I have in my OpenBIOS image test suite. If you search for "CoreServices" you can see that it's a MacOS-specific directory, and the only way that example could have come about was if someone were trying to use grub to boot MacOS BootX. Is it possible that someone were trying to use grub-mkrescue to produce not an image that self-boots, but as something that could boot an existing MacOS install already containing a grub core image when the bootloader had been destroyed? Other than that, you might as well just use /boot/grub/powerpc.elf rather than overcomplicating things with MacOS-specific paths on a Linux CDROM. >> In my travels with qemu-system-ppc, most CDs I've seen use the CHRP >> convention of >> \ppc\bootinfo.txt and then bless the \ppc folder so then no matter whether >> you are >> using a Mac or other CHRP-compliant machine, everything boots the same way. > > But even Yaboot didn't work that way. It has both a \\ppc\bootinfo.txt which > is > specific to IBM CHRP machines as well as an \\install\ofboot.b which contains > a Mac-specific CHRP script. See for example the Debian 9.0 installation images > for powerpc [1]. Both of these files instantiate yaboot but with different configurations (one has extra options for 64-bit OS boot), but isn't this something that would now be handled by grub? ATB, Mark.

