diskimage-builder/elements/ubuntu/pre-install.d/00-remove-grub
Ripal Nathuji 8f118af7d3 Fix issue with Ubuntu grub pre-install step for ARM
The Ubuntu build for ARM breaks when the pre-install step attempts to remove
grub components. This change gates those package removals based on whether
they are currently installed.

Change-Id: Ie169dbf12213e69b3713b3b1f9a68ae224f9fd31
2013-11-19 15:26:17 -06:00

15 lines
317 B
Bash
Executable File

#!/bin/bash
# The grub post-kernel install hook will barf if the block device can't be
# found (as happens in a chroot).
# Temporarily remove grub, to avoid that confusion.
set -e
if dpkg-query -W grub-pc; then
apt-get -y remove grub-pc
fi
if dpkg-query -W grub2-common; then
apt-get -y remove grub2-common
fi