Skip to content

Commit

Permalink
anaconda: kickstart stage for container-installer
Browse files Browse the repository at this point in the history
Let's do what we *can* do with the kickstart stage and leave the options
that are not yet supported in a custom kickstart file. I'll then
transfer the options into the kickstart stage.
  • Loading branch information
supakeen committed Dec 21, 2023
1 parent a6540a6 commit 41bccae
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions pkg/manifest/anaconda_installer_iso_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,18 +338,39 @@ func (p *AnacondaInstallerISOTree) serialize() osbuild.Pipeline {
images,
manifests))

// do what we can in our kickstart stage
kickstartOptions, err := osbuild.NewKickstartStageOptionsWithOSTreeContainer(
"/osbuild-base.ks",
p.Users,
p.Groups,
path.Join("/run/install/repo", p.PayloadPath),
"oci",
"",
"")

if err != nil {
panic("failed to create kickstartstage options")
}

pipeline.AddStage(osbuild.NewKickstartStage(kickstartOptions))

// and what we can't do in a separate kickstart that we include

kickstartFile, err := fsnode.NewFile(p.KSPath, nil, nil, nil, []byte(`
ostreecontainer --url=/run/install/repo/container --transport=oci --no-signature-verification
%include /run/install/repo/osbuild-base.ks
rootpw --lock
user --name fedora --groups wheel
lang en_US.UTF-8
keyboard us
timezone UTC
clearpart --all
part /boot/efi --fstype=efi --size=512 --fsoptions="umask=0077"
part /boot --fstype=ext2 --size=1024 --label=boot
part swap --fstype=swap --size=1024
part / --fstype=ext4 --grow
reboot --eject
`))

Expand Down

0 comments on commit 41bccae

Please sign in to comment.