From 5ac8a98e9ad119a27b6f24ae14f3ba20ecda8918 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 7 Jun 2017 11:10:18 +1000 Subject: [PATCH] PPC bootloader; install to boot partition Using the newly exposed variables from the prior change, install the ppc bootloader to the boot partition, not the underlying loopback device. Change-Id: I0918e8df8797d6dbabf7af618989ab7f79ee9580 --- .../elements/bootloader/finalise.d/50-bootloader | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/diskimage_builder/elements/bootloader/finalise.d/50-bootloader b/diskimage_builder/elements/bootloader/finalise.d/50-bootloader index 80472156..b2087835 100755 --- a/diskimage_builder/elements/bootloader/finalise.d/50-bootloader +++ b/diskimage_builder/elements/bootloader/finalise.d/50-bootloader @@ -117,7 +117,13 @@ function install_grub2 { fi if [[ "$ARCH" =~ "ppc" ]] ; then - $GRUBNAME --modules="part_msdos" $GRUB_OPTS $BOOT_DEV --no-nvram + # For PPC, we use the "boot" partition as the one to point + # grub-install to, not the loopback device. ppc has a + # dedicated PReP boot partition. This seems to only work on + # /dev/mapper/... nodes due to matching rules in grub + # XXX : this may not be true. It seems to work, + # but requires some more investigation. + $GRUBNAME --modules="part_msdos" $GRUB_OPTS ${DEVICES[boot]} --no-nvram else $GRUBNAME --modules="biosdisk part_msdos" $GRUB_OPTS $BOOT_DEV fi