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

BIOS partition copying should be skipped by ignition-ostree-transposefs on non-x86_64 #677

Open
mikroskeem opened this issue Oct 22, 2024 · 3 comments

Comments

@mikroskeem
Copy link

mikroskeem commented Oct 22, 2024

Describe the bug

https://github.com/coreos/fedora-coreos-config/blob/6e9f14e6f83ab13e58d81327d8c2d3e4f10d0bd3/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-transposefs.sh#L288

When using boot_device.mirror.devices with Butane, it generates a configuration which is practically unusable on anything else but x86_64 - for example aarch64 does not ship with BIOS partition, it has only reserved partition with similar placement. I believe same issue is with PReP partition as well.

Reproduction steps

  1. Use supplied Butane configuration snippet
  2. Try installing FCOS via e.g. iPXE on non-x86_64 (e.g. aarch64)

Expected behaviour

Installation succeeds without attempting to copy existing BIOS partition (?)

Actual behaviour

Installation fails duringignition-ostree-transposefs with script attempting to copy non-existent partition.

System details

  • Bare metal / QEMU
  • Fedora CoreOS 40.20240920.3.0
  • Butane v0.20.0 - v0.22.0

Butane or Ignition config

Butane snippet with `boot_device.mirror.devices`
---
variant: "fcos"
version: "1.5.0"

boot_device:
  mirror:
    devices:
      - "/dev/disk/by-path/pci-0000:02:00.0-nvme-1"
      - "/dev/disk/by-path/pci-0000:03:00.0-nvme-1"
Generated Ignition config snippet
{
  "storage": {
    "disks": [
      {
        "device": "/dev/disk/by-path/pci-0000:02:00.0-nvme-1",
        "partitions": [
          {
            "label": "bios-1",
            "sizeMiB": 1,
            "typeGuid": "21686148-6449-6E6F-744E-656564454649"
          },
          {
            "label": "esp-1",
            "sizeMiB": 127,
            "typeGuid": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B"
          },
          {
            "label": "boot-1",
            "sizeMiB": 384
          },
          {
            "label": "root-1"
          }
        ],
        "wipeTable": true
      },
      {
        "device": "/dev/disk/by-path/pci-0000:03:00.0-nvme-1",
        "partitions": [
          {
            "label": "bios-2",
            "sizeMiB": 1,
            "typeGuid": "21686148-6449-6E6F-744E-656564454649"
          },
          {
            "label": "esp-2",
            "sizeMiB": 127,
            "typeGuid": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B"
          },
          {
            "label": "boot-2",
            "sizeMiB": 384
          },
          {
            "label": "root-2"
          }
        ],
        "wipeTable": true
      }
    ],
    "raid": [
      {
        "devices": [
          "/dev/disk/by-partlabel/boot-1",
          "/dev/disk/by-partlabel/boot-2"
        ],
        "level": "raid1",
        "name": "md-boot",
        "options": [
          "--metadata=1.0"
        ]
      },
      {
        "devices": [
          "/dev/disk/by-partlabel/root-1",
          "/dev/disk/by-partlabel/root-2"
        ],
        "level": "raid1",
        "name": "md-root"
      }
    ]
  }
}

Additional information

I believe that it's easier to handle a workaround for this in ignition-ostree-transposefs than in Butane, as Butane is not aware about target system architecture currently.

@travier travier transferred this issue from coreos/fedora-coreos-config Oct 22, 2024
@travier
Copy link
Member

travier commented Oct 22, 2024

I moved this to the tracker. Please fill out the template from https://github.com/coreos/fedora-coreos-tracker/blob/main/.github/ISSUE_TEMPLATE/bug-report.yml

@jlebon jlebon transferred this issue from coreos/fedora-coreos-tracker Oct 30, 2024
@jlebon
Copy link
Member

jlebon commented Oct 30, 2024

You have to specify the layout to match your target architecture: https://coreos.github.io/butane/config-fcos-v1_5/.

Transferred this to the docs repo since I think the issue is more that we need to make this clearer in https://docs.fedoraproject.org/en-US/fedora-coreos/storage/.

@mikroskeem
Copy link
Author

Did not notice boot_device.layout option. Indeed - it's bit unobvious and due to style in Butane page, not very convenient to see either.

Now knowing that this option exists, it solves my original issue.

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

No branches or pull requests

3 participants