Skip to content

Conversation

@Johan-Liebert1
Copy link
Member

@Johan-Liebert1 Johan-Liebert1 commented Dec 2, 2025

Use the Discoverable Partition Specification UUID for root and boot
partitions

We were already using DPS UUID for both partitions, but they were UUIDs
for generic Linux Data Parition

This lets us use systemd-systemd-gpt-auto-generator which is a good
choice for LUKS decryption without UKI addons for composefs backend

Use architecture specific DPS UUID for root partition, and use XBOOTLDR
UUID for boot partition

Related: coreos/fedora-coreos-tracker#2060

Closes: coreos/fedora-coreos-tracker#1038

Use the Discoverable Partition Specification UUID for root and boot
partitions

We were already using DPS UUID for both partitions, but they were UUIDs
for generic Linux Data Parition

This lets us use `systemd-systemd-gpt-auto-generator` which is a good
choice for LUKS decryption without UKI addons for composefs backend

Use architecture specific DPS UUID for root partition, and use XBOOTLDR
UUID for boot partition

Related: coreos/fedora-coreos-tracker#2060

Closes: coreos/fedora-coreos-tracker#1038

Signed-off-by: Pragyan Poudyal <[email protected]>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly updates the partition type UUIDs for boot and root partitions across multiple architectures to use the Discoverable Partition Specification (DPS) values. This change is essential for enabling systemd-systemd-gpt-auto-generator. The review includes suggestions to define these new UUIDs as variables within the mpp-vars section of each manifest. This would improve maintainability and readability by replacing magic strings with named variables, a practice already in use for other UUIDs in these files.

Comment on lines 68 to +73
- name: boot
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: BC13C2FF-59E6-4262-A352-B275FD6F7172
size:
mpp-format-int: "{boot_size_mb * 1024 * 1024 / sector_size}"
- name: root
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: B921B045-1DF0-41C3-AF44-4C6F280D3FAE
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve readability and maintainability, consider defining these partition type UUIDs as variables in mpp-vars and referencing them here. This avoids using magic strings and makes their purpose clear. For example, you could add dps_boot_partition_type and dps_root_partition_type_aarch64 to mpp-vars.

        - name: boot
          type:
            mpp-format-string: '{dps_boot_partition_type}'
          size:
            mpp-format-int: "{boot_size_mb * 1024 * 1024 / sector_size}"
        - name: root
          type:
            mpp-format-string: '{dps_root_partition_type_aarch64}'

Comment on lines 91 to +96
- name: boot
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: BC13C2FF-59E6-4262-A352-B275FD6F7172
size:
mpp-format-int: "{boot_size_mb * 1024 * 1024 / four_k_sector_size}"
- name: root
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: B921B045-1DF0-41C3-AF44-4C6F280D3FAE
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For consistency, please apply the same variable-based approach for partition type UUIDs in the image4k definition.

        - name: boot
          type:
            mpp-format-string: '{dps_boot_partition_type}'
          size:
            mpp-format-int: "{boot_size_mb * 1024 * 1024 / four_k_sector_size}"
        - name: root
          type:
            mpp-format-string: '{dps_root_partition_type_aarch64}'

Comment on lines 69 to +74
- name: boot
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: BC13C2FF-59E6-4262-A352-B275FD6F7172
size:
mpp-format-int: "{boot_size_mb * 1024 * 1024 / sector_size}"
- name: root
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: C31C45E6-3F39-412E-80FB-4809C4980599
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve readability and maintainability, consider defining these partition type UUIDs as variables in mpp-vars and referencing them here. This avoids using magic strings and makes their purpose clear. For example, you could add dps_boot_partition_type and dps_root_partition_type_ppc64le to mpp-vars.

        - name: boot
          type:
            mpp-format-string: '{dps_boot_partition_type}'
          size:
            mpp-format-int: "{boot_size_mb * 1024 * 1024 / sector_size}"
        - name: root
          type:
            mpp-format-string: '{dps_root_partition_type_ppc64le}'

Comment on lines 93 to +98
- name: boot
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: BC13C2FF-59E6-4262-A352-B275FD6F7172
size:
mpp-format-int: "{boot_size_mb * 1024 * 1024 / four_k_sector_size}"
- name: root
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: C31C45E6-3F39-412E-80FB-4809C4980599
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For consistency, please apply the same variable-based approach for partition type UUIDs in the image4k definition.

        - name: boot
          type:
            mpp-format-string: '{dps_boot_partition_type}'
          size:
            mpp-format-int: "{boot_size_mb * 1024 * 1024 / four_k_sector_size}"
        - name: root
          type:
            mpp-format-string: '{dps_root_partition_type_ppc64le}'

