distro: rhel85 declarative partition tables
This commit is contained in:
parent
e21eee273c
commit
280e1b6e3d
5 changed files with 347 additions and 219 deletions
|
|
@ -53,7 +53,7 @@ const (
|
|||
blueprintPkgsKey = "blueprint"
|
||||
)
|
||||
|
||||
type ValidArches map[string]disk.PartitionTable
|
||||
type basePartitionTableMap map[string]disk.PartitionTable
|
||||
|
||||
var mountpointAllowList = []string{"/", "/var", "/var/*", "/home", "/opt", "/srv", "/usr"}
|
||||
|
||||
|
|
@ -199,7 +199,7 @@ type imageType struct {
|
|||
// If set to a value, it is preferred over the architecture value
|
||||
bootType distro.BootType
|
||||
// List of valid arches for the image type
|
||||
validArches ValidArches
|
||||
basePartitionTables basePartitionTableMap
|
||||
}
|
||||
|
||||
func (t *imageType) Name() string {
|
||||
|
|
@ -333,6 +333,22 @@ func (t *imageType) supportsUEFI() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (t *imageType) getPartitionTable(
|
||||
mountpoints []blueprint.FilesystemCustomization,
|
||||
options distro.ImageOptions,
|
||||
rng *rand.Rand,
|
||||
) (disk.PartitionTable, error) {
|
||||
archName := t.arch.Name()
|
||||
|
||||
basePartitionTable, exists := t.basePartitionTables[archName]
|
||||
|
||||
if !exists {
|
||||
return basePartitionTable, fmt.Errorf("unknown arch: " + archName)
|
||||
}
|
||||
|
||||
return disk.CreatePartitionTable(mountpoints, options.Size, basePartitionTable, rng), nil
|
||||
}
|
||||
|
||||
// local type for ostree commit metadata used to define commit sources
|
||||
type ostreeCommit struct {
|
||||
Checksum string
|
||||
|
|
@ -597,11 +613,11 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
|
|||
packageSets: map[string]rpmmd.PackageSet{
|
||||
osPkgsKey: qcow2CommonPackageSet(),
|
||||
},
|
||||
bootable: true,
|
||||
defaultSize: 10 * GigaByte,
|
||||
pipelines: qcow2Pipelines,
|
||||
exports: []string{"qcow2"},
|
||||
validArches: defaultArches,
|
||||
bootable: true,
|
||||
defaultSize: 10 * GigaByte,
|
||||
pipelines: qcow2Pipelines,
|
||||
exports: []string{"qcow2"},
|
||||
basePartitionTables: defaultBasePartitionTables,
|
||||
}
|
||||
|
||||
vhdImgType := imageType{
|
||||
|
|
@ -615,13 +631,13 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
|
|||
"sshd",
|
||||
"waagent",
|
||||
},
|
||||
defaultTarget: "multi-user.target",
|
||||
kernelOptions: "ro biosdevname=0 rootdelay=300 console=ttyS0 earlyprintk=ttyS0 net.ifnames=0",
|
||||
bootable: true,
|
||||
defaultSize: 4 * GigaByte,
|
||||
pipelines: vhdPipelines,
|
||||
exports: []string{"vpc"},
|
||||
validArches: defaultArches,
|
||||
defaultTarget: "multi-user.target",
|
||||
kernelOptions: "ro biosdevname=0 rootdelay=300 console=ttyS0 earlyprintk=ttyS0 net.ifnames=0",
|
||||
bootable: true,
|
||||
defaultSize: 4 * GigaByte,
|
||||
pipelines: vhdPipelines,
|
||||
exports: []string{"vpc"},
|
||||
basePartitionTables: defaultBasePartitionTables,
|
||||
}
|
||||
|
||||
vmdkImgType := imageType{
|
||||
|
|
@ -631,12 +647,12 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
|
|||
packageSets: map[string]rpmmd.PackageSet{
|
||||
osPkgsKey: vmdkCommonPackageSet(),
|
||||
},
|
||||
kernelOptions: "ro net.ifnames=0",
|
||||
bootable: true,
|
||||
defaultSize: 4 * GigaByte,
|
||||
pipelines: vmdkPipelines,
|
||||
exports: []string{"vmdk"},
|
||||
validArches: defaultArches,
|
||||
kernelOptions: "ro net.ifnames=0",
|
||||
bootable: true,
|
||||
defaultSize: 4 * GigaByte,
|
||||
pipelines: vmdkPipelines,
|
||||
exports: []string{"vmdk"},
|
||||
basePartitionTables: defaultBasePartitionTables,
|
||||
}
|
||||
|
||||
openstackImgType := imageType{
|
||||
|
|
@ -646,12 +662,12 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
|
|||
packageSets: map[string]rpmmd.PackageSet{
|
||||
osPkgsKey: openstackCommonPackageSet(),
|
||||
},
|
||||
kernelOptions: "ro net.ifnames=0",
|
||||
bootable: true,
|
||||
defaultSize: 4 * GigaByte,
|
||||
pipelines: openstackPipelines,
|
||||
exports: []string{"qcow2"},
|
||||
validArches: defaultArches,
|
||||
kernelOptions: "ro net.ifnames=0",
|
||||
bootable: true,
|
||||
defaultSize: 4 * GigaByte,
|
||||
pipelines: openstackPipelines,
|
||||
exports: []string{"qcow2"},
|
||||
basePartitionTables: defaultBasePartitionTables,
|
||||
}
|
||||
|
||||
// EC2 services
|
||||
|
|
@ -675,15 +691,15 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
|
|||
buildPkgsKey: ec2BuildPackageSet(),
|
||||
osPkgsKey: ec2CommonPackageSet(),
|
||||
},
|
||||
defaultTarget: "multi-user.target",
|
||||
enabledServices: ec2EnabledServices,
|
||||
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto",
|
||||
bootable: true,
|
||||
bootType: distro.LegacyBootType,
|
||||
defaultSize: 10 * GigaByte,
|
||||
pipelines: ec2Pipelines,
|
||||
exports: []string{"image"},
|
||||
validArches: ec2ValidArches,
|
||||
defaultTarget: "multi-user.target",
|
||||
enabledServices: ec2EnabledServices,
|
||||
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto",
|
||||
bootable: true,
|
||||
bootType: distro.LegacyBootType,
|
||||
defaultSize: 10 * GigaByte,
|
||||
pipelines: ec2Pipelines,
|
||||
exports: []string{"image"},
|
||||
basePartitionTables: ec2BasePartitionTables,
|
||||
}
|
||||
|
||||
amiImgTypeAarch64 := imageType{
|
||||
|
|
@ -694,14 +710,14 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
|
|||
buildPkgsKey: ec2BuildPackageSet(),
|
||||
osPkgsKey: ec2CommonPackageSet(),
|
||||
},
|
||||
defaultTarget: "multi-user.target",
|
||||
enabledServices: ec2EnabledServices,
|
||||
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0 crashkernel=auto",
|
||||
bootable: true,
|
||||
defaultSize: 10 * GigaByte,
|
||||
pipelines: ec2Pipelines,
|
||||
exports: []string{"image"},
|
||||
validArches: ec2ValidArches,
|
||||
defaultTarget: "multi-user.target",
|
||||
enabledServices: ec2EnabledServices,
|
||||
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0 crashkernel=auto",
|
||||
bootable: true,
|
||||
defaultSize: 10 * GigaByte,
|
||||
pipelines: ec2Pipelines,
|
||||
exports: []string{"image"},
|
||||
basePartitionTables: ec2BasePartitionTables,
|
||||
}
|
||||
|
||||
ec2ImgTypeX86_64 := imageType{
|
||||
|
|
@ -712,15 +728,15 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
|
|||
buildPkgsKey: ec2BuildPackageSet(),
|
||||
osPkgsKey: rhelEc2PackageSet(),
|
||||
},
|
||||
defaultTarget: "multi-user.target",
|
||||
enabledServices: ec2EnabledServices,
|
||||
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto",
|
||||
bootable: true,
|
||||
bootType: distro.LegacyBootType,
|
||||
defaultSize: 10 * GigaByte,
|
||||
pipelines: rhelEc2Pipelines,
|
||||
exports: []string{"archive"},
|
||||
validArches: ec2ValidArches,
|
||||
defaultTarget: "multi-user.target",
|
||||
enabledServices: ec2EnabledServices,
|
||||
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto",
|
||||
bootable: true,
|
||||
bootType: distro.LegacyBootType,
|
||||
defaultSize: 10 * GigaByte,
|
||||
pipelines: rhelEc2Pipelines,
|
||||
exports: []string{"archive"},
|
||||
basePartitionTables: ec2BasePartitionTables,
|
||||
}
|
||||
|
||||
ec2ImgTypeAarch64 := imageType{
|
||||
|
|
@ -731,14 +747,14 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
|
|||
buildPkgsKey: ec2BuildPackageSet(),
|
||||
osPkgsKey: rhelEc2PackageSet(),
|
||||
},
|
||||
defaultTarget: "multi-user.target",
|
||||
enabledServices: ec2EnabledServices,
|
||||
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0 crashkernel=auto",
|
||||
bootable: true,
|
||||
defaultSize: 10 * GigaByte,
|
||||
pipelines: rhelEc2Pipelines,
|
||||
exports: []string{"archive"},
|
||||
validArches: ec2ValidArches,
|
||||
defaultTarget: "multi-user.target",
|
||||
enabledServices: ec2EnabledServices,
|
||||
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0 crashkernel=auto",
|
||||
bootable: true,
|
||||
defaultSize: 10 * GigaByte,
|
||||
pipelines: rhelEc2Pipelines,
|
||||
exports: []string{"archive"},
|
||||
basePartitionTables: ec2BasePartitionTables,
|
||||
}
|
||||
|
||||
ec2HaImgTypeX86_64 := imageType{
|
||||
|
|
@ -749,15 +765,15 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
|
|||
buildPkgsKey: ec2BuildPackageSet(),
|
||||
osPkgsKey: rhelEc2HaPackageSet(),
|
||||
},
|
||||
defaultTarget: "multi-user.target",
|
||||
enabledServices: ec2EnabledServices,
|
||||
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto",
|
||||
bootable: true,
|
||||
bootType: distro.LegacyBootType,
|
||||
defaultSize: 10 * GigaByte,
|
||||
pipelines: rhelEc2Pipelines,
|
||||
exports: []string{"archive"},
|
||||
validArches: ec2ValidArches,
|
||||
defaultTarget: "multi-user.target",
|
||||
enabledServices: ec2EnabledServices,
|
||||
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto",
|
||||
bootable: true,
|
||||
bootType: distro.LegacyBootType,
|
||||
defaultSize: 10 * GigaByte,
|
||||
pipelines: rhelEc2Pipelines,
|
||||
exports: []string{"archive"},
|
||||
basePartitionTables: ec2BasePartitionTables,
|
||||
}
|
||||
|
||||
tarImgType := imageType{
|
||||
|
|
|
|||
|
|
@ -5,37 +5,179 @@ import (
|
|||
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||
)
|
||||
|
||||
var defaultArches = map[string]disk.PartitionTable{
|
||||
distro.X86_64ArchName: gptPartitionTable,
|
||||
distro.Aarch64ArchName: gptPartitionTable,
|
||||
distro.Ppc64leArchName: dosPartitionTable,
|
||||
distro.S390xArchName: dosPartitionTable,
|
||||
var defaultBasePartitionTables = basePartitionTableMap{
|
||||
distro.X86_64ArchName: disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 2048,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 204800,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Filesystem: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Filesystem: &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: 204800,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Filesystem: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Filesystem: &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: 8192,
|
||||
Type: "41",
|
||||
Bootable: true,
|
||||
},
|
||||
{
|
||||
Filesystem: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
distro.S390xArchName: disk.PartitionTable{
|
||||
UUID: "0x14fc63d2",
|
||||
Type: "dos",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Bootable: true,
|
||||
Filesystem: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
var ec2ValidArches = map[string]disk.PartitionTable{
|
||||
distro.X86_64ArchName: gptPartitionTable,
|
||||
distro.Aarch64ArchName: gptPartitionTable,
|
||||
}
|
||||
|
||||
var gptPartitionTable = disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Partitions: []disk.Partition{},
|
||||
}
|
||||
|
||||
var dosPartitionTable = disk.PartitionTable{
|
||||
UUID: "0x14fc63d2",
|
||||
Type: "dos",
|
||||
Partitions: []disk.Partition{},
|
||||
}
|
||||
|
||||
func getBasePartitionTable(arch distro.Arch, validArches ValidArches) disk.PartitionTable {
|
||||
archName := arch.Name()
|
||||
partitionTable, ok := validArches[archName]
|
||||
|
||||
if !ok {
|
||||
panic("unknown arch: " + archName)
|
||||
}
|
||||
|
||||
return partitionTable
|
||||
var ec2BasePartitionTables = basePartitionTableMap{
|
||||
distro.X86_64ArchName: disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 2048,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Filesystem: &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: 409600,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Filesystem: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 1048576,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Filesystem: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Filesystem: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,8 +23,11 @@ func qcow2Pipelines(t *imageType, customizations *blueprint.Customizations, opti
|
|||
return nil, err
|
||||
}
|
||||
|
||||
basePartitionTable := getBasePartitionTable(t.Arch(), t.validArches)
|
||||
partitionTable := disk.CreatePartitionTable(customizations.GetFilesystems(), options, t.Arch(), basePartitionTable, t.bootType, false, rng)
|
||||
partitionTable, err := t.getPartitionTable(customizations.GetFilesystems(), options, rng)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
treePipeline = prependKernelCmdlineStage(treePipeline, t, &partitionTable)
|
||||
|
||||
if options.Subscription == nil {
|
||||
|
|
@ -77,8 +80,11 @@ func vhdPipelines(t *imageType, customizations *blueprint.Customizations, option
|
|||
return nil, err
|
||||
}
|
||||
|
||||
basePartitionTable := getBasePartitionTable(t.Arch(), t.validArches)
|
||||
partitionTable := disk.CreatePartitionTable(customizations.GetFilesystems(), options, t.Arch(), basePartitionTable, t.bootType, false, rng)
|
||||
partitionTable, err := t.getPartitionTable(customizations.GetFilesystems(), options, rng)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
treePipeline.AddStage(osbuild.NewFSTabStage(partitionTable.FSTabStageOptionsV2()))
|
||||
kernelVer := kernelVerStr(packageSetSpecs[blueprintPkgsKey], customizations.GetKernel().Name, t.Arch().Name())
|
||||
treePipeline.AddStage(bootloaderConfigStage(t, partitionTable, customizations.GetKernel(), kernelVer))
|
||||
|
|
@ -105,8 +111,11 @@ func vmdkPipelines(t *imageType, customizations *blueprint.Customizations, optio
|
|||
return nil, err
|
||||
}
|
||||
|
||||
basePartitionTable := getBasePartitionTable(t.Arch(), t.validArches)
|
||||
partitionTable := disk.CreatePartitionTable(customizations.GetFilesystems(), options, t.Arch(), basePartitionTable, t.bootType, false, rng)
|
||||
partitionTable, err := t.getPartitionTable(customizations.GetFilesystems(), options, rng)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
treePipeline.AddStage(osbuild.NewFSTabStage(partitionTable.FSTabStageOptionsV2()))
|
||||
kernelVer := kernelVerStr(packageSetSpecs[blueprintPkgsKey], customizations.GetKernel().Name, t.Arch().Name())
|
||||
treePipeline.AddStage(bootloaderConfigStage(t, partitionTable, customizations.GetKernel(), kernelVer))
|
||||
|
|
@ -133,8 +142,11 @@ func openstackPipelines(t *imageType, customizations *blueprint.Customizations,
|
|||
return nil, err
|
||||
}
|
||||
|
||||
basePartitionTable := getBasePartitionTable(t.Arch(), t.validArches)
|
||||
partitionTable := disk.CreatePartitionTable(customizations.GetFilesystems(), options, t.Arch(), basePartitionTable, t.bootType, false, rng)
|
||||
partitionTable, err := t.getPartitionTable(customizations.GetFilesystems(), options, rng)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
treePipeline.AddStage(osbuild.NewFSTabStage(partitionTable.FSTabStageOptionsV2()))
|
||||
kernelVer := kernelVerStr(packageSetSpecs[blueprintPkgsKey], customizations.GetKernel().Name, t.Arch().Name())
|
||||
treePipeline.AddStage(bootloaderConfigStage(t, partitionTable, customizations.GetKernel(), kernelVer))
|
||||
|
|
@ -396,10 +408,12 @@ func ec2CommonPipelines(t *imageType, customizations *blueprint.Customizations,
|
|||
pipelines := make([]osbuild.Pipeline, 0)
|
||||
pipelines = append(pipelines, *buildPipeline(repos, packageSetSpecs[buildPkgsKey]))
|
||||
|
||||
basePartitionTable := getBasePartitionTable(t.Arch(), t.validArches)
|
||||
partitionTable := disk.CreatePartitionTable(customizations.GetFilesystems(), options, t.Arch(), basePartitionTable, t.bootType, true, rng)
|
||||
partitionTable, err := t.getPartitionTable(customizations.GetFilesystems(), options, rng)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var treePipeline *osbuild.Pipeline
|
||||
var err error
|
||||
switch arch := t.arch.Name(); arch {
|
||||
// rhel-ec2-x86_64, rhel-ha-ec2
|
||||
case distro.X86_64ArchName:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue