Skip to content

Commit

Permalink
introduce PowerNV variant for grub2 class
Browse files Browse the repository at this point in the history
PowerNV (bare-metal) systems only need the grub config to be present, they
ignore the actual binaries, so make the install method a no-op.
  • Loading branch information
sharkcz committed Jun 27, 2019
1 parent e6a0466 commit 9e620fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyanaconda/bootloader/__init__.py
Expand Up @@ -61,8 +61,8 @@ def get_bootloader_class(platform_class=None):
return IPSeriesGRUB2

if platform_class is platform.PowerNV:
from pyanaconda.bootloader.grub2 import GRUB2
return GRUB2
from pyanaconda.bootloader.grub2 import PowerNVGRUB2
return PowerNVGRUB2

if platform_class is platform.S390:
from pyanaconda.bootloader.zipl import ZIPL
Expand Down
11 changes: 11 additions & 0 deletions pyanaconda/bootloader/grub2.py
Expand Up @@ -614,3 +614,14 @@ def write_defaults(self):
# PowerVM / POWER on qemu/kvm
defaults.write("GRUB_DISABLE_OS_PROBER=true\n")
defaults.close()

class PowerNVGRUB2(GRUB2):
"""PowerNV GRUBv2"""

#
# installation should be a no-op, just writing the config is sufficient for the
# firmware's bootloader (petitboot)
#

def install(self, args=None):
pass

0 comments on commit 9e620fa

Please sign in to comment.