-
Notifications
You must be signed in to change notification settings - Fork 75
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
bootc enablement for ppc64le #578
Comments
It's x86_64 and aarch64 only L251 It'd be great to get ppc64le support. |
Following the s390x enablement tracker, I was able to make some progress on this.
I have run into following boot loader related error: Installing image: docker://quay.io/sacsant/fedora-bootc:latest Any suggestions on how to solve this error? I am unable to connect the dots and having trouble identifying code that needs a change to fix this. |
To be specific I am currently focussed on creating a qcow2 based bootable image.
|
That's in https://github.com/coreos/bootupd/ |
Thanks Colin for the pointer. Since I am completely new to this project/code, I am still unable to connect the dots. Should I use the coreos/bootupd code as reference and make similar changes to other repositories (bootc-image-builder or images or perhaps bootc??) or should I change coreos/bootupd? Can you guide me on this? I noticed that coreos/bootupd uses powerpc64 as a value to identify IBM Power architecture while other projects like bootc-image-builder and likes use ppc64le as a value. Is there a theory behind this difference ? |
This is based on how your programming language detects the platform e.g:
rust:
|
What's extra fun here is that it's actually only for ppc64le on Fedora derivatives that the "Rust vs RPM" architecture naming is different. Rust=powerpc64 RPM=ppc64le whereas they match for s390x, x86_64 and aarch64. Note that the Go and RPM names are otherwise different for amd64 vs x86_64 etc. |
Going back to the original error of "Unsupported architecture: powerpc64" , I added following code in bootc Is the above code correct? With this code using install to-disk command the operation proceeds further but fails eventually with DEBUG exec: "sgdisk" "-Z" "/dev/sdb" "-U" "R" "-n" "1:0:+4M" "-c" "1:BIOS-BOOT" "-t" "1:9E1A2D38-C612-4316-AA26-8B49521E5A8B" "-n" "3:0:0" "-c" "3:root" "-t" "3:0FC63DAF-8483-4772-8E79-3D69D8477DE4" Following partition layout was written to the disk What partition is missing and is referenced by index 3? I guess there should be /dev/sdb2 pointing to /boot . Can someone help decode this error? |
I was able to modify the code to move past this issue. Using block setup: direct
Now both the methods qcow2 and install to-disk fail during boot loader install Running bootupctl to install bootloader
|
With some additional changes (read hard coded values) I was able to successfully use bootc install to-disk and to-filesystem commands on ppc64le architecture. I was also able to successfully verify boot of these images (disk device as well as qcow2) on IBM Power. |
Cool! Feel free to send a PR, it's OK if it's not polished, we can iterate on it! |
I have submitted following pull requests for initial set of changes Working on following changes:
|
Hi @sacsant I am working on s390x support, and I just raised this PR osbuild/images#758
I think my patch may be relevant to this issue. |
Indeed. Thanks @yoheiueda |
@cgwalters to identify correct partition for grub2-install, I have tried using following code in lib/src/bootloader.rs // get PowerPC-PReP-boot device information Unfortunately this code fails with return code 1 which if I read correctly corresponding to errno EPERM (Operation not permitted). Creating root filesystem (xfs) on device /dev/sdb3 (size=99.5G)
Is there a restriction on running commands like realpath in bootc environment? The disk is partitioned correctly as follows. fdisk -l /dev/sdb Device Start End Sectors Size Type |
The failure is due to non-existent directory Initializing ostree layout ERROR Installing to disk: Installing bootloader: realpath failed with exit status: 1 |
I have submitted #667 to include ppc64le specific boot loader install logic. |
At this point, I think we've fixed everything that's needed in this specific project! There's clearly more work - such as enabling c9s bootc that are probably best tracked in e.g. https://gitlab.com/fedora/bootc/tracker/-/issues/15 |
I am trying to figure out how bootc (bootable container) works and started experimenting with it on Power(ppc64le arch).
I came across https://developers.redhat.com/articles/2024/05/07/image-mode-rhel-bootable-containers# and attempted to create a bootable container image on Power using the recipe mentioned in bootc image builder project .
I used following command (Fedora40 running on PowerVM Logical Partition [LPAR])
podman run --pull=newer --rm --privileged --pid=host quay.io/sacsant/fedora-bootc:40 bootc install to-disk --target-no-signature-verification --wipe --block-setup direct --filesystem xfs /dev/sdc
WARN[0000] Failed to decode the keys ["storage.options.thinpool"] from "/usr/share/containers/storage.conf"
time="2024-05-25T06:03:33-04:00" level=warning msg="Failed to decode the keys ["storage.options.thinpool"] from "/usr/share/containers/storage.conf""
time="2024-05-25T06:03:34-04:00" level=warning msg="Failed to decode the keys ["storage.options.thinpool"] from "/usr/share/containers/storage.conf""
Installing image: docker://quay.io/sacsant/fedora-bootc:40
Digest: sha256:6c88359c24a8c351bf2f742c0f5cfd9a5b32b1e6e475499fc9612c017e2cf860
Wiping /dev/sdc1
Wiping device /dev/sdc1
Wiping /dev/sdc2
Wiping device /dev/sdc2
Wiping /dev/sdc3
Wiping device /dev/sdc3
/dev/sdc3: 4 bytes were erased at offset 0x00000000 (xfs): 58 46 53 42
Wiping /dev/sdc
Wiping device /dev/sdc
/dev/sdc: 2 bytes were erased at offset 0x000001fe (dos): 55 aa
/dev/sdc: calling ioctl to re-read partition table: Success
ERROR Installing to disk: Creating rootfs: Unsupported architecture: powerpc64
Can someone help me debug this problem? Is code missing for ppc64le arch?
The text was updated successfully, but these errors were encountered: