Skip to content

Commit

Permalink
metal: add workaround for ppc64le PXE bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jlebon authored and dustymabe committed Nov 20, 2023
1 parent 121ab69 commit 1c722b3
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit 1c722b3

Please sign in to comment.