Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootloader: Identify prep partition on loop device #702

Closed
wants to merge 1 commit into from

Conversation

sacsant
Copy link
Contributor

@sacsant sacsant commented Jul 17, 2024

While writing a bootc image to a qcow2 file, required partitions are
created using a loop device. On ppc64le arch the type value used
for prep boot partition is 41.

"partitions": [
{
"node": "/dev/loop0p1",
"start": 2048,
"size": 8192,
"type": "41",
"bootable": true
},{
"node": "/dev/loop0p2",

Expand the PReP Boot partition check logic to ensure bootloader
specific files are correctly written when a loop device is used.

While writing a bootc image to a qcow2 file, required
partitions are created using a loop device. On ppc64le
arch the type value for prep boot partition is 41.

"partitions": [
         {
            "node": "/dev/loop0p1",
            "start": 2048,
            "size": 8192,
            "type": "41",
            "bootable": true
         },{
            "node": "/dev/loop0p2",

Expand the PReP Boot partition check logic to ensure bootloader
specific files are correctly written when a loop device is used.

Signed-off-by: Sachin Sant <[email protected]>
@sacsant
Copy link
Contributor Author

sacsant commented Jul 17, 2024

Writing to a qcow2 image the bootloader specific information is correctly written to first partition (/dev/loop0p1)

Deploying container image...Freed objects: 118 bytes
done
Running bootupctl to install bootloader

bootupctl backend install --write-uuid --device /dev/loop0p1 /run/osbuild/mounts
Installed: grub.cfg
Trimming mounts

@cgwalters
Copy link
Collaborator

cgwalters commented Jul 17, 2024

While writing a bootc image to a qcow2 file

You mean specifically with bootc-image-builder, correct? I think the real bug is osbuild/bootc-image-builder#497 (comment)

(And the GPT type UUID should match)

Copy link
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Marking as changes requested so this shows up as reviewed, but to be clear I may be wrong about something so feel free to push back!

@sacsant
Copy link
Contributor Author

sacsant commented Jul 18, 2024

While writing a bootc image to a qcow2 file

You mean specifically with bootc-image-builder, correct? I think the real bug is osbuild/bootc-image-builder#497 (comment)

Yes, using bootc-image-builder.

(And the GPT type UUID should match)

Both dos and gpt are supported types. So yes, this can be changed to GPT (and the partition Type values 41 and 83 to 9E1A2D38-C612-4316-AA26-8B49521E5A8B & 0FC63DAF-8483-4772-8E79-3D69D8477DE4 respectively).

Let me know which is preferred?

@sacsant
Copy link
Contributor Author

sacsant commented Jul 18, 2024

Have updated the bootc-image-builder PR to use gpt format instead of dos. Closing this PR.

@sacsant sacsant closed this Jul 18, 2024
@sacsant sacsant deleted the qcow2 branch July 23, 2024 05:54
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.

2 participants