Skip to content

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

@mikroskeem

Description

@mikroskeem

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions