Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metal: add workaround for ppc64le PXE bug #3661

Merged
merged 1 commit into from
Nov 20, 2023
Merged
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
14 changes: 14 additions & 0 deletions mantle/platform/metal.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,20 @@ func (t *installerRun) completePxeSetup(kargs []string) error {
`, t.kern.kernel, kargsStr, t.kern.initramfs)), 0777); err != nil {
return errors.Wrap(err, "writing grub.cfg")
}

// workaround for https://github.com/coreos/coreos-assembler/issues/3370
// see: https://bugzilla.redhat.com/show_bug.cgi?id=2209435#c6
if coreosarch.CurrentRpmArch() == "ppc64le" {
subpath := filepath.Join(t.tftpdir, "boot/grub2/powerpc-ieee1275")
cp_cmd := exec.Command("/usr/lib/coreos-assembler/cp-reflink", subpath, subpath+"-2")
cp_cmd.Stderr = os.Stderr
if err := cp_cmd.Run(); err != nil {
return errors.Wrap(err, "running cp-reflink for pcp64le workaround")
}
if err := os.Rename(subpath+"-2", filepath.Join(subpath, "powerpc-ieee1275")); err != nil {
return errors.Wrap(err, "rename() for pcp64le workaround")
}
}
default:
panic("Unhandled boottype " + t.pxe.boottype)
}
Expand Down
Loading