osbuild / images

Image builder image definition library
Apache License 2.0
23 stars 52 forks source link

otk-gen-partition-table: add support for ppc64/s390x partition tables #963

Closed mvo5 closed 1 month ago

mvo5 commented 1 month ago

This commit adds support for "raw" partitions without a "payload", i.e. no filesystem or LVM volume or similar. This is used for the PPC64/s390x partition table that looks like this:

otk.define:
  filesystem:
    modifications:
    # empty
    otk.external.otk-gen-partition-table:
      modifications:
        ${filesystem.modifications}
      properties:
        type: dos
        default_size: "10 GiB"
        uuid: "0x14fc63d2"
      partitions:
        - name: ppc-boot
          bootable: true
          size: "4 MiB"
          part_uuid: ""
          part_type: "41"
        - name: boot
          mountpoint: /boot
          label: boot
          size: "1 GiB"
          type: "xfs"
          fs_mntops: defaults
          part_uuid: ""
        - name: root
          mountpoint: /
          type: "xfs"
          size: "2 GiB"
          fs_mntops: defaults
          part_uuid: ""

Thanks to Florian Schüller for the initial implementation/research here, see also https://github.com/osbuild/images/pull/952


otk-gen-partition-table: add bootable flag support

This commit adds support to mark partitions as bootable from an otk-gen-partition-table input. E.g.:

{
...
  "partitions": [
    {
...
      "bootable": true,
...
    },