Discussion:
Booting OS X from grub
(too old to reply)
Ed Robbins
2024-10-02 11:40:02 UTC
Permalink
Hi all,
Picking up from the other thread... this is about booting OS X on
apple ppc hardware when grub is being used to boot Linux.

I tried the version of the BootX file Ben Westover shared in this
message https://lists.debian.org/debian-powerpc/2023/06/msg00008.html

I placed the file in /boot/grub/System/Library/CoreServices/BootX.

I then blessed it:
umount /dev/sda2
hmount /dev/sda2
hattrib -c UNIX -t tbxi :System:Library:CoreServices:BootX
hattrib -b :System:Library:CoreServices
humount

What I expected to happen, was that on power on I would get a menu,
the same as yaboot used to have, which says something like "press l
for linux, x for mac os, c for cdrom". What actually happens is that
on power on it goes straight to grub, as it did before.

If I hold alt down at power on and select the debian option, then I do
get the "press l for linux, x for mac os, c for cdrom" menu.

However I am not really sure this is worth pursuing, because holding
down alt to select the operating system is already a working solution
for booting mac os x when grub is used as the bootloader for Linux. I
do wonder though how one would go about changing the default boot OS.

Thanks,
Ed
John Paul Adrian Glaubitz
2024-10-02 11:50:01 UTC
Permalink
Hello Ed,
Post by Ed Robbins
Picking up from the other thread... this is about booting OS X on
apple ppc hardware when grub is being used to boot Linux.
Ah, that's a completely different problem then. I don't actually know whether
GRUB can load other bootloaders when using Open Firmware (ieee1275).

This is probably something that needs to be asked on the grub-devel mailing
list.

Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Ed Robbins
2024-10-02 12:00:01 UTC
Permalink
Hi Adrian,

On Wed, 2 Oct 2024 at 12:42, John Paul Adrian Glaubitz
Post by John Paul Adrian Glaubitz
Hello Ed,
Post by Ed Robbins
Picking up from the other thread... this is about booting OS X on
apple ppc hardware when grub is being used to boot Linux.
Ah, that's a completely different problem then. I don't actually know whether
GRUB can load other bootloaders when using Open Firmware (ieee1275).
I think Ben's solution (the BootX file he shared) is just an
openfirmware script that runs before grub, which allows you to choose
between a grub/os x/CD. And it is also how yaboot handled this (I
think his script is a modification of the yaboot one). But I am not
sure how to make that script run by default instead of jumping
straight to grub.
Post by John Paul Adrian Glaubitz
This is probably something that needs to be asked on the grub-devel mailing
list.
Although grub shows options for the other installed operating systems
(i.e. OS X) it indeed seems unable to boot them. I am not sure if this
is supposed to work.
Post by John Paul Adrian Glaubitz
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Manuel Molina Cuberos
2024-10-19 15:40:01 UTC
Permalink
Hi Stan,

After having a proper dual OSX+OS9 installation in my iMac G3, with some
spare disk space, ...
have been documented elsewhere). Going back to Mac OS 9.2.2, I changed
the type of the Apple_Bootstrap partition from Apple_Bootstrap to
Apple_HFS, and that allowed me to format it as HFS; I then changed the
partition type back to Apple_Bootstrap. Note that parted doesn't
distinguish between "Apple HFS" and "Apple_Bootstrap" partitions; both
are simply "hfs".
I managed to partition the disk from OS 9 in order to be able to install
it, and left the third partition (before the empty space), as a 128 MByte
HFS one with "Apple HFS" type.

Which tool can I use from OS 9 (or even OS X) to change the partition type
to "Apple_Bootstrap" ?
I'm curious about how you did that. I tried with pdisk but it won't let me
write the changes:

darkgrey:~ manuelmc$ diskutil list
/dev/disk0
#: type name size identifier
0: Apple_partition_scheme *28.0 GB disk0
1: Apple_partition_map 31.5 KB disk0s1
2: Apple_Driver43 27.0 KB disk0s2
3: Apple_Driver43 37.0 KB disk0s3
4: Apple_Driver_ATA 27.0 KB disk0s4
5: Apple_Driver_ATA 37.0 KB disk0s5
6: Apple_FWDriver 100.0 KB disk0s6
7: Apple_Driver_IOKit 256.0 KB disk0s7
8: Apple_Patches 256.0 KB disk0s8
9: Apple_HFS MacOS9 1023.8 MB disk0s9
10: Apple_HFS MacOSX 15.0 GB disk0s10
11: Apple_HFS darkgreyboot 128.0 MB disk0s11

darkgrey:~ manuelmc$ sudo pdisk
Top level command (? for help): e
Name of device: /dev/rdisk0
Edit /dev/rdisk0 -
Command (? for help): p

Partition map (with 512 byte blocks) on '/dev/rdisk0'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: Apple_Driver43*Macintosh 54 @ 64
3: Apple_Driver43*Macintosh 74 @ 118
4: Apple_Driver_ATA*Macintosh 54 @ 192
5: Apple_Driver_ATA*Macintosh 74 @ 246
6: Apple_FWDriver Macintosh 200 @ 320
7: Apple_Driver_IOKit Macintosh 512 @ 520
8: Apple_Patches Patch Partition 512 @ 1032
9: Apple_HFS sin t?tulo 2097152 @ 1544 ( 1.0G)
10: Apple_HFS sin t?tulo 2 31457280 @ 2098696 ( 15.0G)
11: Apple_HFS sin t?tulo 3 262144 @ 33555976 (128.0M)
12: Apple_Free Extra 24862600 @ 33818120 ( 11.9G)

Device block size=512, Number of Blocks=58680719 (28.0G)
DeviceType=0x0, DeviceId=0x0
Drivers-
1: 23 @ 64, type=0x1
2: 36 @ 118, type=0xffff
3: 21 @ 192, type=0x701
4: 34 @ 246, type=0xf8ff

Command (? for help): t
The map is not writable.
Partition number: 11
Existing partition type ``Apple_HFS''.
New type of partition: Apple_Bootstrap
Command (? for help): w
The map is not writable.
--
Regards

Manuel Molina Cuberos (deluxe_)
Loading...