diskimage-builder/elements/vm/install.d/51-grub
Chris Jones 9243a8e3f9 Move grub installation to the vm element
It makes more sense for grub to be installed by the vm element, since
that is intended to produce directly bootable disk images.

Change-Id: Ic340ba9d3ec4dbeea3aed3576fc899c1424783a2
2012-12-06 12:44:18 +00:00

13 lines
418 B
Bash
Executable File

#!/bin/bash
# Configure grub
set -e
set -o xtrace
# XXX: grub-probe on the nbd0 device returns nothing - workaround, manually
# specify modules. https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1073731
grub-install --modules="biosdisk part_msdos" /dev/nbd0
# XXX: Undiagnosed, but the LABEL=cloudimg-rootfs isn't being picked up: workaround it.
sed -i 's%/dev/nbd0p1%LABEL=cloudimg-rootfs%' /boot/grub/grub.cfg