diff --git a/pkg/manifest/anaconda_installer.go b/pkg/manifest/anaconda_installer.go index f3eba4fb00..0d5c10037e 100644 --- a/pkg/manifest/anaconda_installer.go +++ b/pkg/manifest/anaconda_installer.go @@ -275,18 +275,32 @@ func (p *AnacondaInstaller) serialize() osbuild.Pipeline { })) } - dracutModules := append( - p.AdditionalDracutModules, - "anaconda", - "rdma", - "rngd", - "multipath", - "fcoe", - "fcoe-uefi", - "iscsi", - "lunmask", - "nfs", - ) + var dracutModules []string + + if p.Type == AnacondaInstallerTypePayload { + dracutModules = append( + p.AdditionalDracutModules, + "anaconda", + "rdma", + "rngd", + "multipath", + "fcoe", + "fcoe-uefi", + "iscsi", + "lunmask", + "nfs", + ) + } else if p.Type == AnacondaInstallerTypeLive { + dracutModules = append( + p.AdditionalDracutModules, + "anaconda", + "rdma", + "rngd", + ) + } else { + panic("invalid anaconda installer type") + } + dracutOptions := dracutStageOptions(p.kernelVer, p.Biosdevname, dracutModules) dracutOptions.AddDrivers = p.AdditionalDrivers pipeline.AddStage(osbuild.NewDracutStage(dracutOptions))