osbuild / bootc-image-builder

A container for deploying bootable container images.
https://osbuild.org
Apache License 2.0
108 stars 50 forks source link

aarch64 uses dos format partitions #551

Closed cgwalters closed 1 month ago

cgwalters commented 1 month ago

https://github.com/osbuild/bootc-image-builder/blame/babb61b0112a7b55b4d1137f200074a86ff25f61/bib/cmd/bootc-image-builder/partition_tables.go#L79

Why?? git annotate points to https://github.com/osbuild/bootc-image-builder/commit/344a1c4d0aebe6502f6a56faf188839cc0151184 cc @achilleas-k

cgwalters commented 1 month ago

While we're here, I think we should fix ppc64le and s390x in osbuild to use gpt.

For reference it looks like the coreos pipeline is doing this, e.g. https://github.com/coreos/coreos-assembler/blob/aea950cfadfae9eae9b92c6bb22bfaafe84c092c/src/osbuild-manifests/coreos.osbuild.s390x.mpp.yaml#L59

cgwalters commented 1 month ago

@yoheiueda (in case you know)...is there any reason not to use gpt for s390x? AFAICS it seems today Anaconda in RHEL9.4 defaults to dos...which, just skimming the code looks like it's probably this https://github.com/rhinstaller/anaconda/blob/19df67bad509b4cb65ff23c24a7d54ee586b5e68/pyanaconda/modules/storage/initialization.py#L95 just because anaconda treats zipl as "mbr"?

And I'm guessing that the osbuild Go reimplementation of this just inherited that logic. But ISTM that we should really change Anaconda too to just default to GPT unconditionally nowadays. I guess there's maybe a vague concern about old x86_64 BIOS systems, but that's clearly not relevant for s390x.

(Random aside, searching for "anaconda gpt" is now dominated by AI-related search results because "gpt" acquired a much more popular expansion in recent years, and "anaconda" was previously also a separate python installer...)

yoheiueda commented 1 month ago

@cgwalters zipl supports GPT, so I can't come up with any ideas to use dos partition table format.

achilleas-k commented 1 month ago

https://github.com/osbuild/bootc-image-builder/blame/babb61b0112a7b55b4d1137f200074a86ff25f61/bib/cmd/bootc-image-builder/partition_tables.go#L79

Why?? git annotate points to 344a1c4 cc @achilleas-k

We should switch to gpt wherever possible, I agree. For some history about this:

The original switch for the aarch64 image happened in osbuild/images@92cdb0f082024d0cd6fe2588175559fc311365ae for the Fedora IoT images, which were the basis for the bootc disk configurations. The change was made to add support for Raspberry Pi boards and to match the Fedora ImageFactory configurations.

As for the s390x, I don't know. My guess it's been dos since forever and no one requested a change for it when most image definitions moved to gpt by default.