Here’s a conundrum we’re just facing and we don’t have a good idea were a good place for a fix would be:
Context: We’ve got a maas envrionment and
- Have several Power-Machines
- That run in
PowerNV(aka Native/Non-virtualized/Non-PowerVM) mode
- And need RHEL (which means custom image)
It turns out, that, after having all stuff done:
- a deployment fails because
- which dies becasue
ofpahtnamecannot be found.
- which dies becasue
It works for deploying Ubuntu, tho, and grub does not complain.
curtin sees a RHEL/Centos image, it runs
grub2-install as a job near the end of depolyment, but grub has hardcoded for Power (by means of
grub-ieee1275) to run
ofpathname to find out where to deploy thing to, and first checks availablility of that command. But that fails, as on PowerNV,
ofpathname always exits with 1 and complains that it does not want to be run on PowerNV.
We could avoid that by passing
--no-nvram since all calls that result in
ofpathname are guarded with
curtin can do that, but sadly only for
It turns out that
grub(2)-install does not need to be run at all since the PowerNV bootloader
petitboot does not make use of grubs’ binaries at all but rather re-uses its config, so its perfectly fine not to run
grub-install. RHEL’s installer Anaconda does just that: not call grub install
curtins config options, we could either pass a device directly, or try to pass an empty array or
None to indicate to not install grub anywhere, and the code reflects that.
Sadly, this does not work down the line, as the same function lateron (sets the empty
["none"])[curthooks.py « commands « curtin - curtin - [no description]], which it cheerfully passes on directly to
I would see several points where this could be fixed:
grub: It actually probably should not try to run that binary
ofpathnameon PowerNV (or at least check when it fails, why)
curtin(a): allow passing no-nvram to non-UEFI targets
curtin(b): allow passing empty or
maas: make some kind of exception for PowerNV (but I have no idea what that would look like)
What would you all suggest?
PS: Why does it work for ubuntu? It seems that the actual grub-install is avoided somewhere due to the post-install script of
grub-ieee1275, but that’s just a conjecture
PPS: We actually have a workaround for now: since we need a custom image anyway, we patched it to include a no-op