Skip to content

Commit

Permalink
distro,manifest: replace ifcfg with net-lib for EL10 and F42 installers
Browse files Browse the repository at this point in the history
In RHEL 10 and Fedora 42, the ifcfg module was replaced by net-lib.
Anaconda changes:
- rhinstaller/anaconda#6125
- rhinstaller/anaconda#6155

Remove ifcfg from common anaconda dracut stage modules and add either
ifcfg or net-lib to each installer based on distro version.
  • Loading branch information
achilleas-k committed Feb 19, 2025
1 parent 391277d commit 1bc8380
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 1 deletion.
28 changes: 28 additions & 0 deletions pkg/distro/fedora/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,13 @@ func liveInstallerImage(workload workload.Workload,
img.AdditionalDrivers = append(img.AdditionalDrivers, installerConfig.AdditionalDrivers...)
}

// In Fedora 42 the ifcfg module was replaced by net-lib.
if common.VersionLessThan(d.osVersion, "42") {
img.AdditionalDracutModules = append(img.AdditionalDracutModules, "ifcfg")
} else {
img.AdditionalDracutModules = append(img.AdditionalDracutModules, "net-lib")
}

return img, nil
}

Expand Down Expand Up @@ -486,6 +493,13 @@ func imageInstallerImage(workload workload.Workload,

d := t.arch.distro

// In Fedora 42 the ifcfg module was replaced by net-lib.
if common.VersionLessThan(d.osVersion, "42") {
img.AdditionalDracutModules = append(img.AdditionalDracutModules, "ifcfg")
} else {
img.AdditionalDracutModules = append(img.AdditionalDracutModules, "net-lib")
}

img.Product = d.product

// We don't know the variant that goes into the OS pipeline that gets installed
Expand Down Expand Up @@ -701,6 +715,13 @@ func iotInstallerImage(workload workload.Workload,
img.AdditionalDrivers = append(img.AdditionalDrivers, installerConfig.AdditionalDrivers...)
}

// In Fedora 42 the ifcfg module was replaced by net-lib.
if common.VersionLessThan(d.osVersion, "42") {
img.AdditionalDracutModules = append(img.AdditionalDracutModules, "ifcfg")
} else {
img.AdditionalDracutModules = append(img.AdditionalDracutModules, "net-lib")
}

img.Product = d.product
img.Variant = "IoT"
img.OSVersion = d.osVersion
Expand Down Expand Up @@ -837,6 +858,13 @@ func iotSimplifiedInstallerImage(workload workload.Workload,
img.AdditionalDracutModules = append(img.AdditionalDracutModules, "dbus-broker")

d := t.arch.distro
// In Fedora 42 the ifcfg module was replaced by net-lib.
if common.VersionLessThan(d.osVersion, "42") {
img.AdditionalDracutModules = append(img.AdditionalDracutModules, "ifcfg")
} else {
img.AdditionalDracutModules = append(img.AdditionalDracutModules, "net-lib")
}

img.Product = d.product
img.Variant = "IoT"
img.OSName = "fedora"
Expand Down
1 change: 1 addition & 0 deletions pkg/distro/rhel/rhel10/bare_metal.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func mkImageInstallerImgType() *rhel.ImageType {
"nvdimm", // non-volatile DIMM firmware (provides nfit, cuse, and nd_e820)
"prefixdevname",
"prefixdevname-tools",
"net-lib",
},
AdditionalDrivers: []string{
"ipmi_devintf",
Expand Down
1 change: 1 addition & 0 deletions pkg/distro/rhel/rhel8/bare_metal.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func mkImageInstaller() *rhel.ImageType {
AdditionalDracutModules: []string{
"prefixdevname",
"prefixdevname-tools",
"ifcfg",
},
}

Expand Down
1 change: 1 addition & 0 deletions pkg/distro/rhel/rhel8/edge.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ func mkEdgeInstallerImgType(rd *rhel.Distribution) *rhel.ImageType {
AdditionalDracutModules: []string{
"prefixdevname",
"prefixdevname-tools",
"ifcfg",
},
}
it.RPMOSTree = true
Expand Down
1 change: 1 addition & 0 deletions pkg/distro/rhel/rhel9/bare_metal.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func mkImageInstallerImgType() *rhel.ImageType {
"nvdimm", // non-volatile DIMM firmware (provides nfit, cuse, and nd_e820)
"prefixdevname",
"prefixdevname-tools",
"ifcfg",
},
AdditionalDrivers: []string{
"cuse",
Expand Down
1 change: 1 addition & 0 deletions pkg/distro/rhel/rhel9/edge.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func mkEdgeInstallerImgType() *rhel.ImageType {
"nvdimm", // non-volatile DIMM firmware (provides nfit, cuse, and nd_e820)
"prefixdevname",
"prefixdevname-tools",
"ifcfg",
},
AdditionalDrivers: []string{
"cuse",
Expand Down
1 change: 0 additions & 1 deletion pkg/manifest/anaconda_installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ func dracutStageOptions(kernelVer string, biosdevname bool, additionalModules []
"convertfs",
"network-manager",
"network",
"ifcfg",
"url-lib",
"drm",
"plymouth",
Expand Down

0 comments on commit 1bc8380

Please sign in to comment.