From 93425d14ce251139e0518a3a9533506dd1615f97 Mon Sep 17 00:00:00 2001 From: Jiri Stransky Date: Fri, 23 Sep 2016 14:09:02 +0200 Subject: [PATCH] Fix grub installation for RHEL Grub is first removed and then installed during RHEL image building. The grub2 package typically requires the same version of grub2-tools, so if we just remove and install the grub2 package, the installation can potentially fail on being out of sync with grub2-tools version. Removing and reinstalling both packages fixes this issue. Those packages are already in package map for RHEL as "grub-pc", so we can use this alias. Change-Id: Iefd9c17fffd43de3fea260510ad218b1322eecb3 Closes-Bug: #1627000 --- elements/redhat-common/pre-install.d/15-remove-grub | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elements/redhat-common/pre-install.d/15-remove-grub b/elements/redhat-common/pre-install.d/15-remove-grub index f116a852..ba1d922a 100755 --- a/elements/redhat-common/pre-install.d/15-remove-grub +++ b/elements/redhat-common/pre-install.d/15-remove-grub @@ -23,7 +23,7 @@ fi # XXX : it is not clear this is necessary for fedora/centos7 and it's # install hooks. Investigation is required. if rpm -q grub2; then - install-packages -e grub2 + install-packages -e grub-pc fi # now configure things to re-install grub at the end. We don't want @@ -43,5 +43,5 @@ fi # So we download the latest grub2 package and setup the install script # to just install the single-package, which will be called later by # vm/finalise.d/51-bootloader -install-packages -d /tmp/grub grub2 +install-packages -d /tmp/grub grub-pc echo "rpm -i /tmp/grub/*.rpm" > /tmp/grub/install