Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

azazel616

macrumors newbie
Original poster
Feb 4, 2023
13
3
Hi all, i'm new here and got registered for some issues i had installing debian 11 satable/sid on powermac g5

1) stable: i downloaded and burnt the netinstall ppc64el (11.6.0/11.0.0) CD, but pressing alt on booting the CD does not show as available option for boot
(burnt 3-4 CDs from the powermac g5 itself also)

trying booting from OF with following commands, both from CD and from USB

>boot cd:,\\grub.elf
>boot ud:,\\grub.elf

i received an error message about "sector size mismatch, unable to open file"

i also trying booting from usb getting the device by

dev usb2 dev disk@2 pwd

getting the same error.

2) sid: downloaded and burnt the netinst image linked in this forum in the powerpc debian wiki (11.0.0), and it shows booting with alt starting correctly.
I created the /boot/grub partition as an HFS /dev/sdb4, and a root partition as an ext4 /dev/sdb6 as required from the installer (sdb5 is the swap). the installations fails on boot loader.
noway of getting yaboot installed by chrooting /target as the installation is finished

if someone can help i'll be grateful

PS: both sda and sdb are SSD and sdb1-3 are OSX Leopard partitions
 
So I'm not perfectly sure as I don't have a G5 on hand, but offhand I recall that the G5s don't actually support little endian mode (ppc64el)-- it'll hang the system. So the first thing I would try is instead to boot from a big endian (ppc64) boot image and see how far you can get.
 
  • Like
Reactions: azazel616
So I'm not perfectly sure as I don't have a G5 on hand, but offhand I recall that the G5s don't actually support little endian mode (ppc64el)-- it'll hang the system. So the first thing I would try is instead to boot from a big endian (ppc64) boot image and see how far you can get.
sorry, i described the question improperly: for the stable version i tried to use ppc64el image (and your reply clear my ideas on why it does not show as boot option) for the sid i used debian-11.0.0-ppc64-NETINST-1 as from PowerPC Debian Wiki in this forum.

thanks again for helping me understand why the stable image was not working
 
Last edited:
I personally don't use Debian for many reasons that I already discussed in the past (feel free to search it), but the main "advantage" of Debian it's the stability that goes away with Sid variant, so that's a risk that you need to be aware and have the knowledge to fix in case of something goes wrong.

If you look on the wiki page of Debian PPC mention the 64le hardware requirements (on a sub-page) so it make clear that our Apple PPC won't work. So stick to the guide from this forum that's being made with lot's of love from everyone here.

The yaboot project has been abandoned or in hiatus so almost all newer PPC Linux distro's don't use that anymore, so GRUB it's the way forward and how to fix it I think that already been discussed here before. Since I don't use Debian I can't verify, so please test and report.

I always recommend for anyone new at Linux (on PPC or whatever other platform) that:

"Have a dedicated HDD to install at the beginning or when you are new to this business. And have a full backup before doing an dual boot install process"

Because it's fairly easy even following the guides, YOU make a mistake and the rest of your drive it's gone/inaccessible/etc.

