@@ -17,7 +17,6 @@ import (
17
17
"github.com/osbuild/images/pkg/customizations/anaconda"
18
18
"github.com/osbuild/images/pkg/customizations/kickstart"
19
19
"github.com/osbuild/images/pkg/disk"
20
- "github.com/osbuild/images/pkg/disk/partition"
21
20
"github.com/osbuild/images/pkg/image"
22
21
"github.com/osbuild/images/pkg/manifest"
23
22
"github.com/osbuild/images/pkg/osbuild"
@@ -95,11 +94,32 @@ func manifestForISO(c *ManifestConfig, rng *rand.Rand) (*manifest.Manifest, erro
95
94
Local : true ,
96
95
}
97
96
97
+ platform := & platform.Data {
98
+ Arch : c .Architecture ,
99
+ ImageFormat : platform .FORMAT_ISO ,
100
+ UEFIVendor : c .SourceInfo .UEFIVendor ,
101
+ }
102
+ switch c .Architecture {
103
+ case arch .ARCH_X86_64 :
104
+ platform .BIOSPlatform = "i386-pc"
105
+ case arch .ARCH_AARCH64 :
106
+ // aarch64 always uses UEFI, so let's enforce the vendor
107
+ if c .SourceInfo .UEFIVendor == "" {
108
+ return nil , fmt .Errorf ("UEFI vendor must be set for aarch64 ISO" )
109
+ }
110
+ case arch .ARCH_S390X :
111
+ platform .ZiplSupport = true
112
+ case arch .ARCH_PPC64LE :
113
+ platform .BIOSPlatform = "powerpc-ieee1275"
114
+ }
98
115
// The ref is not needed and will be removed from the ctor later
99
116
// in time
100
- img := image .NewAnacondaContainerInstaller (containerSource , "" )
117
+ img := image .NewAnacondaContainerInstaller (platform , "install.iso" , containerSource , "" )
101
118
img .ContainerRemoveSignatures = true
102
119
img .RootfsCompression = "zstd"
120
+ if c .Architecture == arch .ARCH_X86_64 {
121
+ img .InstallerCustomizations .ISOBoot = manifest .Grub2ISOBoot
122
+ }
103
123
104
124
img .Product = c .SourceInfo .OSRelease .Name
105
125
img .OSVersion = c .SourceInfo .OSRelease .VersionID
@@ -149,32 +169,8 @@ func manifestForISO(c *ManifestConfig, rng *rand.Rand) (*manifest.Manifest, erro
149
169
}
150
170
img .InstallerCustomizations .UseRHELLoraxTemplates = needsRHELLoraxTemplates (c .SourceInfo .OSRelease )
151
171
152
- img .Platform = & platform.Data {
153
- Arch : c .Architecture ,
154
- ImageFormat : platform .FORMAT_ISO ,
155
- UEFIVendor : c .SourceInfo .UEFIVendor ,
156
- }
157
- switch c .Architecture {
158
- case arch .ARCH_X86_64 :
159
- img .Platform .(* platform.Data ).BIOSPlatform = "i386-pc"
160
- img .InstallerCustomizations .ISOBoot = manifest .Grub2ISOBoot
161
- case arch .ARCH_AARCH64 :
162
- // aarch64 always uses UEFI, so let's enforce the vendor
163
- if c .SourceInfo .UEFIVendor == "" {
164
- return nil , fmt .Errorf ("UEFI vendor must be set for aarch64 ISO" )
165
- }
166
- case arch .ARCH_S390X :
167
- img .Platform .(* platform.Data ).ZiplSupport = true
168
- case arch .ARCH_PPC64LE :
169
- img .Platform .(* platform.Data ).BIOSPlatform = "powerpc-ieee1275"
170
- case arch .ARCH_RISCV64 :
171
- // nothing special needed
172
- default :
173
- return nil , fmt .Errorf ("unsupported architecture %v" , c .Architecture )
174
- }
175
172
// see https://github.com/osbuild/bootc-image-builder/issues/733
176
173
img .InstallerCustomizations .ISORootfsType = manifest .SquashfsRootfs
177
- img .Filename = "install.iso"
178
174
179
175
installRootfsType , err := disk .NewFSType (c .RootFSType )
180
176
if err != nil {
0 commit comments