kth5 / archpower

Unofficial Archlinux port to powerpc64le, powerpc64, powerpc and riscv64
https://archlinuxpower.org
77 stars 5 forks source link

yaboot iso and install instructions #36

Closed benthetechguy closed 2 years ago

benthetechguy commented 2 years ago

I've found that yaboot is generally more reliable than GRUB on ppc, so I think it's important to give the user a choice between yaboot or GRUB in the installation page for New World machines. I would do this myself, but there's no way to PR a wiki change and this repo doesn't have wiki editing enabled.

kth5 commented 2 years ago

I have yet to encounter a ppc32 machine that can't PreP or boot with Grub. I'm considering adding yaboot to the repo if someone provides a PR with patches to get it to even just build (it's been unmaintained for years).

benthetechguy commented 2 years ago

My iMac G3 gets stuck here booting any GRUB image (tried Gentoo, Debian, and this Arch POWER image): IMG_20220317_185707 My PowerMac G4 just doesn't recognize GRUB at all, even manually booting /boot/grub/powerpc.elf in Open Firmware just hangs.

If we do manage to package yaboot, it would be helpful to have an iso available that uses yaboot instead of GRUB. I had an unrelated conversation with the Debian Ports yaboot maintainer a month or two ago and I was able to get the source for the yaboot package (not available in the repo for some reason). I have attached it here in case it's helpful. If I get free time, I could take a look at whatever you have already and see what went wrong / what needs to go right.

kth5 commented 2 years ago

This looks more like a problem with RAM limitations and somehow not being able to load the SquashFS properly since the initramfs already as an issue (Initramfs unpacking failed). How much RAM do you have in this box?

The absolute minimum is 256MiB for ArchPOWER at least.

kth5 commented 2 years ago

Rather than providing just Yaboot, if there is demand a low memory version of the Image could be in order with all but the most essential drivers removed. Like, only provide ext4 and a small list of PATA/SATA controllers.

kth5 commented 2 years ago

Added a page in the wiki on minimum requirements: https://github.com/kth5/archpower/wiki/Powerpc-%7C-Minimum-Requirements

kth5 commented 2 years ago

Ran some tests and the powerpc installer needs at least 180MB RAM to boot but pacstrap will fail without swap.

benthetechguy commented 2 years ago

The G3 has 128 MB of RAM, and the G4 has 384. I took Gentoo's kernel and initramfs (which gave the same error) and tried them with yaboot, and they both loaded perfectly fine, so the problem lies with GRUB in some way. I believe we could fix this with an image that 1) uses yaboot and 2) has a squashfs small enough to fit in RAM, with just the essentials like you mentioned. Alternatively, we could do something else entirely and mount a partition that contains what would've been in the squashfs read-only or something. Your low-memory GRUB idea would work on my G3, but keep in mind my G4 still won't recognize GRUB in any form and seems to only work with yaboot.

kth5 commented 2 years ago

I got yaboot to build and run. I am unable to load any of my systems with it though so I am going to limit myself to Qemu at this stage.

It seems there are many limitations, like not having support for filesystems larger than 8GiB, no btrfs etc etc

kth5 commented 2 years ago

Latest PowerPC ISO has yaboot aded to the image and you can manually select it to boot with.

ISO: https://archlinuxpower.org/iso/beta/archpower-2022.03.24-powerpc.iso{,sig}

One the how, new wiki section: https://github.com/kth5/archpower/wiki/Installation-%7C-PowerPC-Common-Problems

benthetechguy commented 2 years ago

Thank you so much! I didn't even think about an iso that could use both bootloaders; my brain was stuck in x86 BIOS mode where you could only use one or chainload them.

benthetechguy commented 2 years ago

New problems… on the G3, yaboot can't find any valid partitions. I tested in QEMU, and it turns out your image's partition is type Apple_HFS while it should be Apple_Bootstrap. On top of this, the G4's issue isn't solved, since GRUB is still the default. Unfortunately, to solve this, a yaboot-specific image would need to be made. Since this doesn't seem like a common problem, I'm not asking for you to distribute two separate images on your site, just one for me would be sufficient since I can't get anyone to reproduce the issue (can't seem to find anyone with my same G4 model either). One piece of semi-good news is that the low memory issue isn't solved. I guess 128 MB just isn't enough for modern kernels anymore and that machine would be fine with GRUB; I'll see if anyone sells RAM upgrades for G3s in the 21st century :P

kth5 commented 2 years ago

Hmm, this can be done on the same image tho. Need to find out how. Did you read the wiki entry on how to start with yaboot?

What exactly is the error regarding the labels? I have a warning with Yaboot on my G4s but it just works otherwise.

benthetechguy commented 2 years ago

Good and bad news. My G4's motherboard has died, so I no longer have a need for yaboot. I'm purchasing a memory upgrade for my G3 that should bring it up to 1 GB and hopefully get arch running. Thanks for all your help with this, and sorry for the massive inconvenience! After some investigation on the debian-powerpc mailing list, I believe the culprit of the GRUB failures may have been some sort of bizarre memory issue, since the system's RAM was mixed and matched, and a few others have reported similar problems. The idea is that the memory is messed up in a very minor way so that normal usage is not affected and most bootloaders can get by, but GRUB touches so much more memory that it's more likely to run into problems. Thanks again for all your help dealing with this issue.