manifest: always add inst.stage2 kernel option for Anaconda

The bootiso.mono stage in osbuild that we used until recently adds the
inst.stage2 option unconditionally [1] whereas the current grub2.iso
stage that we use now doesn't.

[1] 8511add169/stages/org.osbuild.bootiso.mono (L369)
This commit is contained in:
Achilleas Koutsou 2022-12-09 18:31:54 +01:00 committed by Tom Gundersen
parent c71ff0731c
commit eaf3dc2ecc
4 changed files with 4 additions and 12 deletions

View file

@ -116,11 +116,9 @@ func (img *ImageInstaller) InstantiateManifest(m *manifest.Manifest,
bootTreePipeline.UEFIVendor = img.Platform.GetUEFIVendor()
bootTreePipeline.ISOLabel = isoLabel
kernelOpts := make([]string, 0)
kernelOpts := []string{fmt.Sprintf("inst.stage2=hd:LABEL=%s", isoLabel)}
if img.ISORootKickstart {
kernelOpts = append(kernelOpts, fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", isoLabel, kspath))
} else {
kernelOpts = append(kernelOpts, fmt.Sprintf("inst.stage2=hd:LABEL=%s", isoLabel))
}
kernelOpts = append(kernelOpts, img.AdditionalKernelOpts...)
bootTreePipeline.KernelOpts = kernelOpts

View file

@ -93,7 +93,7 @@ func (img *OSTreeInstaller) InstantiateManifest(m *manifest.Manifest,
bootTreePipeline.Platform = img.Platform
bootTreePipeline.UEFIVendor = img.Platform.GetUEFIVendor()
bootTreePipeline.ISOLabel = isoLabel
bootTreePipeline.KernelOpts = []string{fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", isoLabel, kspath)}
bootTreePipeline.KernelOpts = []string{fmt.Sprintf("inst.stage2=hd:LABEL=%s", isoLabel), fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", isoLabel, kspath)}
isoTreePipeline := manifest.NewAnacondaISOTree(m,
buildPipeline,

View file

@ -44,11 +44,6 @@ func (p *EFIBootTree) serialize() osbuild.Pipeline {
panic("unsupported architecture")
}
kernelOpts := []string{}
if len(p.KernelOpts) > 0 {
kernelOpts = append(kernelOpts, p.KernelOpts...)
}
grubOptions := &osbuild.GrubISOStageOptions{
Product: osbuild.Product{
Name: p.product,
@ -56,7 +51,7 @@ func (p *EFIBootTree) serialize() osbuild.Pipeline {
},
Kernel: osbuild.ISOKernel{
Dir: "/images/pxeboot",
Opts: kernelOpts,
Opts: p.KernelOpts,
},
ISOLabel: p.ISOLabel,
Architectures: architectures,

View file

@ -112,10 +112,9 @@ func (p *AnacondaISOTree) serialize() osbuild.Pipeline {
kernelOpts := []string{}
kernelOpts = append(kernelOpts, fmt.Sprintf("inst.stage2=hd:LABEL=%s", p.isoLabel))
if p.KSPath != "" {
kernelOpts = append(kernelOpts, fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", p.isoLabel, p.KSPath))
} else {
kernelOpts = append(kernelOpts, fmt.Sprintf("inst.stage2=hd:LABEL=%s", p.isoLabel))
}
if len(p.KernelOpts) > 0 {