From 757b8cee3bcf3fa72d25e6bd1350c81b30496782 Mon Sep 17 00:00:00 2001 From: Gregory Haynes Date: Sun, 18 Oct 2015 02:26:31 +0000 Subject: [PATCH] Add --force to grub-install Grub fails to install the bootloader due to it being on the root partition of a block device. This is not actually a problem for us, so we need to force it to succeed. Change-Id: I335ef04ca8a8a8a5c242d3444b09bcce0a9f51e7 --- elements/vm/finalise.d/51-bootloader | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elements/vm/finalise.d/51-bootloader b/elements/vm/finalise.d/51-bootloader index 9ca83eadd..838c95bc9 100755 --- a/elements/vm/finalise.d/51-bootloader +++ b/elements/vm/finalise.d/51-bootloader @@ -80,7 +80,9 @@ function install_grub2 { echo "Installing GRUB2..." - GRUB_OPTS=${GRUB_OPTS:-""} + # We need --force so grub does not fail due to being installed on the + # root partition of a block device. + GRUB_OPTS=${GRUB_OPTS:-"--force"} # XXX: This is buggy: # - --target=i386-pc is invalid for non-i386/amd64 architectures # - and for UEFI too.