Skip to content

linux: Adjust config to allow booting of installer ISO on ppc64 - #486572

Merged
alyssais merged 2 commits into
NixOS:masterfrom
OPNA2608:fix/ppc64-linux-kernel-hfsiso-startup
Jun 10, 2026
Merged

linux: Adjust config to allow booting of installer ISO on ppc64#486572
alyssais merged 2 commits into
NixOS:masterfrom
OPNA2608:fix/ppc64-linux-kernel-hfsiso-startup

Conversation

@OPNA2608

@OPNA2608 OPNA2608 commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

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.


image

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • powerpc64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: kernel The Linux kernel labels Feb 3, 2026
@OPNA2608

OPNA2608 commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

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…

@OPNA2608
OPNA2608 marked this pull request as ready for review February 3, 2026 22:43
@OPNA2608 OPNA2608 added the 6.topic: exotic Exotic hardware or software platform label Feb 3, 2026
@nixpkgs-ci
nixpkgs-ci Bot requested review from K900, Ma27, alyssais and zowoq February 3, 2026 22:57
@K900

K900 commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Is it even possible to get more information out of those platforms in any way? Maybe some earlycon/netconsole shenanigans?

@OPNA2608

OPNA2608 commented Feb 7, 2026

Copy link
Copy Markdown
Contributor Author

Couldn't get the installer to send anything via netconsole even in the working configuration (but the same options worked on a Debian installation), but I think keep_bootcon got me somewhere.

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:

Feb 07 18:23:03 nixos kernel: ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Feb 07 18:23:03 nixos kernel: ata1.00: ATA-8: SAMSUNG HD501LJ, CR100-10, max UDMA7
Feb 07 18:23:03 nixos kernel: ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 0/32)
Feb 07 18:23:03 nixos kernel: ata1.00: configured for UDMA/133
Feb 07 18:23:03 nixos kernel: scsi 0:0:0:0: Direct-Access     ATA      SAMSUNG HD501LJ  0-10 PQ: 0 ANSI: 5

[once userspace is reached]

Feb 07 18:23:14 nixos kernel: pata-pci-macio 0001:03:0d.0: enabling device (0010 -> 0012)
Feb 07 18:23:14 nixos kernel: pata-pci-macio 0001:03:0d.0: Activating pata-macio chipset K2 ATA-6, Apple bus ID 3
Feb 07 18:23:14 nixos kernel: scsi host5: pata_macio
Feb 07 18:23:14 nixos kernel: ata5: PATA max UDMA/100 irq 39 lpm-pol 0
Feb 07 18:23:15 nixos kernel: ata5.00: ATAPI: PIONEER DVD-RW  DVR-109, A912, max UDMA/66
Feb 07 18:23:15 nixos kernel: scsi 5:0:0:0: CD-ROM            PIONEER  DVD-RW  DVR-109  A912 PQ: 0 ANSI: 5

Debian's Kconfig says y to CONFIG_ATA and CONFIG_PATA_MACIO, will build a kernel with these overnight and check if that fixes the booting issue for good.

@OPNA2608

OPNA2608 commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

Yep, that booted fine from disc. Added those.

image

@nixpkgs-ci
nixpkgs-ci Bot requested a review from a team February 8, 2026 16:49
@OPNA2608
OPNA2608 force-pushed the fix/ppc64-linux-kernel-hfsiso-startup branch from 584705c to 06ce058 Compare February 8, 2026 16:51
@OPNA2608 OPNA2608 changed the title linux: Build-in HFS(+) support on POWER linux: Fix installer booting on ppc64 Feb 8, 2026
@OPNA2608 OPNA2608 changed the title linux: Fix installer booting on ppc64 linux: Adjust config to allow booting of installer ISO on ppc64 Feb 8, 2026

UNICODE = yes; # Casefolding support for filesystems
}
// lib.optionalAttrs stdenv.hostPlatform.isPower {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does 64-bit POWER also need this?

@OPNA2608 OPNA2608 May 31, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped HFS_FS for now, assuming that's what the comment was about.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pkgs/os-specific/linux/kernel/common-config.nix Outdated
OPNA2608 added 2 commits June 1, 2026 16:05
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.
@OPNA2608
OPNA2608 force-pushed the fix/ppc64-linux-kernel-hfsiso-startup branch from 06ce058 to 48d00af Compare June 1, 2026 14:16
@alyssais
alyssais added this pull request to the merge queue Jun 10, 2026
Merged via the queue into NixOS:master with commit c47d498 Jun 10, 2026
33 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: exotic Exotic hardware or software platform 6.topic: kernel The Linux kernel 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants