Split image type definitions into separate files by logical groups (mostly by footprint and cloud platform) for easier navigation. The image types are now all defined as package globals, like in Fedora. Image specific package sets are defined in the file for the image type grouping instead of the package_sets file. A notable change is in the AWS/AMI types, which have different configs based on OS version. To get around this, we create each image type with a function parameterised by the OS version string. This is a bit messy and inconsistent with other image types, but it's a temporary workaround which will be cleaned up as the definitions get closer to the new framework used in the fedora package.
168 lines
4 KiB
Go
168 lines
4 KiB
Go
package rhel9
|
|
|
|
import (
|
|
"github.com/osbuild/osbuild-composer/internal/common"
|
|
"github.com/osbuild/osbuild-composer/internal/disk"
|
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
|
)
|
|
|
|
var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
|
distro.X86_64ArchName: disk.PartitionTable{
|
|
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
|
Type: "gpt",
|
|
Partitions: []disk.Partition{
|
|
{
|
|
Size: 1 * common.MebiByte, // 1MB
|
|
Bootable: true,
|
|
Type: disk.BIOSBootPartitionGUID,
|
|
UUID: disk.BIOSBootPartitionUUID,
|
|
},
|
|
{
|
|
Size: 200 * common.MebiByte, // 200 MB
|
|
Type: disk.EFISystemPartitionGUID,
|
|
UUID: disk.EFISystemPartitionUUID,
|
|
Payload: &disk.Filesystem{
|
|
Type: "vfat",
|
|
UUID: disk.EFIFilesystemUUID,
|
|
Mountpoint: "/boot/efi",
|
|
Label: "EFI-SYSTEM",
|
|
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
|
FSTabFreq: 0,
|
|
FSTabPassNo: 2,
|
|
},
|
|
},
|
|
{
|
|
Size: 500 * common.MebiByte, // 500 MB
|
|
Type: disk.XBootLDRPartitionGUID,
|
|
UUID: disk.FilesystemDataUUID,
|
|
Payload: &disk.Filesystem{
|
|
Type: "xfs",
|
|
Mountpoint: "/boot",
|
|
Label: "boot",
|
|
FSTabOptions: "defaults",
|
|
FSTabFreq: 0,
|
|
FSTabPassNo: 0,
|
|
},
|
|
},
|
|
{
|
|
Size: 2 * common.GibiByte, // 2GiB
|
|
Type: disk.FilesystemDataGUID,
|
|
UUID: disk.RootPartitionUUID,
|
|
Payload: &disk.Filesystem{
|
|
Type: "xfs",
|
|
Label: "root",
|
|
Mountpoint: "/",
|
|
FSTabOptions: "defaults",
|
|
FSTabFreq: 0,
|
|
FSTabPassNo: 0,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
distro.Aarch64ArchName: disk.PartitionTable{
|
|
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
|
Type: "gpt",
|
|
Partitions: []disk.Partition{
|
|
{
|
|
Size: 200 * common.MebiByte, // 200 MB
|
|
Type: disk.EFISystemPartitionGUID,
|
|
UUID: disk.EFISystemPartitionUUID,
|
|
Payload: &disk.Filesystem{
|
|
Type: "vfat",
|
|
UUID: disk.EFIFilesystemUUID,
|
|
Mountpoint: "/boot/efi",
|
|
Label: "EFI-SYSTEM",
|
|
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
|
FSTabFreq: 0,
|
|
FSTabPassNo: 2,
|
|
},
|
|
},
|
|
{
|
|
Size: 500 * common.MebiByte, // 500 MB
|
|
Type: disk.XBootLDRPartitionGUID,
|
|
UUID: disk.FilesystemDataUUID,
|
|
Payload: &disk.Filesystem{
|
|
Type: "xfs",
|
|
Mountpoint: "/boot",
|
|
Label: "boot",
|
|
FSTabOptions: "defaults",
|
|
FSTabFreq: 0,
|
|
FSTabPassNo: 0,
|
|
},
|
|
},
|
|
{
|
|
Size: 2 * common.GibiByte, // 2GiB
|
|
Type: disk.FilesystemDataGUID,
|
|
UUID: disk.RootPartitionUUID,
|
|
Payload: &disk.Filesystem{
|
|
Type: "xfs",
|
|
Label: "root",
|
|
Mountpoint: "/",
|
|
FSTabOptions: "defaults",
|
|
FSTabFreq: 0,
|
|
FSTabPassNo: 0,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
distro.Ppc64leArchName: disk.PartitionTable{
|
|
UUID: "0x14fc63d2",
|
|
Type: "dos",
|
|
Partitions: []disk.Partition{
|
|
{
|
|
Size: 4 * common.MebiByte,
|
|
Type: "41",
|
|
Bootable: true,
|
|
},
|
|
{
|
|
Size: 500 * common.MebiByte, // 500 MB
|
|
Payload: &disk.Filesystem{
|
|
Type: "xfs",
|
|
Mountpoint: "/boot",
|
|
Label: "boot",
|
|
FSTabOptions: "defaults",
|
|
FSTabFreq: 0,
|
|
FSTabPassNo: 0,
|
|
},
|
|
},
|
|
{
|
|
Size: 2 * common.GibiByte, // 2GiB
|
|
Payload: &disk.Filesystem{
|
|
Type: "xfs",
|
|
Mountpoint: "/",
|
|
FSTabOptions: "defaults",
|
|
FSTabFreq: 0,
|
|
FSTabPassNo: 0,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
distro.S390xArchName: disk.PartitionTable{
|
|
UUID: "0x14fc63d2",
|
|
Type: "dos",
|
|
Partitions: []disk.Partition{
|
|
{
|
|
Size: 500 * common.MebiByte, // 500 MB
|
|
Payload: &disk.Filesystem{
|
|
Type: "xfs",
|
|
Mountpoint: "/boot",
|
|
Label: "boot",
|
|
FSTabOptions: "defaults",
|
|
FSTabFreq: 0,
|
|
FSTabPassNo: 0,
|
|
},
|
|
},
|
|
{
|
|
Size: 2 * common.GibiByte, // 2GiB
|
|
Bootable: true,
|
|
Payload: &disk.Filesystem{
|
|
Type: "xfs",
|
|
Mountpoint: "/",
|
|
FSTabOptions: "defaults",
|
|
FSTabFreq: 0,
|
|
FSTabPassNo: 0,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|