Avoid installation of os-proper in VM environments
authorMichael Prokop <mika@grml.org>
Fri, 21 May 2021 14:35:54 +0000 (16:35 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 21 May 2021 14:38:27 +0000 (16:38 +0200)
os-prober is known to cause problems in certain environments,
and might cause update-grub in the chroot to hang. The os-proper
package is a recommends of the grub-common package, so let's
install grub-pc by disabling recommends.

As reported on IRC by Paul Menzel.

grml-debootstrap

index c31b5cd..6c0d625 100755 (executable)
@@ -1519,7 +1519,7 @@ if [[ -z "${GRUB}" ]] || ! dd if="${GRUB}" bs=512 count=1 2>/dev/null | cat -v |
   if ! chroot "${MNTPOINT}" dpkg --list grub-pc 2>/dev/null | grep -q '^ii' ; then
     echo "Notice: grub-pc package not present yet, installing it therefore."
     # shellcheck disable=SC2086
-    DEBIAN_FRONTEND=$DEBIAN_FRONTEND chroot "$MNTPOINT" apt-get -y install $DPKG_OPTIONS grub-pc
+    DEBIAN_FRONTEND=$DEBIAN_FRONTEND chroot "$MNTPOINT" apt-get -y --no-install-recommends install $DPKG_OPTIONS grub-pc
   fi
 
   mkdir -p "${MNTPOINT}/boot/grub"