Commit graph

7 commits

Author SHA1 Message Date
Tomas Hozza
7ac1d68fb6 rhel85/90: allow specifying the boot partition for the grub2 stage
Specifying the boot partition filesystem UUID in grub2 stage is required
in case the `/boot` mountpoint is on a separate partition. This is the
case of RHEL-8.5 and RHEL-9.0 `ami` and `ec2` images.

Extend `disk.PartitionTable` with a new `BootPartition` method, which
returns a pointer to partition with FS mountpoint `/boot` if there is
such partition, or `nil` otherwise.

Extend the RHEL-8.5 and RHEL-9.0 code creating options structure for
grub2 osbuild stage to include the boot partition in case it has been
provided.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-08-13 08:24:37 +02:00
Achilleas Koutsou
5909ca202d disk: boot partition finder as partitiontable method
Moved the function that searches for the boot partition index to the
PartitionTable struct as a method. The method returns -1 if not found
and it's now the responsibility of the caller to handle the case where
it is not found.
2021-07-24 15:54:00 +02:00
Achilleas Koutsou
23de460a66 disk: generate fstab stage options for osbuild v2
Same function as v1 but generates v2 struct for v2 pipelines
2021-07-24 15:54:00 +02:00
Achilleas Koutsou
8090621300 osbuild: rename package to osbuild1
Preparing for version 2 of the manifest schema, which will be
implemented in a separate package (osbuild2) alongside the original.
2021-03-17 18:12:17 +00:00
Ondřej Budai
ae0d1b8663 distro/rhel84: remove hardcoded root partition UUIDs
Let's use the root partition UUID from the partition table instead of
hardcoding the value.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2020-12-15 16:43:39 +01:00
Ondřej Budai
d52c1ea1f8 distro/rhel84: generate fstab stage from partition table
Now that we have an abstract partition table definition, we can use it to
generate org.osbuild.fstab stage options.

This is extremely nice because it removes magic contains.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2020-12-15 16:43:39 +01:00
Ondřej Budai
76926ecd35 distro/rhel84: encode the partition table using abstract data-types
Using osbuild.QEMUAssemblerOptions to encode a partition table was weird.
This commit introduces a disk package that contains data types for defining
partition tables. Also, there's a handy function to convert the abstact
partition table to osbuild.QEMUAssemblerOptions.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2020-12-15 16:43:39 +01:00