Package: openstack-debian-images
Version: 1.14
Severity: serious
Tags: patch

Hi,

Just found and debugged this when integrating the arm64 build on
pettersson. The call to grub-install in the chroot is updating the
UEFI boot variables on the host, breaking its boot setup. Simple patch
makes all the difference.

-- System Information:
Debian Release: 8.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-0.bpo.1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages openstack-debian-images depends on:
ii  debootstrap      1.0.67
ii  extlinux         3:6.03+dfsg-5+deb8u1
ii  initramfs-tools  0.120+deb8u2
ii  kpartx           0.5.0-6+deb8u2
ii  mbr              1.1.11-5+b1
ii  parted           3.2-7
ii  qemu-utils       1:2.1+dfsg-12+deb8u6

openstack-debian-images recommends no packages.

openstack-debian-images suggests no packages.

-- no debconf information
>From 12c5e3a7de103e6cb73235cff6d11180a225c98c Mon Sep 17 00:00:00 2001
From: Steve McIntyre <st...@einval.com>
Date: Sun, 16 Apr 2017 22:37:32 +0100
Subject: [PATCH] Add --no-nvram to the grub-install command line

On a UEFI build on a UEFI-using host, this will otherwise modify the
UEFI variables on the host. We don't want that!
---
 build-openstack-debian-image | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-openstack-debian-image b/build-openstack-debian-image
index fc405a2..3a8d7d6 100755
--- a/build-openstack-debian-image
+++ b/build-openstack-debian-image
@@ -608,7 +608,7 @@ GRUB_DISABLE_OS_PROBER=true" >>${MOUNT_DIR}/etc/default/grub
 	echo "grub-efi-${ARCH} grub2/force_efi_extra_removable boolean true" | chroot ${MOUNT_DIR} debconf-set-selections
 	chroot ${MOUNT_DIR} grub-mkconfig -o /boot/grub/grub.cfg
 	# Run grub from the chroot, pointing to the bind mounted /dev device.
-	chroot ${MOUNT_DIR} grub-install --target=${GRUB_TARGET} --force-extra-removable --no-floppy --modules="part_msdos part_gpt" --grub-mkdevicemap=/boot/grub/device.map /dev/${LOOPRAW_DEVICE}
+	chroot ${MOUNT_DIR} grub-install --target=${GRUB_TARGET} --no-nvram --force-extra-removable --no-floppy --modules="part_msdos part_gpt" --grub-mkdevicemap=/boot/grub/device.map /dev/${LOOPRAW_DEVICE}
 	# Run grub from the host, pointing to the guest installation
 	#grub-install --no-floppy --modules=part_msdos --grub-mkdevicemap=${MOUNT_DIR}/boot/grub/device.map --root-directory=${MOUNT_DIR} /dev/${LOOPRAW_DEVICE}
 	umount ${MOUNT_DIR}/sys
-- 
2.1.4

Reply via email to