kth5 / archpower

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

yaboot and grub both cannot find their filesystem on USB - iMac 20" G5 A1145 #83

Closed ej0rge closed 1 month ago

ej0rge commented 1 month ago

Been banging my head against this a bit.

I've successfully installed MacOS Leopard on my A1145 iMac via USB. I know it's an advanced topic but (1) In a previous life i worked in embedded linux so I'm not much afraid of clunky boot monitors, and (2) the optical drive is dead. I tried manually cleaning the lens to no effect.

Yaboot displays the device path and says it is invalid and that it cannot read the config file.

Grub says "invalid number" and then "invalid filesystem" over and over. From memory anyway - i don't have either screen in front of me.

I get this behavior both with an HFS filesystem on an Apple drive map and with Fat32 (not exfat, but fat32) on MBR. I'm using the 5/5/24 powerpc64 iso as the source for the filesystem. As an aside, it appears that OF can't read iso9660 on USB.

Any suggestions, short of finding another optical drive?

ej0rge commented 1 month ago

ok, after casting a wider net, i found someone selling an allegedly working dvd drive compatible with my imac for $8 shipped and it should be here in a few days.

But i am still willing to try to flesh out this functionality if anyone wants to help. I can't code well but i can test, troubleshoot, and document very well.

kth5 commented 1 month ago

Thanks for testing this! I personally have not yet had an immediate need to boot from USB so I diid not spend much time on it.

Did you dd it onto the stick?

I can image just creating a HFS partition labelling it the same as the installer ISO (ARCH_2024xx), then copying the entirety of the ISO contents over and then booting yaboot from OF manually could work. Though I'm not sure if any holy penguin pee needs to bless anything (like ybin would do later).

ej0rge commented 1 month ago

I used the 5/25/2024 archpower-current-powerpc64.iso

Attempts to use sticks created with dd and balena etcher were unsuccessful - OF could not read the binary. My supposition is that OF understands ISO9660 on optical drives but doesn't understand ISO9660 on usb mass storage. Or it's really picky about magic numbers or something.

As an aside, I installed OSX Leopard from USB by preparing a USB stick as HFS with TransMac and then transferring the contents of i think a DMG file and then issuing "boot ud:,\\::tbxi"

An attempt to prepare the stick as HFS with TransMac on a windows machine was also unsuccessful in the same manor. I don't recall the exact error message OF gives, but it failed to load and execute yaboot.

Formatting the stick as fat32 with ridgecrop consulting's excellent "fat32format" on windows 10 and then mounting the iso image on MacOS to copy the filesystem to the stick did allow OF to execute yaboot and grub from the stick.

Formatting the stick as HFS with an Apple drive map on MacOS and copying the files also produced a filesystem that OF could read and execute both yaboot and grub.

My replacement optical drive was delivered today so i will be attempting to boot from that after work.

mrbubzie commented 1 month ago

We can keep this super simple…on a regular Intel Mac download balena etcher and format the usb using disk utility as Apple partition map and hfsplus…boot into open-firmware and depending on which usb you have have it plugged into will be usb1 , usb2, usb3, etc in my case I have it plugged into usb0 so when your in open firmware the commend to boot off the usb would be usbX/disk@1:,\\grub.elf where X represents whatever usb port it’s plugged into.. that will get you booted into the installer

mrbubzie commented 1 month ago

His iso images work fine booting from usb…I have used this boot method on iMac g4 all the way up to PowerBook g4, iMac g5 and Powermac G5. @kth5 has the kde 6 issue been resolved and sorry for for highjacking this ticket lol I just didn’t wanna open another ticket when it’s not needed!

ej0rge commented 1 month ago

ok, I think my early failure to boot a usb stick created with balena etcher may have been an iso from 4/24 which was a couple hundred megs smaller and probably missing some stuff.

64-bit kernels do *not work on the imac G5. This is a subject for another issue and we may not care seeing as it maxes at 4.5gb of ram, and then only if you track down a dimm with the correct geometry.

I am able to boot grub from USB and it loads the kernel and ramdisk, but i get an invalid memory error message following that.

Yaboot still complains that it cannot find its config file when launched from usb, but from CD it will launch and ultimately the kernel fails the same way.