diff -Nru grub2-2.02~beta2/debian/changelog grub2-2.02~beta2/debian/changelog --- grub2-2.02~beta2/debian/changelog 2015-05-19 14:31:03.000000000 +0200 +++ grub2-2.02~beta2/debian/changelog 2015-09-11 17:17:56.000000000 +0200 @@ -1,3 +1,13 @@ +grub2 (2.02~beta2-9ubuntu1.4) trusty; urgency=medium + + * Fix the configuration logic to force prompting for + installation if grub2 is already present on disk. + This is needed to workaround a bug in Lucid that leaves + grub-pc/install_devices empty even if grub2 is installed. + (LP: #1491894) + + -- Louis Bouchard Fri, 11 Sep 2015 14:34:13 +0200 + grub2 (2.02~beta2-9ubuntu1.3) trusty; urgency=medium * Do not hang headless servers indefinitely on boot after edge case power diff -Nru grub2-2.02~beta2/debian/postinst.in grub2-2.02~beta2/debian/postinst.in --- grub2-2.02~beta2/debian/postinst.in 2015-05-13 16:51:57.000000000 +0200 +++ grub2-2.02~beta2/debian/postinst.in 2015-09-11 16:10:10.000000000 +0200 @@ -578,6 +578,24 @@ done db_subst "$question" RAW_CHOICES "$ids" db_subst "$question" CHOICES "$descriptions" + # When upgrading from a system migrated from Lucid + # grub-pc/install_devices may be incorectly empty + # we need to check if grub is installed. + db_get grub-pc/install_devices + if [ -z "$RET" ]; then + grub2_is_installed= + for device in $ids; do + if scan_grub2 "${device%","}"; then + grub2_is_installed=1 + fi + done + # If grub2 is installed, force the question + # to be asked so we are sure that the most recent + # code is installed on the MBR + if [ "$grub2_is_installed" ]; then + db_fset $question seen false + fi + fi db_input high "$question" || true db_go db_get "$question"