Comment on lines 68 to +73
- name: boot
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: BC13C2FF-59E6-4262-A352-B275FD6F7172
size:
mpp-format-int: "{boot_size_mb * 1024 * 1024 / sector_size}"
- name: root
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: 72EC70A6-CF74-40E6-BD49-4BDA08E8F224
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve readability and maintainability, consider defining these partition type UUIDs as variables in mpp-vars and referencing them here. This avoids using magic strings and makes their purpose clear. For example, you could add dps_boot_partition_type and dps_root_partition_type_riscv64 to mpp-vars.

        - name: boot
          type:
            mpp-format-string: '{dps_boot_partition_type}'
          size:
            mpp-format-int: "{boot_size_mb * 1024 * 1024 / sector_size}"
        - name: root
          type:
            mpp-format-string: '{dps_root_partition_type_riscv64}'

Comment on lines 91 to +96
- name: boot
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: BC13C2FF-59E6-4262-A352-B275FD6F7172
size:
mpp-format-int: "{boot_size_mb * 1024 * 1024 / four_k_sector_size}"
- name: root
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: 72EC70A6-CF74-40E6-BD49-4BDA08E8F224
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For consistency, please apply the same variable-based approach for partition type UUIDs in the image4k definition.

        - name: boot
          type:
            mpp-format-string: '{dps_boot_partition_type}'
          size:
            mpp-format-int: "{boot_size_mb * 1024 * 1024 / four_k_sector_size}"
        - name: root
          type:
            mpp-format-string: '{dps_root_partition_type_riscv64}'

Comment on lines 64 to 71
- name: boot
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: BC13C2FF-59E6-4262-A352-B275FD6F7172
size:
mpp-format-int: "{boot_size_mb * 1024 * 1024 / sector_size}"
partnum: 3
- name: root
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: 5EEAD9A9-FE09-4A1E-A1D7-520D00531306
partnum: 4
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve readability and maintainability, consider defining these partition type UUIDs as variables in mpp-vars and referencing them here. This avoids using magic strings and makes their purpose clear. For example, you could add dps_boot_partition_type and dps_root_partition_type_s390x to mpp-vars.

        - name: boot
          type:
            mpp-format-string: '{dps_boot_partition_type}'
          size:
            mpp-format-int: "{boot_size_mb * 1024 * 1024 / sector_size}"
          partnum: 3
        - name: root
          type:
            mpp-format-string: '{dps_root_partition_type_s390x}'
          partnum: 4

Comment on lines 81 to 88
- name: boot
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: BC13C2FF-59E6-4262-A352-B275FD6F7172
size:
mpp-format-int: "{boot_size_mb * 1024 * 1024 / four_k_sector_size}"
partnum: 3
- name: root
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: 5EEAD9A9-FE09-4A1E-A1D7-520D00531306
partnum: 4
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For consistency, please apply the same variable-based approach for partition type UUIDs in the image4k definition.

        - name: boot
          type:
            mpp-format-string: '{dps_boot_partition_type}'
          size:
            mpp-format-int: "{boot_size_mb * 1024 * 1024 / four_k_sector_size}"
          partnum: 3
        - name: root
          type:
            mpp-format-string: '{dps_root_partition_type_s390x}'
          partnum: 4

Comment on lines 69 to +74
- name: boot
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: BC13C2FF-59E6-4262-A352-B275FD6F7172
size:
mpp-format-int: "{boot_size_mb * 1024 * 1024 / sector_size}"
- name: root
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: 4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve readability and maintainability, consider defining these partition type UUIDs as variables in mpp-vars and referencing them here. This avoids using magic strings and makes their purpose clear. For example, you could add dps_boot_partition_type and dps_root_partition_type_x86_64 to mpp-vars.

        - name: boot
          type:
            mpp-format-string: '{dps_boot_partition_type}'
          size:
            mpp-format-int: "{boot_size_mb * 1024 * 1024 / sector_size}"
        - name: root
          type:
            mpp-format-string: '{dps_root_partition_type_x86_64}'

Comment on lines 93 to +98
- name: boot
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: BC13C2FF-59E6-4262-A352-B275FD6F7172
size:
mpp-format-int: "{boot_size_mb * 1024 * 1024 / four_k_sector_size}"
- name: root
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
type: 4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For consistency, please apply the same variable-based approach for partition type UUIDs in the image4k definition.

        - name: boot
          type:
            mpp-format-string: '{dps_boot_partition_type}'
          size:
            mpp-format-int: "{boot_size_mb * 1024 * 1024 / four_k_sector_size}"
        - name: root
          type:
            mpp-format-string: '{dps_root_partition_type_x86_64}'

Copy link
Member

@jbtrystram jbtrystram left a comment

Choose a reason for hiding this comment

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

Change LGTM but could you add the reference spec in the commit message ?
Also, does it interfere with coreos-boot-generator ? I guess we would drop that entirely ?

@openshift-ci
Copy link

openshift-ci bot commented Dec 2, 2025

@Johan-Liebert1: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/rhcos a8f0ac0 link true /test rhcos

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@dustymabe
Copy link
Member

This lets us use systemd-systemd-gpt-auto-generator

Unfortunately we don't include that right now. It got re-introduced recently and broke stuff.

If we were to make this change I think we'd need to make some more careful consideration. Would we want to do it everywhere immediately? Or would we want to phase this in? Right now changes here land downstream in rhel-9.6 pretty much immediately.

cc @travier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fedora CoreOS images should support discoverable partitions

3 participants