linux: Adjust config to allow booting of installer ISO on ppc64 - #486572
Conversation
|
Welp. I don't quite get why this is necessary (and it's hard to understand without being able to see early boot logs & without a serial port), but it definitely fixes booting one of these weird ISOs from USB. Booting from DVD still gets stuck, but I don't have a good idea for how to debug what's going on there… |
|
Is it even possible to get more information out of those platforms in any way? Maybe some earlycon/netconsole shenanigans? |
|
Couldn't get the installer to send anything via I think the disc drive doesn't get recognised early into the boot process, so it just hangs there and waits. The drive is attached via IDE / PATA / "Ultra ATA/100" / however you want to call it, while everything else goes via SATA: Debian's Kconfig says |
584705c to
06ce058
Compare
|
|
||
| UNICODE = yes; # Casefolding support for filesystems | ||
| } | ||
| // lib.optionalAttrs stdenv.hostPlatform.isPower { |
There was a problem hiding this comment.
Does 64-bit POWER also need this?
There was a problem hiding this comment.
I only have 64-bit POWER hardware, and isPower is included under that.
Did you mean specifically the built-in HFS support, since the line right below it also builds-in HFS+ support?
There was a problem hiding this comment.
Let me expand on that I guess…
For booting, there needs to be a HFS+ (or apparently HFS) partition with some special magic applied to it. #488831 would end up using HFS+ for our ISOs, but I don't yet know what would happen if you were to install a system to disk and boot from that. I imagine these settings would still be necessary there though.
Now AFAIU, booting from HFS should work the same way, and would presumably run into the same requirement. I'm not sure if xorriso can produce such an installer, and I have no real reason to mess with that since my G5 supports HFS+. My machine is also busy with a world rebuild right now, so doing any testing there is gonna take some days…
When it comes to booting an installed system though, the user will be taking care of the partition format, and they could maybe select HFS there. I got a spare disk for my machine recently, so I could give that a try some time… I think actually installing NixOS will need further module changes first though, and I would prolly work on those with HFS+ as the intended boot partition format before trying with HFS.
Can drop HFS_FS for now and re-add it later if desired - doesn't look like it's a requirement for HFSPLUS_FS.
There was a problem hiding this comment.
Dropped HFS_FS for now, assuming that's what the comment was about.
There was a problem hiding this comment.
No, I just meant I thought maybe this should be a Power32 check, because I thought Apple only used 32-bit. Evidently I was wrong!
There was a problem hiding this comment.
Well… I'll prolly still leave HFS_FS dropped for now, until I can actually try that out much later and see how it behaves ^^".
I thought Apple only used 32-bit.
The last series of POWER systems that they released, the G5 series (2003 - 2006), had 64-bit IBM PPC970 CPU(s) in them: PowerMac G5 desktop, iMac G5 AIO, Xserve G5 rack server.
To get an installer ISO recognised on some systems (Apple PowerMac G5 is what I'm working with), it must be made with certain flags to xorriso that make the ISO9660 filesystem accessible as an HFS+ partition, to allow HFS+ blessing of the boot files. Changes for that will be submitted at a later date. When such an image is booted with the current kernel settings (DVD/USB, doesn't matter), GRUB works fine, but the kernel gets stuck. There is no textual boot output on the machine at the point where it gets stuck, so I can't really debug. A basic ISO9660 image (booted directly via firmware commands) goes all the way to the shell without issues, so the issue is with the HFS+ partition format. Building the HFS+ module into the kernel seems to fix this. Some older machines are supposedly unable to read HFS+ and may instead need HFS. Such a disc setup might not be producable with xorriso (haven't played around with that), and I don't have one of those machines to test anything on, so I won't include HFS_FS for now.
The built-in graphical boot manager on PowerMacs usually doesn't acknowledge USBs. If one wants to boot an installer without messing around in Open Firmware, then a disc must be used. The disc drives in PowerMacs are connected via IDE, and will get stuck during early boot if IDE/ATA support is not built into the kernel. The PATA_MACIO option is also needed to handle the particular controller used on Macs.
06ce058 to
48d00af
Compare

To get an installer ISO recognised on some systems (PowerMacs for sure, prolly other CHRP-using POWER machines as well), it must be made with certain flags to xorriso that make it accessible as an HFS+ partition. (Changes for that will be submitted at a later date.)
When such an image is booted (DVD/USB, doesn't matter), GRUB works fine, but the kernel gets stuck. Undoing these flags and booting the resulting image (via firmware commands) goes all the way to the shell without issues.
Building the HFS+ module into the kernel seems to fix this.
Some older machines are also unable to read HFS+ and instead need HFS. Such a disc setup can't be produced with xorriso, and I don't have one of those machines to test anything on, but I assume it would also run into this issue. So build in HFS support too.
On PowerMacs, the graphical boot manager doesn't acknowledge USB drives, so a disc must be used to boot the installer.
The disc drives on PowerMacs are connected via IDE, and the kernel will get stuck while booting unless support for IDE (/ATA/whatever you want to call it) is built-in. There is also a config option for handling the specific controller used on these systems, so enable that as well.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.