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:
parent
c71ff0731c
commit
eaf3dc2ecc
4 changed files with 4 additions and 12 deletions
|
|
@ -116,11 +116,9 @@ func (img *ImageInstaller) InstantiateManifest(m *manifest.Manifest,
|
||||||
bootTreePipeline.UEFIVendor = img.Platform.GetUEFIVendor()
|
bootTreePipeline.UEFIVendor = img.Platform.GetUEFIVendor()
|
||||||
bootTreePipeline.ISOLabel = isoLabel
|
bootTreePipeline.ISOLabel = isoLabel
|
||||||
|
|
||||||
kernelOpts := make([]string, 0)
|
kernelOpts := []string{fmt.Sprintf("inst.stage2=hd:LABEL=%s", isoLabel)}
|
||||||
if img.ISORootKickstart {
|
if img.ISORootKickstart {
|
||||||
kernelOpts = append(kernelOpts, fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", isoLabel, kspath))
|
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...)
|
kernelOpts = append(kernelOpts, img.AdditionalKernelOpts...)
|
||||||
bootTreePipeline.KernelOpts = kernelOpts
|
bootTreePipeline.KernelOpts = kernelOpts
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ func (img *OSTreeInstaller) InstantiateManifest(m *manifest.Manifest,
|
||||||
bootTreePipeline.Platform = img.Platform
|
bootTreePipeline.Platform = img.Platform
|
||||||
bootTreePipeline.UEFIVendor = img.Platform.GetUEFIVendor()
|
bootTreePipeline.UEFIVendor = img.Platform.GetUEFIVendor()
|
||||||
bootTreePipeline.ISOLabel = isoLabel
|
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,
|
isoTreePipeline := manifest.NewAnacondaISOTree(m,
|
||||||
buildPipeline,
|
buildPipeline,
|
||||||
|
|
|
||||||
|
|
@ -44,11 +44,6 @@ func (p *EFIBootTree) serialize() osbuild.Pipeline {
|
||||||
panic("unsupported architecture")
|
panic("unsupported architecture")
|
||||||
}
|
}
|
||||||
|
|
||||||
kernelOpts := []string{}
|
|
||||||
if len(p.KernelOpts) > 0 {
|
|
||||||
kernelOpts = append(kernelOpts, p.KernelOpts...)
|
|
||||||
}
|
|
||||||
|
|
||||||
grubOptions := &osbuild.GrubISOStageOptions{
|
grubOptions := &osbuild.GrubISOStageOptions{
|
||||||
Product: osbuild.Product{
|
Product: osbuild.Product{
|
||||||
Name: p.product,
|
Name: p.product,
|
||||||
|
|
@ -56,7 +51,7 @@ func (p *EFIBootTree) serialize() osbuild.Pipeline {
|
||||||
},
|
},
|
||||||
Kernel: osbuild.ISOKernel{
|
Kernel: osbuild.ISOKernel{
|
||||||
Dir: "/images/pxeboot",
|
Dir: "/images/pxeboot",
|
||||||
Opts: kernelOpts,
|
Opts: p.KernelOpts,
|
||||||
},
|
},
|
||||||
ISOLabel: p.ISOLabel,
|
ISOLabel: p.ISOLabel,
|
||||||
Architectures: architectures,
|
Architectures: architectures,
|
||||||
|
|
|
||||||
|
|
@ -112,10 +112,9 @@ func (p *AnacondaISOTree) serialize() osbuild.Pipeline {
|
||||||
|
|
||||||
kernelOpts := []string{}
|
kernelOpts := []string{}
|
||||||
|
|
||||||
|
kernelOpts = append(kernelOpts, fmt.Sprintf("inst.stage2=hd:LABEL=%s", p.isoLabel))
|
||||||
if p.KSPath != "" {
|
if p.KSPath != "" {
|
||||||
kernelOpts = append(kernelOpts, fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", p.isoLabel, 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 {
|
if len(p.KernelOpts) > 0 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue