Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional steps for booting using grub on ppc #12

Closed
Sadoon-AlBader opened this issue Mar 6, 2021 · 5 comments
Closed

Additional steps for booting using grub on ppc #12

Sadoon-AlBader opened this issue Mar 6, 2021 · 5 comments
Assignees

Comments

@Sadoon-AlBader
Copy link
Collaborator

Sadoon-AlBader commented Mar 6, 2021

How to use Grub for booting:

  • create a bootstrap partition with at least 4MiB size (better 12MiB to be safe, default 800KiB is too small, even ATA diskspace is cheap)
    image

  • install as normal (assumed to /mnt)

$ pacstrap /mnt/ base linux grub hfsutils
  • format bootstrap partition (/dev/sda2) from target (no hfsutils on iso yet)
$ arch-chroot /mnt
$$ hformat /dev/sda2
$ ^D
  • mount bootstrap partition (assumed /dev/sda2) to /boot/grub on the target rootfs and configure/install
$ mkdir /mnt/boot/grub
$ mount /dev/sda2 /mnt/boot/grub
# bootstrap partition should always get mounted to /boot/grub so grub hooks may work properly
$ genfstab -U /mnt > /mnt/etc/fstab
$ arch-chroot /mnt
$$ grub-mkconfig -o /boot/grub/grub.cfg
# this one will fail if bootstrap is too small (depends on Grub mods included with core.elf)
$$ grub-install 

This method will execute on KVM but will fail at setting the OF variable boot-device properly. No fix known at this time.

Originally posted by @kth5 in #5 (comment)

Additional steps needed to fix the issue where OF doesn't recognize grub:

$ hmount /dev/sda2
$ hattrib -t tbxi -c UNIX :System:Library:CoreServices:BootX
$ hattrib -b :System:Library:CoreServices
$ humount

With this I think we have a complete method of installing Arch on both ppc Macs and OpenPOWER systems.
I think we need a small wiki to make these steps more friendly, I'll open another issue and I'll work on that.

@Sadoon-AlBader Sadoon-AlBader self-assigned this Mar 6, 2021
@saul-huerta
Copy link

saul-huerta commented Jul 17, 2021

In the step you mention:
$ hmount /dev/sda2
$ hattrib -t tbxi -c UNIX :System:Library:CoreServices:BootX
$ hattrib -b :System:Library:CoreServices
$ humount
These commands where are they put? Going to OF or restarting the ArchPower installation media or after putting the command "arch-chroot /mnt"? because in both the installation media environment and the installed system environment it tells me that ":System:Library:CoreServices:BootX" is not a directory.

@crazycusti
Copy link

crazycusti commented Nov 13, 2021

Try grub-install --macppc-directory=/boot/grub

after that, look in /boot/grub if these files exists:

/
mach_kernel
System/
Library/
CoreServices/
.disk_label
.disk_label.contentDetails
BootX
grub.elf
SystemVersion.plist

Source: https://forums.gentoo.org/viewtopic-t-1082746.html?sid=76347d1408dd36d53967326ff81ac7b1

@kth5
Copy link
Owner

kth5 commented Jan 11, 2022

Added a Wiki page:

https://github.com/kth5/archpower/wiki/NewWorld-PowerMac-G3-G4-G5-installation-with-Grub

@crazycusti I don't have a G4 mac at hand until tomorrow but I'll give it a go.

@retronica
Copy link

Try grub-install --macppc-directory=/boot/grub

after that, look in /boot/grub if these files exists:

/ mach_kernel System/ Library/ CoreServices/ .disk_label .disk_label.contentDetails BootX grub.elf SystemVersion.plist

Source: https://forums.gentoo.org/viewtopic-t-1082746.html?sid=76347d1408dd36d53967326ff81ac7b1

I have found the need to specify --macppc-directory=/boot/grub on both mac G4 laptops i've tested

@kth5
Copy link
Owner

kth5 commented May 6, 2024

Closing this for inactivity & it's only a historically relevant ticket.

@kth5 kth5 closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants