Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions pkg/distro/generic/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -929,13 +929,25 @@ func imageInstallerImage(t *imageType,
img.Kickstart.Keyboard = img.OSCustomizations.Keyboard
img.Kickstart.Timezone = &img.OSCustomizations.Timezone

// customizations.kernel.append (and image-type defaults) belong on the
// *installed* system. For image-installer the OS payload is a tar with no
// partition table, so org.osbuild.kernel-cmdline is never emitted for it.
// Pass the options through kickstart `bootloader --append` instead.
img.Kickstart.KernelOptionsAppend = append(img.Kickstart.KernelOptionsAppend, kernelOptions(t, customizations)...)

img.ExtraBasePackages = packageSets[installerPkgsKey]

img.InstallerCustomizations, err = installerCustomizations(t, bp.Customizations, options)
if err != nil {
return nil, err
}

// installerCustomizations() currently copies OS kernel options into
// InstallerCustomizations.KernelOptionsAppend, which anaconda_tar_installer
// then places on the ISO GRUB cmdline. Clear those so blueprint/OS kargs
// are not applied to the installer media itself.
img.InstallerCustomizations.KernelOptionsAppend = nil

img.ISOCustomizations, err = isoCustomizations(t, bp.Customizations)
if err != nil {
return nil, err
Expand All @@ -951,6 +963,7 @@ func imageInstallerImage(t *imageType,
img.InstallerCustomizations.EnabledAnacondaModules = append(img.InstallerCustomizations.EnabledAnacondaModules, anaconda.ModuleUsers)

if img.Kickstart.Unattended {
// These remain ISO-only installer boot options (not installed-system kargs).
img.InstallerCustomizations.KernelOptionsAppend = append(installerConfig.KickstartUnattendedExtraKernelOpts, img.InstallerCustomizations.KernelOptionsAppend...)
}

Expand Down
11 changes: 11 additions & 0 deletions pkg/manifest/anaconda_installer_iso_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,17 @@ func (p *AnacondaInstallerISOTree) makeKickstartStages(stageOptions *osbuild.Kic
if sudoersPost := makeKickstartSudoersPost(kickstartOptions.SudoNopasswd); sudoersPost != nil {
stageOptions.Post = append(stageOptions.Post, *sudoersPost)
}

// Apply installed-system kernel arguments via kickstart. This is the
// supported path for liveimg/tar payload installers (image-installer),
// where the OS tree has no partition table and therefore never runs the
// org.osbuild.kernel-cmdline stage.
if len(kickstartOptions.KernelOptionsAppend) > 0 {
stageOptions.Bootloader = &osbuild.BootloaderOptions{
Append: strings.Join(kickstartOptions.KernelOptionsAppend, " "),
}
}

stages = append(stages, osbuild.NewKickstartStage(stageOptions))

if p.SubscriptionPipeline != nil {
Expand Down