When you have more confidence in yourself and the process, then make whatever you want with your hardware (that's the beauty of computing, right?)

Good luck
 
  • Like
Reactions: azazel616
I personally don't use Debian for many reasons that I already discussed in the past (feel free to search it), but the main "advantage" of Debian it's the stability that goes away with Sid variant, so that's a risk that you need to be aware and have the knowledge to fix in case of something goes wrong.
yeah i know, but are other ppc distros available reliable?

If you look on the wiki page of Debian PPC mention the 64le hardware requirements (on a sub-page) so it make clear that our Apple PPC won't work. So stick to the guide from this forum that's being made with lot's of love from everyone here.
got it the only way is sid, wich i already installed on an ibook G4 in the ppc flavor, alongside with tiger and morphos, already, saw the wonderful wiki and other posts on linux for ppc, and got most of the info i used for previous g4 installs there. The trick linked in the other post in my case it did not work, i also tried mounting the sysfs and execute grub-install from terminal getting the same message "the sdXX partiotion is not a PReP partition"
I know the pcc64 sid is buggier but have to go with it since the ppc flavour fails booting with an "illegal operation" signaled by OF

The yaboot project has been abandoned or in hiatus so almost all newer PPC Linux distro's don't use that anymore, so GRUB it's the way forward and how to fix it I think that already been discussed here before. Since I don't use Debian I can't verify, so please test and report.
thanks wasn't aware of, anyway on the g4 it get installed

I always recommend for anyone new at Linux (on PPC or whatever other platform) that:

"Have a dedicated HDD to install at the beginning or when you are new to this business. And have a full backup before doing an dual boot install process"

Because it's fairly easy even following the guides, YOU make a mistake and the rest of your drive it's gone/inaccessible/etc.

When you have more confidence in yourself and the process, then make whatever you want with your hardware (that's the beauty of computing, right?)

Good luck
i'm not really new at linux, i use it daily since 2012 :)
 
I can only assume what you wrote on the thread, so unless you made clear and describe accurately I can't know anything of you and your problem.

My primary language isn't English, so I had some difficulties trying to understand you by the lack of punctuation and proper separation.

It's good practice and good manners to always refer to the sections, instructions that you used so others in the future can be helped by your experience (that's one of the reasons why forums exist).

I "use" (installed for the first time) Linux since 2017 but I'm far from being a power-user or expert, just trying to help others with what I know or can find.

You need to write properly because PPC in Linux refers to 32-bits and PPC64 it's the appropriate architecture for the G5's and it will work on your machine.

Your problem with "PReP partition" can be related to a incorrectly partitioned HDD or a bug there was present at some point on the GRUB development in 2019,

And the "illegal operation" usually it's when you execute a code there was designed to another architecture.

There are plenty of Linux for PPC's (32 and 64 bits). From custom builds like Lubuntu 16.04 Remix, Debian Sid Remix and Fienix. There are many more, but your knowledge, the proper documentation and many other things can make your life easy. A Few examples (non exhaustive list):

Gentoo
Fedora
ArchLinux
OpenSUSE
VoidLinux

This was extensively discussed in the past in this forum, so do your search. (Because I posted a list with Linux distros many times regarding what options it's available.)

Operating Systems for PowerPC
 
  • Like
Reactions: azazel616
I can only assume what you wrote on the thread, so unless you made clear and describe accurately I can't know anything of you and your problem.

My primary language isn't English, so I had some difficulties trying to understand you by the lack of punctuation and proper separation.

It's good practice and good manners to always refer to the sections, instructions that you used so others in the future can be helped by your experience (that's one of the reasons why forums exist).
i apologize for the inaccurate description and the lack of punctuation, english is not my first language also.
i wrote this topic exactly with the purpose of get some help wich i believe it would be useful for other users also.

i write down a brief description of my installation process that i may make my situation clearer:

  1. i installed osx leopard letting disk utility partition the 250gb ssd (sda) with the 3 apple partition and one more partition unused
  2. sda1, sda2, sda3 are osx partitions, sda4 is unused partition created by disk utility
  3. i deleted the sda4 partition with the debian installer (ppc64) and rebooted
  4. i selected guided partition on free space to create new sda4 (hfs partition mounted in /boot/grub) sda5 (ext2 mounted as root) and sda6 (swap space)
  5. i went on with the installation wich failed installing grub
at this point i made different tries event mounting the sda4 partition manually as specified in your link to the other post, mounting sysfs and installing grub manually with

Code:
$ grub-install /dev/sda4

wich failed with error "sda4 is not a PReP partition

i want to specify also that days ago, after some fails, i got an installation working, straight with no problem, and this thing makes me think to a bug of the installer wich i avoided at that time in some way
AFAIK a PReP partition should not even be required by G5, so i tend to believe to some kind of buggy behaviour.

I "use" (installed for the first time) Linux since 2017 but I'm far from being a power-user or expert, just trying to help others with what I know or can find.

You need to write properly because PPC in Linux refers to 32-bits and PPC64 it's the appropriate architecture for the G5's and it will work on your machine.

Your problem with "PReP partition" can be related to a incorrectly partitioned HDD or a bug there was present at some point on the GRUB development in 2019,
yes i know, indeed i used the ppc64 version of the installer

And the "illegal operation" usually it's when you execute a code there was designed to another architecture.

There are plenty of Linux for PPC's (32 and 64 bits). From custom builds like Lubuntu 16.04 Remix, Debian Sid Remix and Fienix. There are many more, but your knowledge, the proper documentation and many other things can make your life easy. A Few examples (non exhaustive list):

Gentoo
Fedora
ArchLinux
OpenSUSE
VoidLinux

This was extensively discussed in the past in this forum, so do your search. (Because I posted a list with Linux distros many times regarding what options it's available.)

Operating Systems for PowerPC

thanks, i think if i'll not able to find a workaround to this issue i'll go with gentoo or arch, if ppc64 ports still exists, sadly AFAIK ubuntu/lubuntu, OpenSuse and Fedora exists only in old versions. Void linux instead i tried it on a i386 and did not persuade me fully to be areliable system for use

i thank you for this reply and will look throught this forum to get more info by your and other posts surely (already used the guides and the wiki for installing debian sid on G4)
 
Well I remember that it was almost an year ago that ActionRetro make a video about Installing Debian SID and had an error when installing GRUB. Then he pointed to a fix that was discussed in the forums (right below the first post that I linked to you) but one of the maintainers of Debian said in a pinned comment on the video
GRUB uses a completely different mechanism for booting Linux as compared to a standard PC. On a PowerMac, setting up GRUB involves creating a separate HFS partition, installing the GRUB first-stage bootloader files and "blessing" them with a special utility.
Since I don't use Debian, but unless they do something completely different and magical, it has to follow some standards.

VoidLinux Documentation makes clear that you need an "Apple_Bootstrap" partition, because different from x86 platforms that can boot from an ext2 or fat partitions (and even from the same root partition depending on the file system of your choice). Apple PowerPC needs an "special partition" to boot. Gentoo Handbook also mention (with both mac-fdisk and fdisk tools) the "PPC PReP Boot partition". So probably as I said before, having a separated HDD to properly test, partition, test it's best when you don't get a good documentation. (It's not the developers fault, if they manage to make a good job on the software side, the community need to help with the docs)

About other distros:

Gentoo it's great when you have the time to compile everything from source and read many pages of manuals.

Ubuntu was discontinued, no problems.

OpenSUSE "still works" and there are one thread on the forum about it. (ISO download)

ArchLinux isn't PPC64 ready yet, and lacks documentation, let's give them time to develop it.

VoidLinux it's far from perfect on the proprietary packages on X86(or x64) but besides that I love it since I don't use that many proprietary packages and I hate the concept of flatpacks (I like appimages because they are more complete, and "fail-proof"). But the base Linux System and architecture of Void I couldn't find it something more straightforward on other distros.
 
  • Like
Reactions: azazel616
Well I remember that it was almost an year ago that ActionRetro make a video about Installing Debian SID and had an error when installing GRUB. Then he pointed to a fix that was discussed in the forums (right below the first post that I linked to you) but one of the maintainers of Debian said in a pinned comment on the video

thank you!!! i saw the actionretro video but never notice the grub fix and tomorrow (GMT+1) i surely try it on the powermac

Since I don't use Debian, but unless they do something completely different and magical, it has to follow some standards.

VoidLinux Documentation makes clear that you need an "Apple_Bootstrap" partition, because different from x86 platforms that can boot from an ext2 or fat partitions (and even from the same root partition depending on the file system of your choice). Apple PowerPC needs an "special partition" to boot. Gentoo Handbook also mention (with both mac-fdisk and fdisk tools) the "PPC PReP Boot partition". So probably as I said before, having a separated HDD to properly test, partition, test it's best when you don't get a good documentation. (It's not the developers fault, if they manage to make a good job on the software side, the community need to help with the docs)

About other distros:

Gentoo it's great when you have the time to compile everything from source and read many pages of manuals.

Ubuntu was discontinued, no problems.

OpenSUSE "still works" and there are one thread on the forum about it. (ISO download)

ArchLinux isn't PPC64 ready yet, and lacks documentation, let's give them time to develop it.

VoidLinux it's far from perfect on the proprietary packages on X86(or x64) but besides that I love it since I don't use that many proprietary packages and I hate the concept of flatpacks (I like appimages because they are more complete, and "fail-proof"). But the base Linux System and architecture of Void I couldn't find it something more straightforward on other distros.
yeah an HFS partition is always needed to boot from this macs, but PReP is a particular one afaik with a particular boot block not needed by new world mac (a normal HFS partition should be enough)

since the G5 is anyway a good machine, my goal would be not only using it for retro activities, but for my "administrative" work also (wich now goes on on an i5 macbook 13"). So a linux distros wich make possible web modern browsing and at least the use of some up-to-date office applications would be ideal. This is the reason i tend to avoid Debian 6-7-8 stable, ubuntu 16, Fedora and other discontinued ppc64 distros

i also tried Adelie Linux, but never got to start the installation even if it boots live w/o problem, neither on ppc nor on i386, the installer returns a strange error about permissions, but maybe i missed something in my quick overview of the docs

I saw opensuse is still updating the ppc64 server iso, i'll give it a try anyway (i have the 2nd 500gb SSD way to large for my data and can think to dedicate 100Gb to experimental linux installations) if it will be possible to install a GUI and software wich allow a reliable office use of the machine i'll surely think on it.

Void as i said does not convinced me fully, but it's so fascinating, starting from logo and name ;)

Gentoo i believe it's worth a try also, but need to find more time and i'll probably start with a amd64 machine

thanks again for all the infos shared, in particular for pointing to the possible grub fix for debian sid, i'll test it asap and let you know in this forum

as always this virtual place proves to be the main and most effective/reliable source of information for old Mac. Still didn't find another place worth the comparison, not even the debian user forums
 
Last edited:
  • Like
Reactions: dextructor
I don't think that you are reading or paying attention enough to the posts/replies. Maybe that's my fault so I'll try to be as clear and polite as possible to avoid any future mistakes/confusion.
never notice the grub fix and tomorrow (GMT+1) i surely try it on the powermac
The main developer of Debian said in the first comment that was pinned:
but the GRUB fix should no longer be necessary.
That means it's really fixed? I can't guarantee. But feel free to try it.

a normal HFS partition should be enough
No, that's not true. The developer of Void on the documentation that I linked yesterday made it clear:
Note that partitioning has nothing to do with filesystems present. Partitioning will only ensure that you will have the partitions with correct types available. Do not get confused by partition types like Apple_HFS; that is unrelated to the filesystem in the partition. You will format your filesystems once everything is partitioned correctly.
Why I'm saying that? I followed an great guide on this forum when I was preparing my iMac G5 to install my Operating Systems because I don't like the way that Disk Utility create "unnecessarily" extra partitions, so I used Coriolis Systems' iPartition as instructed on the guide, but when installing Void it didn't boot. Why? Because the quote above says it all. So pay attention, because if the installer don't make it automatically right, you need to do it manually.

And it shouldn't be confused with blessing as well, that's another thing, that allow non OSX to boot on PPC machines (either New World or Old World). And according to Red Hat Enterprise Linux 3 the PPC PReP Boot partition it's used by non Apple PowerPC, more specifically IBM System p Machines

as always this virtual place proves to be the main and most effective/reliable source of information for old Mac. Still didn't find another place worth the comparison, not even the debian user forums
The Debian forums should be more efficiently on Linux specifically questions. The "basic" PPC things you can find here a more reliable source. And there most users have x86 machines so they don't have a clue about our machines.
 
Tried the fix suggested (grubfix.sh)

in some way i made it work. it wasn't working following step by step the instructions in the post. In particular:

  • wget is not present in /target and must be copied in /target/usr/bin from the installation root fs before chrooting
  • the script moves and rename an ofpathname file linking the new ofpathname to a file ofpath wich i suppose should be present (but it isn't) in the hfsprogs_332.25-11+b3_ppc64.deb package it downloads from repo.powerprogress.org, that way bot ofpathname and ofpath becomes unavailabe to furter commands in the scripts generating errors. By commenting the specified line and linking manually ofpath to ofpathname (since its called later directly in the script) the script will not give errors
  • before chrooting mounting of dev is needed for accessing devices and for grub to work correctly and not reporting errors
Code:
cd /target
mount --rbind /dev dev/
mount --rbind /sys sys/

doing these steps (using the script for only install grub and not for its other functions by replying N to its questions) and then finalizing installation, grub is installed correctly, showing up at boot (not on the boot selector with ALT on poweron) but then sid boots in emergency mode, still can'get why, allowing only root access for maintenance. (but the noveau dirver related messages shown seem to relate the issue with the video driver)

do not take the workaround specified above as a way to make the script work, they're somewhat improvised and the missing ofpath sould have a specific functionality, since the original script line used it by movin the original ofpathname to ofpathname-ibm and then linking a new ofpathname to the missing ofpath.

I'll try to go further in this question in the next few days (viewing logs and examining the script better) and let you know if i come up with some kind of workaround or explanation

about partitioning yes you're right, i exactly know that the creation o a partition it only sets its type and does not format it (mkfs or in this case the installer wich calls mkfs, if specified, is used to do that) and i know of the blessed file in the new world apple_boot partitions (with new world specific bootblock). According to debian docs yes, PReP is something related to IBM/Motorola machines
 
Last edited:
this is the script code responsible for installing grub, as you can see it reformats the /boot/grub partition with the HFS filesystem, mounting it then in the correct position, and installing grub on it, setting the nvram parameters for booting grub, the only obscure line is that mv and ln of ofpathname and ofpath wich subsitute a previous ofpathname with a link to a ofpath (not present in my system wich i suppose would correct some original malfunction and presume, but cannot be sure, it should be present or installed by dpkg -i hfsprogs_332.25-11+b3_ppc64.deb).

Code:
        echo "Download and install HFS progs"
        wget https://repo.powerprogress.org/debian/install/hfsprogs_332.25-11+b3_ppc64.deb
        dpkg -i hfsprogs_332.25-11+b3_ppc64.deb

        echo "Creating hfs file system over" $1
        mkfs.hfs -h $1
        mkdir -p "/boot/grub" && mount -t hfs $1 "/boot/grub"
        echo "$1  /boot/grub hfs defaults 0 2" >> /etc/fstab

        echo "Installing GRUB over" $1
        mv /usr/sbin/ofpathname /usr/sbin/ofpathname-ibm && ln -s /usr/sbin/ofpath /usr/sbin/ofpathname
        grub-install  --macppc-directory=/boot/grub
        grub-mkconfig -o /boot/grub/grub.cfg

        echo "Setting up OpenFirmware env parameter"
        nvsetenv boot-device "$( ofpath  $1 ),\grub"
        nvram --print-config=boot-device

        echo "Grub is now installed on your $1 partition"


the contents of the hfsprogs_332.25-11+b3_ppc64.deb package follows

Code:
azazel@lilith:~/tmp/sekhmet$ dpkg -c hfsprogs_332.25-11+b3_ppc64.deb
drwxr-xr-x root/root         0 2013-10-24 05:20 ./
drwxr-xr-x root/root         0 2013-10-24 05:20 ./sbin/
-rwxr-xr-x root/root    207536 2013-10-24 05:20 ./sbin/fsck.hfsplus
-rwxr-xr-x root/root     71120 2013-10-24 05:20 ./sbin/mkfs.hfsplus
drwxr-xr-x root/root         0 2013-10-24 05:20 ./usr/
drwxr-xr-x root/root         0 2013-10-24 05:20 ./usr/share/
drwxr-xr-x root/root         0 2013-10-24 05:20 ./usr/share/doc/
drwxr-xr-x root/root         0 2013-10-24 05:20 ./usr/share/doc/hfsprogs/
-rw-r--r-- root/root       458 2013-10-24 05:20 ./usr/share/doc/hfsprogs/README.Debian
-rw-r--r-- root/root      3649 2013-10-24 05:20 ./usr/share/doc/hfsprogs/changelog.Debian.gz
-rw-r--r-- root/root       207 2013-10-24 05:20 ./usr/share/doc/hfsprogs/changelog.Debian.ppc64.gz
-rw-r--r-- root/root     21674 2013-10-24 05:20 ./usr/share/doc/hfsprogs/copyright
drwxr-xr-x root/root         0 2013-10-24 05:20 ./usr/share/hfsprogs/
-rw-r--r-- root/root     22233 2013-10-24 05:20 ./usr/share/hfsprogs/hfsbootdata
drwxr-xr-x root/root         0 2013-10-24 05:20 ./usr/share/man/
drwxr-xr-x root/root         0 2013-10-24 05:20 ./usr/share/man/man8/
-rw-r--r-- root/root      2012 2013-10-24 05:20 ./usr/share/man/man8/fsck.hfsplus.8.gz
-rw-r--r-- root/root      1804 2013-10-24 05:20 ./usr/share/man/man8/mkfs.hfsplus.8.gz
lrwxrwxrwx root/root         0 2013-10-24 05:20 ./sbin/fsck.hfs -> fsck.hfsplus
lrwxrwxrwx root/root         0 2013-10-24 05:20 ./sbin/mkfs.hfs -> mkfs.hfsplus
lrwxrwxrwx root/root         0 2013-10-24 05:20 ./usr/share/man/man8/fsck.hfs.8.gz -> fsck.hfsplus.8.gz
lrwxrwxrwx root/root         0 2013-10-24 05:20 ./usr/share/man/man8/mkfs.hfs.8.gz -> mkfs.hfsplus.8.gz
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.