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
This commit is contained in:
Jiri Stransky 2016-09-23 14:09:02 +02:00
parent 3a0f46282f
commit 93425d14ce
1 changed files with 2 additions and 2 deletions

View File

@ -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