Hello,

On 10/2/24 5:57 AM, Ed Robbins wrote:
> Hi Adrian,
> 
> On Wed, 2 Oct 2024 at 12:42, John Paul Adrian Glaubitz
> <glaub...@physik.fu-berlin.de> wrote:
>>
>> Hello Ed,
>>
>> On Wed, 2024-10-02 at 12:35 +0100, Ed Robbins wrote:
>>> 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).
>>

It apparently can't. At least it can't boot Mac OS (9.2.2) or Mac OS X
(10.4.11) on a Pismo PowerBook (error messages have been documented
elsewhere).

> 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.
> 
>> 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.
> 
>>
>> Adrian
>> ...
As a test, I installed Debian SID (from the 6-18-2023 netinst CD) on a
Pismo (500 MHz, 512 MiB). This system is dedicated to testing things
such as GRUB, as well as new releases of Debian, Gentoo, etc.

The Pismo started with Mac OS 9.2.2 and Mac OS X 10.4.11 Tiger, and a
blank Apple_Bootstrap partition (so one can switch between Mac OS 9 and
Mac OS X Tiger using the Startup Disk control panel). Linux-related
partitions were configured but left blank:

# parted -l
Model: ATA ST9120821A (scsi)
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: mac
Disk Flags:

Number  Start   End     Size    File system     Name             Flags
 1      512B    32.8kB  32.3kB                  Apple
 2      32.8kB  61.4kB  28.7kB                  Macintosh
 3      61.4kB  90.1kB  28.7kB                  Macintosh
 4      90.1kB  119kB   28.7kB                  Macintosh
 5      119kB   147kB   28.7kB                  Macintosh
 6      147kB   410kB   262kB                   Macintosh
 7      410kB   672kB   262kB                   Macintosh
 8      672kB   934kB   262kB                   Patch Partition
 9      934kB   68.0MB  67.1MB  hfs             Apple_Bootstrap  boot
10      68.0MB  1142MB  1074MB  hfs+            MacOS
11      1142MB  8590MB  7448MB  hfs+            MacOSX
12      8590MB  25.8GB  17.2GB  ext3            Debian_sid
13      25.8GB  42.9GB  17.2GB  ext3            Gentoo
14      42.9GB  44.0GB  1074MB  linux-swap(v1)  swap             swap
15      44.0GB  120GB   76.0GB  ext3            data

My initial installation failed. I used a default installation with
manual partitioning. It failed because I asked it to format the
Apple_Bootstrap partition as HFS (I believe the reasons that this fails
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".

Installation then worked (by specifying /dev/sda9 above as the
/boot/grub partition without formatting it).

There are, of course, alternatives to GRUB that don't seem to have the
HFS formatting issue. I use a relatively static installation of yaboot
on all of my other Apple Mac powerpc (ppc-32) and G5 (ppc-64) systems.
It appears that the yaboot binaries and scripts (including ybin) were
installed but aren't used, and I didn't test them. Yaboot has the
advantage of being able to boot any Linux distribution, Mac OS 9 or Mac
OS X from the menu, and any of these can be booted by default. I realize
that yaboot is no longer supported, but it works and will continue to
work as long as ext3 filesystems are supported by the Linux kernel.

GRUB won't boot Mac OS X on ppc-32 or ppc-64. GRUB on x86-64 and i386
also has issues, such as wrong volume UUIDs that have to be corrected
manually in the grub.cfg file. I'll look into reporting those issues and
the Apple Mac issues on the the grub-devel mailing list.

For now, it would certainly be helpful to have a menu that lets users
choose their own bootloader, maybe with the limitations of each listed.
Since any use of yaboot would be specific to ppc-32 and ppc-64 systems,
updates to yaboot likely won't get much attention except from Debian
ports (and it's fine if nobody does anything as long as yaboot isn't
prevented from working).

My installation on the Pismo was otherwise uneventful, except that Xfce
isn't working. I'll continue to investigate that (I suspect something
simple like a missing kernel option). I also see some odd random
timeouts from systemd. I'm not a systemd user, and the day I'm not able
to choose to switch from systemd to sysvinit will be the day that I
abandon Debian. I just upgraded Debian on an ibm-pc 386 system that
would not let me run Xfce without using systemd -- that system is now
running Devuan. Unfortunately, Devuan hasn't been ported to ppc-32 or
ppc-64, but Gentoo is a reasonable alternative for Macs (though Debian
is also ok for text-only installations).

Thanks to all the developers, porters and users who keep GNU/Linux
distributions running on old hardware!

-Stan

Reply via email to