diff -pruN 1.128/debian/changelog 1.128ubuntu14/debian/changelog
--- 1.128/debian/changelog	2015-12-02 23:26:47.000000000 +0000
+++ 1.128ubuntu14/debian/changelog	2019-10-08 09:24:14.000000000 +0000
@@ -1,3 +1,187 @@
+grub-installer (1.128ubuntu14) eoan; urgency=medium
+
+  * When running on a ZFS filesystem udevadm returns an error
+    which can be ignored. (LP: #1847228)
+  * On zfs 0.8 cache is in /etc, do not attempt to copy it from
+    /boot/zfs when it doesn't exist.
+
+ -- Jean-Baptiste Lallement <jean-baptiste.lallement@canonical.com>  Tue, 08 Oct 2019 11:24:14 +0200
+
+grub-installer (1.128ubuntu13) eoan; urgency=medium
+
+  [ Cherrypick 1.165 Colin Watson ]
+  * On Linux, mount/unmount /run to work around #918590. LP: #1838525
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com>  Wed, 25 Sep 2019 16:51:02 +0100
+
+grub-installer (1.128ubuntu12) cosmic; urgency=medium
+
+  [ Hans van den Bogert ]
+  * Fix support for installation on NVMe with RAID1 (LP: #1771845)
+
+ -- Mathieu Trudel-Lapierre <cyphermox@ubuntu.com>  Fri, 06 Jul 2018 13:16:28 -0400
+
+grub-installer (1.128ubuntu11) cosmic; urgency=medium
+
+  * grub-installer: actually also do not purge grub-gfxpayload-lists as it's
+    yet another dependency of grub-pc.
+
+ -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>  Wed, 27 Jun 2018 16:03:38 +0200
+
+grub-installer (1.128ubuntu10) cosmic; urgency=medium
+
+  * grub-installer: do not purge grub-pc-bin as well as it's a dependency of
+    grub-pc.
+
+ -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>  Mon, 25 Jun 2018 18:28:07 +0200
+
+grub-installer (1.128ubuntu9) cosmic; urgency=medium
+
+  * grub-installer: install grub-pc for EFI setups and make sure we're
+    not purging it earlier in case it got installed. It's needed to make sure
+    the right maintainer scripts are run and the ESP populated. (LP: #1775743)
+
+ -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>  Tue, 19 Jun 2018 10:25:14 +0200
+
+grub-installer (1.128ubuntu8) zesty; urgency=medium
+
+  * Fix a typo in PReP bootdev selection code; we should not skip over a valid
+    mpath device in favor of the underlying block device, since it won't be
+    available for grub-install later. (LP: #1681932)
+
+ -- Mathieu Trudel-Lapierre <cyphermox@ubuntu.com>  Tue, 11 Apr 2017 16:21:30 -0400
+
+grub-installer (1.128ubuntu7) zesty; urgency=medium
+
+  * grub-installer: deal with NVMe devices (or other devices with a partition
+    separator) being used to back the PReP partition on ppc64el. (LP: #1656048)
+
+ -- Mathieu Trudel-Lapierre <cyphermox@ubuntu.com>  Fri, 13 Jan 2017 16:19:30 -0500
+
+grub-installer (1.128ubuntu6) yakkety; urgency=medium
+
+  * grub-installer: remove grub/grub-legacy code. We only do variants of grub2.
+    (LP: #1611740)
+
+ -- Mathieu Trudel-Lapierre <cyphermox@ubuntu.com>  Thu, 11 Aug 2016 14:07:06 -0400
+
+grub-installer (1.128ubuntu5) xenial; urgency=medium
+
+  [ Mauricio Faria de Oliveira ]
+  * grub-installer [ppc64el]: generalize the regex for multiple PReP
+    partitions (rather than append 'p' just for NVMe :) for any /dev
+    entry, but without trailing partition numbers (matches the shell
+    parameter expansion in the subsequent grep). (LP: #1550448)
+
+ -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>  Mon, 14 Mar 2016 16:05:57 -0400
+
+grub-installer (1.128ubuntu4) xenial; urgency=medium
+
+  * Fix installing grub to a PReP partition over RAID which would be supported
+    by NVME or other types of devices than [hsv]d drives.
+
+ -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>  Mon, 29 Feb 2016 10:48:37 -0500
+
+grub-installer (1.128ubuntu3) xenial; urgency=medium
+
+  * grub-installer [ppc64el]: support multiple PReP partitions on component
+    devices of a MD/mdadm device. (LP: #1550448)
+
+ -- Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>  Fri, 26 Feb 2016 15:14:21 -0500
+
+grub-installer (1.128ubuntu2) xenial; urgency=medium
+
+  * If grub-installer/choose_bootdev only has one non-manual choice, default
+    to that and reduce question priority to low.  May fix LP: #1528360.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 04 Jan 2016 14:06:44 +0000
+
+grub-installer (1.128ubuntu1) xenial; urgency=medium
+
+  * Resynchronise with Debian.  Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Remove splash boot parameter unless debian-installer/framebuffer=true
+      and debian-installer/splash=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an GRUB Legacy MBR on each disk in an
+      mdadm-managed RAID providing /boot.  (GRUB 2 can handle this already.)
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays.  Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+    - If /boot is on an MD device and we're using GRUB 2, install GRUB there
+      rather than (hd0); GRUB 2 will interpret that as meaning that it needs
+      to install to each of the RAID members.
+    - If using GRUB 2 and installing to a RAID device any of whose
+      components are partitions, then default to installing to the MBRs of
+      each of the containing disks, since GRUB 2 will refuse to install to
+      the partition devices.
+    - On i386/efi and amd64/efi subarchitectures, install grub-efi and purge
+      grub, grub-legacy, and grub-pc; elsewhere, purge grub-efi*.
+    - Add a preseedable grub-installer/timeout template to adjust the
+      initial GRUB timeout.
+    - Install GRUB to the SATA RAID or multipath device when /boot is on
+      such a device, rather than installing to the first hard disk.
+    - Remove grub-gfxpayload-lists in situations where we need to remove
+      grub-pc.
+    - Remove 'quiet' from target system command line if
+      debian-installer/quiet is set to false.
+    - When /boot is on a loopback device (i.e. Wubi), install GRUB there.
+    - Simplify /proc and /sys mounting; make sure they're consistently
+      mounted for the entire life of grub-installer, and consistently
+      unmounted on exit.
+    - Only process the output of os-prober into boot menu entries if we're
+      actually going to use them; if we're using GRUB 2 and os-prober is
+      installed, then it will deal with this itself and do a better job of
+      it.
+    - Properly handle systems on which there may be more than 26 disks, and our
+      boot partition meant to be on a disk named [hsv]d[a-z][a-z].
+    - Don't try to mark a partition as active, except on grub-pc.
+    - Better handle PReP partitions on ppc64el:
+      - prep-bootdev: add '-l' option to list all PReP partitions.  With this,
+        it's possible to do more things to select a PReP partition.
+      - grub-installer [ppc64el]: bootdev/wipe_bootdev: prefer PReP partition
+        on the same disk as the boot file system partition ($disc_offered).
+    - Fall back to grub-pc if there is no /target/boot/efi directory.
+    - Handle partitioned /dev/mdNNN devices, installing to the corresponding
+      disk instead.
+    - If grub-installer/bootdev was set to (hd0), override it to the OS device
+      name for the first disk if possible.
+    - Multipath device names have changed; so since multipath-tools 0.5.0
+      rather than mpath[0-9]+p[0-9]+, they are now named mpath[a-z]+[0-9]+.
+      Fix this so grub-installer has a chance of properly installing on
+      multipath devices when not using grub-ieee1275.
+    - Force grub-installer/bootdev to take precedence over only_debian and
+      with_other_os.
+    - Only look for the prep flag, not boot as well; these appear to be
+      mutually exclusive on GPT.
+    - Fix ppc64el detection in boot device hack.
+    - Handle FusionIO devices.
+    - Always use grub-efi-amd64-signed on 64bit UEFI systems instead of
+      relying on SecureBoot detection.
+    - update_grub() used a variable called $update_grub, change name
+      to $update_grub_cmd to prevent this clash.
+    - Fix code that transfers user boot parameters into target system to work
+      even when grub-pc is already installed, as in the case of installing
+      with a live filesystem.
+    - Ensure appropriate package removals if grub-efi-amd64-signed is
+      selected.
+    - If the SecureBoot EFI variable is set, then install
+      grub-efi-amd64-signed rather than grub-efi, along with shim-signed if
+      available.
+
+ -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>  Thu, 10 Dec 2015 13:46:55 -0500
+
 grub-installer (1.128) unstable; urgency=high
 
   * Fix buggy /dev/nvme matching in the case statement to determine
@@ -423,6 +607,278 @@ grub-installer (1.79) unstable; urgency=
 
  -- Steve McIntyre <93sam@debian.org>  Fri, 21 Sep 2012 21:10:46 +0100
 
+grub-installer (1.78ubuntu30) wily; urgency=medium
+
+  * Multipath device names have changed; so since multipath-tools 0.5.0 rather
+    than mpath[0-9]+p[0-9]+, they are now named mpath[a-z]+[0-9]+. Fix this so
+    grub-installer has a chance of properly installing on multipath devices
+    when not using grub-ieee1275.
+
+ -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>  Tue, 20 Oct 2015 14:06:44 +0100
+
+grub-installer (1.78ubuntu29) wily; urgency=medium
+
+  * Properly handle systems on which there may be more than 26 disks, and our
+    boot partition meant to be on a disk named [hsv]d[a-z][a-z]. (LP: #1479213)
+
+ -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>  Mon, 14 Sep 2015 20:48:40 -0400
+
+grub-installer (1.78ubuntu28) vivid; urgency=medium
+
+  [ Phillip Susi ]
+  * Don't try to mark a partition as active, except on grub-pc.
+    This was causing failures for grub-efi (LP: #1303790).
+
+ -- Timo Aaltonen <tjaalton@ubuntu.com>  Sat, 04 Apr 2015 16:48:58 +0300
+
+grub-installer (1.78ubuntu27) vivid; urgency=medium
+
+  [ Mauricio Faria de Oliveira ]
+  * grub-installer: Use 'p' (not '-part') as multipath disk-partition
+    separator. This fixes the check of whether the boot file system is on
+    multipath (i.e., $disc_offered is a multipath partition). (LP: #1430074)
+  * Better handle PReP partitions on ppc64el: (LP: #1415918)
+    - prep-bootdev: add '-l' option to list all PReP partitions.  With this,
+      it's possible to do more things to select a PReP partition.
+    - grub-installer [ppc64el]: bootdev/wipe_bootdev: prefer PReP partition in
+      the same disk as the boot file system partition ($disc_offered).
+
+ -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>  Tue, 17 Mar 2015 00:25:13 -0400
+
+grub-installer (1.78ubuntu26) vivid; urgency=medium
+
+  * Revert changes from 1.78ubuntu25:
+    * grub_probe(): return a single line in BTRFS multi-disk RAID configurations
+      - It breaks bootloader install on LVM. (LP: #1427821)
+
+ -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>  Tue, 10 Mar 2015 15:33:01 -0400
+
+grub-installer (1.78ubuntu25) vivid; urgency=medium
+
+  * grub_probe(): return a single line in BTRFS multi-disk RAID configurations
+    (LP: #1354730).
+
+ -- TJ <ubuntu@iam.tj>  Thu, 19 Feb 2015 11:44:43 -0500
+
+grub-installer (1.78ubuntu24) vivid; urgency=medium
+
+  * Install grub-arm64-efi on arm64/efi platforms. (From Debian)
+
+ -- dann frazier <dannf@ubuntu.com>  Tue, 03 Feb 2015 16:45:04 -0700
+
+grub-installer (1.78ubuntu23) utopic; urgency=medium
+
+  * On ppc64el, wipe the PReP partition before installing grub-ieee1275,
+    otherwise installations where the PReP partition is not empty and does
+    not contain a previous boot loader installation will fail now that
+    grub-ieee1275.postinst runs grub-install (LP: #1376973).
+
+ -- Colin Watson <cjwatson@debian.org>  Mon, 06 Oct 2014 18:29:15 +0100
+
+grub-installer (1.78ubuntu22) utopic; urgency=medium
+
+  * Handle partitioned /dev/mdNNN devices, installing to the corresponding
+    disk instead (LP: #1370368).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 26 Sep 2014 15:50:41 +0100
+
+grub-installer (1.78ubuntu21) utopic; urgency=medium
+
+  * Rebuild against libparted2.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 21 Jul 2014 21:43:16 +0100
+
+grub-installer (1.78ubuntu20) trusty; urgency=medium
+
+  * Fall back to grub-pc if there is no /target/boot/efi directory (thanks,
+    Phillip Susi; LP: #1302418).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 09 Apr 2014 15:20:05 +0100
+
+grub-installer (1.78ubuntu19) trusty; urgency=medium
+
+  * If grub-installer/bootdev was set to (hd0), override it to the OS device
+    name for the first disk if possible (LP: #1292628).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 28 Mar 2014 13:11:31 +0000
+
+grub-installer (1.78ubuntu18) trusty; urgency=medium
+
+  * When wiping the PReP partition on ppc64el/grub-ieee1275, limit the write
+    to the size of the partition, otherwise dd fails.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 21 Mar 2014 12:59:07 +0000
+
+grub-installer (1.78ubuntu17) trusty; urgency=medium
+
+  * On ppc64el/grub-ieee1275, wipe the PReP partition before running
+    grub-install.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 18 Mar 2014 15:44:21 +0000
+
+grub-installer (1.78ubuntu16) trusty; urgency=low
+
+  [ Dave Chiluk ]
+  * Force grub-installer/bootdev to take precedence over only_debian and
+    with_other_os. (LP: #1012629)
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com>  Thu, 27 Feb 2014 17:04:45 +0000
+
+grub-installer (1.78ubuntu15) trusty; urgency=medium
+
+  * Cherrypick 1.92 changes:
+    * Adapt patch from Guilhem Moulin to always honor
+    grub-installer/bootdev, when it was preseeded, instead of insisting on
+    automatic detection which may lead to unpredictable results (e.g. use
+    a different device, or fail unattended installation). Closes:
+    #666974. LP: #1012629.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com>  Tue, 25 Feb 2014 16:43:41 +0000
+
+grub-installer (1.78ubuntu14) trusty; urgency=medium
+
+  * Only look for the prep flag, not boot as well; these appear to be
+    mutually exclusive on GPT.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 31 Jan 2014 15:16:35 +0000
+
+grub-installer (1.78ubuntu13) trusty; urgency=medium
+
+  * Fix ppc64el detection in boot device hack.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 31 Jan 2014 14:33:11 +0000
+
+grub-installer (1.78ubuntu12) trusty; urgency=medium
+
+  * Add a hack to pick the right boot device on ppc64el.  This should really
+    be done in grub-install instead, and will need to be done there in order
+    to support major GRUB upgrades properly, but this will tide us over for
+    now.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 31 Jan 2014 12:50:09 +0000
+
+grub-installer (1.78ubuntu11) trusty; urgency=medium
+
+  * Add ppc64el support.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 24 Jan 2014 17:11:23 +0000
+
+grub-installer (1.78ubuntu10) trusty; urgency=medium
+
+  * Handle NVMe devices, based on the debug logs from Colin
+    King. Preliminary support (LP: #1265483)
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com>  Fri, 03 Jan 2014 10:28:09 +0000
+
+grub-installer (1.78ubuntu9) trusty; urgency=low
+
+  * Handle FusionIO devices, based on work by Igor Sharovar (LP: #1237519).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 12 Nov 2013 16:50:04 +0000
+
+grub-installer (1.78ubuntu8) saucy; urgency=low
+
+  * Always use grub-efi-amd64-signed on 64bit UEFI systems instead of
+    relying on SecureBoot detection. (LP: #1184297)
+
+ -- Stéphane Graber <stgraber@ubuntu.com>  Thu, 18 Jul 2013 15:41:07 -0400
+
+grub-installer (1.78ubuntu7) saucy; urgency=low
+
+  * update_grub() used a variable called $update_grub, change name
+    to $update_grub_cmd to prevent this clash.  LP: #1171099
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 10 Jul 2013 13:31:44 +0100
+
+grub-installer (1.78ubuntu6) raring; urgency=low
+
+  * Fix code that transfers user boot parameters into target system to work
+    even when grub-pc is already installed, as in the case of installing
+    with a live filesystem (LP: #664526).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 18 Feb 2013 14:29:41 +0000
+
+grub-installer (1.78ubuntu5) quantal; urgency=low
+
+  * Ensure appropriate package removals if grub-efi-amd64-signed is
+    selected.
+  * Remove grub-efi-amd64-signed if grub-efi is selected.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 09 Oct 2012 14:22:11 +0100
+
+grub-installer (1.78ubuntu4) quantal; urgency=low
+
+  * If the SecureBoot EFI variable is set, then install
+    grub-efi-amd64-signed rather than grub-efi, along with shim-signed if
+    available.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 08 Oct 2012 20:50:53 +0100
+
+grub-installer (1.78ubuntu3) quantal; urgency=low
+
+  * Fix incorrect test for whether to bind-mount /sys (LP: #1054323).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 24 Sep 2012 21:37:10 +0100
+
+grub-installer (1.78ubuntu2) quantal; urgency=low
+
+  * Don't try to use local outside a function (LP: #1053317).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu, 20 Sep 2012 13:33:04 +0100
+
+grub-installer (1.78ubuntu1) quantal; urgency=low
+
+  * Resynchronise with Debian.  Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Remove splash boot parameter unless debian-installer/framebuffer=true
+      and debian-installer/splash=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an GRUB Legacy MBR on each disk in an
+      mdadm-managed RAID providing /boot.  (GRUB 2 can handle this already.)
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays.  Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+    - If /boot is on an MD device and we're using GRUB 2, install GRUB there
+      rather than (hd0); GRUB 2 will interpret that as meaning that it needs
+      to install to each of the RAID members.
+    - If using GRUB 2 and installing to a RAID device any of whose
+      components are partitions, then default to installing to the MBRs of
+      each of the containing disks, since GRUB 2 will refuse to install to
+      the partition devices.
+    - On i386/efi and amd64/efi subarchitectures, install grub-efi and purge
+      grub, grub-legacy, and grub-pc; elsewhere, purge grub-efi*.
+    - Add a preseedable grub-installer/timeout template to adjust the
+      initial GRUB timeout.
+    - Install GRUB to the SATA RAID or multipath device when /boot is on
+      such a device, rather than installing to the first hard disk.
+    - Remove grub-gfxpayload-lists in situations where we need to remove
+      grub-pc.
+    - Remove 'quiet' from target system command line if
+      debian-installer/quiet is set to false.
+    - When /boot is on a loopback device (i.e. Wubi), install GRUB there.
+    - Simplify /proc and /sys mounting; make sure they're consistently
+      mounted for the entire life of grub-installer, and consistently
+      unmounted on exit.
+    - Only process the output of os-prober into boot menu entries if we're
+      actually going to use them; if we're using GRUB 2 and os-prober is
+      installed, then it will deal with this itself and do a better job of
+      it.
+  * Drop grub-installer/bootdev_directory preseeding.  Wubi no longer uses
+    this, and we no longer care about grub4dos.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 19 Sep 2012 10:17:29 +0100
+
 grub-installer (1.78) unstable; urgency=low
 
   [ Updated translations ]
@@ -567,6 +1023,88 @@ grub-installer (1.69) unstable; urgency=
 
  -- Otavio Salvador <otavio@debian.org>  Sat, 19 Nov 2011 16:33:12 -0200
 
+grub-installer (1.68ubuntu5) precise; urgency=low
+
+  * Update Ubuntu-specific translations from Launchpad.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 11 Apr 2012 11:43:22 +0100
+
+grub-installer (1.68ubuntu4) oneiric; urgency=low
+
+  * Remove spurious newline from debian/po/bs.po, fixing ubiquity FTBFS.
+
+ -- Adam Conrad <adconrad@ubuntu.com>  Thu, 29 Sep 2011 18:04:42 -0600
+
+grub-installer (1.68ubuntu3) oneiric; urgency=low
+
+  * Only process the output of os-prober into boot menu entries if we're
+    actually going to use them; if we're using GRUB 2 and os-prober is
+    installed, then it will deal with this itself and do a better job of it
+    (LP: #851704).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu, 29 Sep 2011 09:00:21 +0100
+
+grub-installer (1.68ubuntu2) oneiric; urgency=low
+
+  * Really allow grub/grub2 choice for ext4 (lost in merge).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 23 Sep 2011 21:44:55 +0100
+
+grub-installer (1.68ubuntu1) oneiric; urgency=low
+
+  * Resynchronise with Debian (preseeding change in 1.68 fixes LP: #857548).
+    Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Remove splash boot parameter unless debian-installer/framebuffer=true
+      and debian-installer/splash=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map (for GRUB Legacy only);
+      it also hides the menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an GRUB Legacy MBR on each disk in an
+      mdadm-managed RAID providing /boot. (GRUB 2 can handle this already.)
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Default to grub2 for GPT systems.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+    - If /boot is on an MD device and we're using GRUB 2, install GRUB there
+      rather than (hd0); GRUB 2 will interpret that as meaning that it needs
+      to install to each of the RAID members.
+    - If using GRUB 2 and installing to a RAID device any of whose
+      components are partitions, then default to installing to the MBRs of
+      each of the containing disks, since GRUB 2 will refuse to install to
+      the partition devices.
+    - On i386/efi and amd64/efi subarchitectures, install grub-efi and purge
+      grub, grub-legacy, and grub-pc; elsewhere, purge grub-efi*.
+    - Add a preseedable grub-installer/timeout template to adjust the
+      initial GRUB timeout.
+    - Install GRUB to the SATA RAID or multipath device when /boot is on
+      such a device, rather than installing to the first hard disk.
+    - Remove grub-gfxpayload-lists in situations where we need to remove
+      grub-pc.
+    - Remove 'quiet' from target system command line if
+      debian-installer/quiet is set to false.
+    - When /boot is on a loopback device (i.e. Wubi), install GRUB there.
+  * Simplify /proc and /sys mounting; make sure they're consistently mounted
+    for the entire life of grub-installer, and consistently unmounted on
+    exit (LP: #851704).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 23 Sep 2011 21:29:13 +0100
+
 grub-installer (1.68) unstable; urgency=low
 
   [ Matt Kraai ]
@@ -645,6 +1183,79 @@ grub-installer (1.65) unstable; urgency=
 
  -- Colin Watson <cjwatson@debian.org>  Fri, 03 Jun 2011 23:13:40 +0100
 
+grub-installer (1.64ubuntu3) oneiric; urgency=low
+
+  * When /boot is on a loopback device (i.e. Wubi), install GRUB there.
+    This was always done the next time grub-install was run, but by mistake
+    wasn't done at initial installation.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 21 Jun 2011 12:41:24 +0100
+
+grub-installer (1.64ubuntu2) oneiric; urgency=low
+
+  * Remove 'quiet' from target system command line if debian-installer/quiet
+    is set to false.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 31 May 2011 10:04:38 +0100
+
+grub-installer (1.64ubuntu1) oneiric; urgency=low
+
+  * Resynchronise with Debian.  Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Remove splash boot parameter unless debian-installer/framebuffer=true
+      and debian-installer/splash=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map (for GRUB Legacy only);
+      it also hides the menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an GRUB Legacy MBR on each disk in an
+      mdadm-managed RAID providing /boot. (GRUB 2 can handle this already.)
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Default to grub2 for GPT systems.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+    - If /boot is on an MD device and we're using GRUB 2, install GRUB there
+      rather than (hd0); GRUB 2 will interpret that as meaning that it needs
+      to install to each of the RAID members.
+    - If using GRUB 2 and installing to a RAID device any of whose
+      components are partitions, then default to installing to the MBRs of
+      each of the containing disks, since GRUB 2 will refuse to install to
+      the partition devices.
+    - Bind-mount /proc and /sys while running grub-install.
+    - Update grub-installer/bootdev text to avoid GRUB device naming that
+      changed between GRUB Legacy and GRUB 2, and to use libata-style device
+      naming since that is more accurate for most people.
+    - On i386/efi and amd64/efi subarchitectures, install grub-efi and purge
+      grub, grub-legacy, and grub-pc; elsewhere, purge grub-efi*.
+    - Don't ask for a boot device on EFI, and don't pass a boot device
+      argument to grub-install.
+    - Add a preseedable grub-installer/timeout template to adjust the
+      initial GRUB timeout.
+    - Install GRUB to the SATA RAID or multipath device when /boot is on
+      such a device, rather than installing to the first hard disk.
+    - Remove grub-gfxpayload-lists in situations where we need to remove
+      grub-pc.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 18 May 2011 11:25:04 +0100
+
 grub-installer (1.64) unstable; urgency=low
 
   * Ensure that /boot/zfs exists in the target before copying zpool.cache to
@@ -715,6 +1326,78 @@ grub-installer (1.61) unstable; urgency=
 
  -- Otavio Salvador <otavio@debian.org>  Mon, 14 Feb 2011 09:51:11 -0200
 
+grub-installer (1.60ubuntu3) natty; urgency=low
+
+  * Remove grub-gfxpayload-lists in situations where we need to remove
+    grub-pc (LP: #765270).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 20 Apr 2011 21:47:46 +0100
+
+grub-installer (1.60ubuntu2) natty; urgency=low
+
+  * Fix reference to Debian in Norwegian Bokmål translation (LP: #718236).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 23 Mar 2011 16:34:39 +0000
+
+grub-installer (1.60ubuntu1) natty; urgency=low
+
+  * Resynchronise with Debian.  Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Remove splash boot parameter unless debian-installer/framebuffer=true
+      and debian-installer/splash=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map (for GRUB Legacy only);
+      it also hides the menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an GRUB Legacy MBR on each disk in an
+      mdadm-managed RAID providing /boot. (GRUB 2 can handle this already.)
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Default to grub2 for GPT systems.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+    - If /boot is on an MD device and we're using GRUB 2, install GRUB there
+      rather than (hd0); GRUB 2 will interpret that as meaning that it needs
+      to install to each of the RAID members.
+    - If using GRUB 2 and installing to a RAID device any of whose
+      components are partitions, then default to installing to the MBRs of
+      each of the containing disks, since GRUB 2 will refuse to install to
+      the partition devices.
+    - Bind-mount /proc and /sys while running grub-install.
+    - Update grub-installer/bootdev text to avoid GRUB device naming that
+      changed between GRUB Legacy and GRUB 2, and to use libata-style device
+      naming since that is more accurate for most people.
+    - On i386/efi and amd64/efi subarchitectures, install grub-efi and purge
+      grub, grub-legacy, and grub-pc; elsewhere, purge grub-efi*.
+    - Don't ask for a boot device on EFI, and don't pass a boot device
+      argument to grub-install.
+    - Add a preseedable grub-installer/timeout template to adjust the
+      initial GRUB timeout.
+    - Install GRUB to the SATA RAID or multipath device when /boot is on
+      such a device, rather than installing to the first hard disk.
+  * If the first disk has neither a partition table nor a filesystem, don't
+    try to install to it as grub-setup will refuse (LP: #711830).
+  * Canonicalise device names printed by 'mdadm --detail' (LP: #695842).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu, 10 Feb 2011 14:05:10 +0000
+
 grub-installer (1.60) unstable; urgency=low
 
   * Drop warning about GRUB 2 being experimental. Closes: #610365.
@@ -754,6 +1437,69 @@ grub-installer (1.58) unstable; urgency=
 
  -- Otavio Salvador <otavio@debian.org>  Fri, 24 Dec 2010 19:01:42 -0200
 
+grub-installer (1.57ubuntu2) natty; urgency=low
+
+  * Ignore words not beginning with "/dev/" in 'mdadm --detail' output
+    (LP: #680751).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu, 09 Dec 2010 12:35:22 +0000
+
+grub-installer (1.57ubuntu1) natty; urgency=low
+
+  * Resynchronise with Debian.  Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Remove splash boot parameter unless debian-installer/framebuffer=true
+      and debian-installer/splash=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map (for GRUB Legacy only);
+      it also hides the menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an GRUB Legacy MBR on each disk in an
+      mdadm-managed RAID providing /boot. (GRUB 2 can handle this already.)
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Default to grub2 for GPT systems.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+    - If /boot is on an MD device and we're using GRUB 2, install GRUB there
+      rather than (hd0); GRUB 2 will interpret that as meaning that it needs
+      to install to each of the RAID members.
+    - If using GRUB 2 and installing to a RAID device any of whose
+      components are partitions, then default to installing to the MBRs of
+      each of the containing disks, since GRUB 2 will refuse to install to
+      the partition devices.
+    - Bind-mount /proc and /sys while running grub-install.
+    - Update grub-installer/bootdev text to avoid GRUB device naming that
+      changed between GRUB Legacy and GRUB 2, and to use libata-style device
+      naming since that is more accurate for most people.
+    - On i386/efi and amd64/efi subarchitectures, install grub-efi and purge
+      grub, grub-legacy, and grub-pc; elsewhere, purge grub-efi*.
+    - Don't ask for a boot device on EFI, and don't pass a boot device
+      argument to grub-install.
+    - Add a preseedable grub-installer/timeout template to adjust the
+      initial GRUB timeout.
+    - Install GRUB to the SATA RAID or multipath device when /boot is on
+      such a device, rather than installing to the first hard disk.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 22 Nov 2010 10:30:59 +0000
+
 grub-installer (1.57) unstable; urgency=low
 
   * Merge changes from Ubuntu by Evan Dandrea and myself:
@@ -771,6 +1517,65 @@ grub-installer (1.57) unstable; urgency=
 
  -- Colin Watson <cjwatson@debian.org>  Fri, 19 Nov 2010 15:27:33 +0000
 
+grub-installer (1.56ubuntu1) natty; urgency=low
+
+  * Resynchronise with Debian.  Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Remove splash boot parameter unless debian-installer/framebuffer=true
+      and debian-installer/splash=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map (for GRUB Legacy only);
+      it also hides the menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an GRUB Legacy MBR on each disk in an
+      mdadm-managed RAID providing /boot. (GRUB 2 can handle this already.)
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Set a sensible default boot device when /cdrom is not iso9660, as this
+      is probably a USB install and (hd0) does not make sense when
+      installing from a removable disk.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Default to grub2 for GPT systems.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+    - If /boot is on an MD device and we're using GRUB 2, install GRUB there
+      rather than (hd0); GRUB 2 will interpret that as meaning that it needs
+      to install to each of the RAID members.
+    - If using GRUB 2 and installing to a RAID device any of whose
+      components are partitions, then default to installing to the MBRs of
+      each of the containing disks, since GRUB 2 will refuse to install to
+      the partition devices.
+    - Bind-mount /proc and /sys while running grub-install.
+    - Update grub-installer/bootdev text to avoid GRUB device naming that
+      changed between GRUB Legacy and GRUB 2, and to use libata-style device
+      naming since that is more accurate for most people.
+    - On i386/efi and amd64/efi subarchitectures, install grub-efi and purge
+      grub, grub-legacy, and grub-pc; elsewhere, purge grub-efi*.
+    - Don't ask for a boot device on EFI, and don't pass a boot device
+      argument to grub-install.
+    - Add a preseedable grub-installer/timeout template to adjust the
+      initial GRUB timeout.
+    - Install GRUB to the SATA RAID or multipath device when /boot is on
+      such a device, rather than installing to the first hard disk.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 15 Nov 2010 11:33:47 +0000
+
 grub-installer (1.56) unstable; urgency=low
 
   [ Otavio Salvador ]
@@ -792,6 +1597,83 @@ grub-installer (1.56) unstable; urgency=
 
  -- Robert Millan <rmh@debian.org>  Wed, 10 Nov 2010 01:04:15 +0100
 
+grub-installer (1.55ubuntu4) maverick; urgency=low
+
+  * Install GRUB to the SATA RAID or multipath device when /boot is on such
+    a device, rather than installing to the first hard disk (LP: #603854).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 05 Oct 2010 21:57:05 +0100
+
+grub-installer (1.55ubuntu3) maverick; urgency=low
+
+  * Purge grub-efi* when $grub_package is grub or grub-pc, and purge grub,
+    grub-legacy, and grub-pc when $grub_package is grub-efi (LP: #632642).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 08 Sep 2010 10:29:51 +0100
+
+grub-installer (1.55ubuntu2) maverick; urgency=low
+
+  [ Soren Hansen ]
+  * Add a preseedable grub-installer/timeout template to adjust the initial
+    GRUB timeout (LP: #628418).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 06 Sep 2010 12:07:05 +0100
+
+grub-installer (1.55ubuntu1) maverick; urgency=low
+
+  * Resynchronise with Debian.  Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Remove splash boot parameter unless debian-installer/framebuffer=true
+      and debian-installer/splash=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map (for GRUB Legacy only);
+      it also hides the menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an GRUB Legacy MBR on each disk in an
+      mdadm-managed RAID providing /boot. (GRUB 2 can handle this already.)
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Set a sensible default boot device when /cdrom is not iso9660, as this
+      is probably a USB install and (hd0) does not make sense when
+      installing from a removable disk.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Default to grub2 for GPT systems.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+    - If /boot is on an MD device and we're using GRUB 2, install GRUB there
+      rather than (hd0); GRUB 2 will interpret that as meaning that it needs
+      to install to each of the RAID members.
+    - Mount /target/sys when running update-grub.
+    - If using GRUB 2 and installing to a RAID device any of whose
+      components are partitions, then default to installing to the MBRs of
+      each of the containing disks, since GRUB 2 will refuse to install to
+      the partition devices.
+    - Bind-mount /proc and /sys while running grub-install.
+    - Update grub-installer/bootdev text to avoid GRUB device naming that
+      changed between GRUB Legacy and GRUB 2, and to use libata-style device
+      naming since that is more accurate for most people.
+    - Install grub-efi on i386/efi and amd64/efi subarchitectures.
+  * Don't ask for a boot device on EFI, and don't pass a boot device
+    argument to grub-install.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 03 Sep 2010 10:54:21 +0100
+
 grub-installer (1.55) unstable; urgency=low
 
   [ Aurelien Jarno ]
@@ -897,6 +1779,158 @@ grub-installer (1.50) unstable; urgency=
 
  -- Otavio Salvador <otavio@debian.org>  Mon, 22 Feb 2010 00:04:48 -0300
 
+grub-installer (1.49ubuntu12) maverick; urgency=low
+
+  * Install grub-efi on i386/efi and amd64/efi subarchitectures.
+  * Resolve symlinks in default boot device (LP: #602758).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu, 08 Jul 2010 13:03:01 +0100
+
+grub-installer (1.49ubuntu11) lucid; urgency=low
+
+  * 'nosplash' doesn't work because it isn't passed through by user-params.
+    Use debian-installer/splash=false for this behaviour instead
+    (LP: #548954).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 06 Apr 2010 13:26:16 +0100
+
+grub-installer (1.49ubuntu10) lucid; urgency=low
+
+  * Historically, Ubuntu's default behaviour in the absence of command-line
+    arguments to the installer has been to pass 'splash' to the installed
+    system so that it gets a splash screen (and similarly 'quiet').  There's
+    some argument that this behaviour should require passing 'splash' to the
+    installer as well, but it's too late in the Lucid cycle for this change.
+    Nevertheless, we need a way to configure images such that they don't get
+    'splash' in the installed system, so introduce a 'nosplash' argument
+    which inhibits this, for use by the server CD (LP: #548954).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu, 01 Apr 2010 23:44:48 +0100
+
+grub-installer (1.49ubuntu9) lucid; urgency=low
+
+  * Ask grub-installer/only_debian at high priority again (LP: #47135).
+    Originally, in Warty, we ensured that this question wouldn't be visible
+    by default to support simple installations of Ubuntu with as few
+    questions as possible.  However, since then, we wrote Ubiquity, which
+    has taken over responsibility for the simple installation case, and it's
+    become clear that automatically installing GRUB to the first disk's MBR
+    is inadequate for many more complex situations.  Ironically, Ubiquity
+    makes this option easily accessible from the "Advanced" dialog box, but
+    Ubuntu's d-i required a special boot parameter to display it.
+  * Update grub-installer/bootdev text to avoid GRUB device naming that
+    changed between GRUB Legacy and GRUB 2, and to use libata-style device
+    naming since that is more accurate for most people (LP: #391775)
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 26 Mar 2010 11:34:43 +0000
+
+grub-installer (1.49ubuntu8) lucid; urgency=low
+
+  * Bind-mount /proc and /sys while running grub-install (LP: #527210).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 22 Mar 2010 21:33:27 +0000
+
+grub-installer (1.49ubuntu7) lucid; urgency=low
+
+  * Fix GPT detection to account for changed fdisk output (LP: #538100).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 15 Mar 2010 10:00:46 +0000
+
+grub-installer (1.49ubuntu6) lucid; urgency=low
+
+  * Fix partition offset handling for GRUB Legacy.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 09 Mar 2010 11:29:05 +0000
+
+grub-installer (1.49ubuntu5) lucid; urgency=low
+
+  [ Joel Ebel ]
+  * Add missing $serial to get proper detection of serial console options
+    working.
+
+ -- Evan Dandrea <evand@ubuntu.com>  Fri, 19 Feb 2010 17:41:03 -0500
+
+grub-installer (1.49ubuntu4) lucid; urgency=low
+
+  * Preseed grub-pc/install_devices_empty while installing grub-pc, since we
+    deliberately defer calling grub-install until a later point.  Thanks to
+    Dustin Kirkland for debugging assistance.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu, 04 Feb 2010 12:24:22 -0800
+
+grub-installer (1.49ubuntu3) lucid; urgency=low
+
+  * Add $partition_offset to $bootpart when deciding which partition to make
+    active based on GRUB-style device names (found while testing fix for LP
+    #185878).
+  * Use grub-probe to convert device names rather than relying on
+    device.map.
+  * Only add removable devices to device.map if using GRUB Legacy.
+  * Use an appropriate OS device name rather than (hd0) if possible.
+  * When installing from a non-CD medium, we only need to reset the default
+    boot device if we would otherwise end up installing GRUB to the
+    installation medium.
+  * Convert device names to by-id form before preseeding
+    grub-pc/install_devices.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 03 Feb 2010 17:08:02 -0800
+
+grub-installer (1.49ubuntu2) lucid; urgency=low
+
+  * Don't check for LVM when we've already worked out that we're installing
+    on SATA RAID.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 20 Jan 2010 19:04:14 +0000
+
+grub-installer (1.49ubuntu1) lucid; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map (for GRUB Legacy only);
+      it also hides the menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an GRUB Legacy MBR on each disk in an
+      mdadm-managed RAID providing /boot. (GRUB 2 can handle this already.)
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Set a sensible default boot device when /cdrom is not iso9660, as this
+      is probably a USB install and (hd0) does not make sense when
+      installing from a removable disk.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Default to grub2 for GPT systems.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+    - If /boot is on an MD device and we're using GRUB 2, install GRUB there
+      rather than (hd0); GRUB 2 will interpret that as meaning that it needs
+      to install to each of the RAID members.
+    - Mount /target/sys when running update-grub.
+    - If using GRUB 2 and installing to a RAID device any of whose
+      components are partitions, then default to installing to the MBRs of
+      each of the containing disks, since GRUB 2 will refuse to install to
+      the partition devices.
+  * GRUB 2 now supports installation on SATA RAID and multipath.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 04 Jan 2010 15:58:21 +0000
+
 grub-installer (1.49) unstable; urgency=low
 
   * Merge from Ubuntu:
@@ -924,6 +1958,56 @@ grub-installer (1.48) unstable; urgency=
 
  -- Colin Watson <cjwatson@debian.org>  Mon, 23 Nov 2009 21:12:00 +0000
 
+grub-installer (1.47ubuntu1) lucid; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map (for GRUB Legacy only);
+      it also hides the menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an GRUB Legacy MBR on each disk in an
+      mdadm-managed RAID providing /boot. (GRUB 2 can handle this already.)
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Set a sensible default boot device when /cdrom is not iso9660, as this
+      is probably a USB install and (hd0) does not make sense when
+      installing from a removable disk.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Default to grub2 for GPT systems.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+    - Preseed grub-pc/install_devices based on grub-installer/bootdev.
+    - If /boot is on an MD device and we're using GRUB 2, install GRUB there
+      rather than (hd0); GRUB 2 will interpret that as meaning that it needs
+      to install to each of the RAID members.
+    - Always use GRUB Legacy when /boot is on a multipath device.
+    - Mount /target/sys when running update-grub.
+    - If using GRUB 2 and installing to a RAID device any of whose
+      components are partitions, then default to installing to the MBRs of
+      each of the containing disks, since GRUB 2 will refuse to install to
+      the partition devices.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 11 Nov 2009 16:49:33 +0000
+
 grub-installer (1.47) unstable; urgency=low
 
   [ Colin Watson ]
@@ -965,6 +2049,104 @@ grub-installer (1.44) unstable; urgency=
 
  -- Felix Zielcke <fzielcke@z-51.de>  Mon, 21 Sep 2009 11:20:05 +0200
 
+grub-installer (1.43ubuntu8) karmic; urgency=low
+
+  * If using GRUB 2 and installing to a RAID device any of whose components
+    are partitions, then default to installing to the MBRs of each of the
+    containing disks, since GRUB 2 will refuse to install to the partition
+    devices (LP: #457687).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 23 Oct 2009 22:02:19 +0100
+
+grub-installer (1.43ubuntu7) karmic; urgency=low
+
+  * Mount /target/sys when running update-grub (LP: #456776).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 21 Oct 2009 14:08:00 +0100
+
+grub-installer (1.43ubuntu6) karmic; urgency=low
+
+  * Always use GRUB Legacy when /boot is on a multipath device.
+  * If /boot is on SATA RAID or multipath, don't ask a question to which
+    there's only one acceptable answer and the other causes grub-installer
+    to fall over (LP: #452118).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu, 15 Oct 2009 15:14:54 +0100
+
+grub-installer (1.43ubuntu5) karmic; urgency=low
+
+  * Fix mishandling of loop variable that caused the semi-manual
+    dmraid/multipath/mdadm handling to fire even for disks that don't need
+    it (LP: #444583).
+  * Never use the semi-manual GRUB setup code for GRUB 2, since it won't
+    work anyway.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 06 Oct 2009 16:13:02 +0100
+
+grub-installer (1.43ubuntu4) karmic; urgency=low
+
+  * Fix typo in fallback case when computing $disc_offered_devfs.
+  * If /boot is on an MD device and we're using GRUB 2, install GRUB there
+    rather than (hd0); GRUB 2 will interpret that as meaning that it needs
+    to install to each of the RAID members (LP: #427048).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 02 Oct 2009 15:22:33 +0100
+
+grub-installer (1.43ubuntu3) karmic; urgency=low
+
+  * Fix some hardcoded uses of /target.
+  * grub_write_divider is specific to GRUB Legacy; don't call it for GRUB 2.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 23 Sep 2009 15:15:33 +0100
+
+grub-installer (1.43ubuntu2) karmic; urgency=low
+
+  * Explicitly install os-prober when using GRUB 2, since it does a better
+    job than the otheros script (LP: #433259).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 21 Sep 2009 12:28:32 +0100
+
+grub-installer (1.43ubuntu1) karmic; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map (for GRUB Legacy only);
+      it also hides the menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an GRUB Legacy MBR on each disk in an
+      mdadm-managed RAID providing /boot. (GRUB 2 can handle this already.)
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Set a sensible default boot device when /cdrom is not iso9660, as this
+      is probably a USB install and (hd0) does not make sense when
+      installing from a removable disk.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Default to grub2 for GPT systems.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+    - Preseed grub-pc/install_devices based on grub-installer/bootdev.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 15 Sep 2009 06:56:30 +0100
+
 grub-installer (1.43) unstable; urgency=low
 
   [ Felix Zielcke ]
@@ -978,6 +2160,56 @@ grub-installer (1.43) unstable; urgency=
 
  -- Colin Watson <cjwatson@debian.org>  Mon, 14 Sep 2009 14:02:40 +0100
 
+grub-installer (1.42ubuntu2) karmic; urgency=low
+
+  * Preseed grub-pc/install_devices based on grub-installer/bootdev (LP:
+    #420604).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 02 Sep 2009 13:56:22 +0100
+
+grub-installer (1.42ubuntu1) karmic; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map; it also hides the
+      menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an GRUB Legacy MBR on each disk in an
+      mdadm-managed RAID providing /boot. (GRUB 2 can handle this already.)
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Set a sensible default boot device when /cdrom is not iso9660, as this
+      is probably a USB install and (hd0) does not make sense when
+      installing from a removable disk.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Default to grub2 for GPT systems.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+  * Restrict code to generate device.map for loop installations to GRUB
+    Legacy (LP: #421873).
+  * Fix said code to run grub chrooted into /target.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 01 Sep 2009 13:50:59 +0100
+
 grub-installer (1.42) unstable; urgency=low
 
   [ Felix Zielcke ]
@@ -1023,6 +2255,55 @@ grub-installer (1.41) unstable; urgency=
 
  -- Aurelien Jarno <aurel32@debian.org>  Sat, 22 Aug 2009 22:32:20 +0200
 
+grub-installer (1.40ubuntu2) karmic; urgency=low
+
+  * Handle showing the menu and raising the timeout for grub2 if other
+    operating systems are installed, since grub2 now hides the menu by
+    default.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 10 Aug 2009 13:13:34 +0100
+
+grub-installer (1.40ubuntu1) karmic; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map; it also hides the
+      menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an GRUB Legacy MBR on each disk in an
+      mdadm-managed RAID providing /boot. (GRUB 2 can handle this already.)
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Add support for lpia.
+    - Set a sensible default boot device when /cdrom is not iso9660, as this
+      is probably a USB install and (hd0) does not make sense when
+      installing from a removable disk.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Default to grub2 for GPT systems.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Sat, 25 Jul 2009 09:20:12 +0100
+
 grub-installer (1.40) unstable; urgency=low
 
   * Don't add map/drivemap commands for Windows Vista/7. It breaks
@@ -1030,6 +2311,49 @@ grub-installer (1.40) unstable; urgency=
 
  -- Felix Zielcke <fzielcke@z-51.de>  Fri, 24 Jul 2009 17:40:08 +0200
 
+grub-installer (1.39ubuntu1) karmic; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map; it also hides the
+      menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an MBR on each disk in an mdadm-managed RAID
+      providing /boot.
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Add support for lpia.
+    - Set a sensible default boot device when /cdrom is not iso9660, as this
+      is probably a USB install and (hd0) does not make sense when
+      installing from a removable disk.
+    - Go back to using update-grub -y for GRUB Legacy for now; our grub
+      package is a bit old and still requires this.
+    - Default to grub2 for GPT systems.
+    - Allow grub/grub2 choice for ext4, though still default to grub2.
+  * If using grub2, then use ordinary grub-install for mdadm-managed RAID
+    /boot rather than trying to implement it ourselves.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 13 Jul 2009 12:09:43 +0100
+
 grub-installer (1.39) unstable; urgency=low
 
   * Merge from Ubuntu:
@@ -1045,6 +2369,51 @@ grub-installer (1.39) unstable; urgency=
 
  -- Colin Watson <cjwatson@debian.org>  Wed, 08 Jul 2009 15:30:14 +0100
 
+grub-installer (1.38ubuntu1) karmic; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed (only for GRUB Legacy right now).
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map; it also hides the
+      menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add support for writing an MBR on each disk in an mdadm-managed RAID
+      providing /boot.
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Add support for lpia.
+    - Set a sensible default boot device when /cdrom is not iso9660, as this
+      is probably a USB install and (hd0) does not make sense when
+      installing from a removable disk.
+    - Use rootnoverify rather than root when chain-loading Microsoft
+      operating systems.
+  * Go back to using update-grub -y for GRUB Legacy for now; our grub
+    package is a bit old and still requires this.
+  * Default to grub2 for GPT systems.
+  * Allow grub/grub2 choice for ext4, though still default to grub2.
+  * Drop code to handle error messages in dmraid's output, which is no
+    longer needed.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 16 Jun 2009 02:46:23 +0100
+
 grub-installer (1.38) unstable; urgency=low
 
   [ Colin Watson ]
@@ -1072,6 +2441,71 @@ grub-installer (1.38) unstable; urgency=
 
  -- Otavio Salvador <otavio@debian.org>  Fri, 12 Jun 2009 16:04:27 -0300
 
+grub-installer (1.37ubuntu3) karmic; urgency=low
+
+  * If using GRUB 2, don't try to edit menu.lst to change the timeout (LP:
+    #385995). We need to do something with the GRUB 2 timeout, but this is
+    blocked on settling on a way for grub-installer to adjust GRUB 2
+    configuration in general.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 12 Jun 2009 13:35:20 +0100
+
+grub-installer (1.37ubuntu2) karmic; urgency=low
+
+  * If sfdisk fails to set the first primary partition we try as active, try
+    the other primary partitions rather than failing. Don't fail even if
+    none of them can be set as active, since the BIOS may not mind anyway
+    (LP: #285716).
+  * Use GRUB 2 by default.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 08 Jun 2009 22:05:42 +0100
+
+grub-installer (1.37ubuntu1) karmic; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed.
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map; it also hides the
+      menu.
+    - Handle cases where /boot is bind-mounted.
+    - Add another guard against calling 'udevadm info' with an empty device
+      name.
+    - Add support for writing an MBR on each disk in an mdadm-managed RAID
+      providing /boot.
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Add support for lpia.
+    - Handle /boot being on a virtio device.
+    - Set a sensible default boot device when /cdrom is not iso9660, as this
+      is probably a USB install and (hd0) does not make sense when
+      installing from a removable disk.
+    - Use rootnoverify rather than root when chain-loading Microsoft
+      operating systems.
+    - 'dmraid -c -s' changed its output format; cope with both old and new.
+    - Clarify why we cannot always default to the device that contains the
+      boot partition for grub-installer/bootdev.
+    - Handle /dev/mmcblk* in split_device (LP: #348411).
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Mon, 04 May 2009 07:40:22 -0700
+
 grub-installer (1.37) unstable; urgency=low
 
   [ Colin Watson ]
@@ -1104,6 +2538,87 @@ grub-installer (1.37) unstable; urgency=
 
  -- Colin Watson <cjwatson@debian.org>  Wed, 29 Apr 2009 13:22:34 +0100
 
+grub-installer (1.36ubuntu5) jaunty; urgency=low
+
+  * Handle /dev/mmcblk* in split_device (LP: #348411).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 27 Mar 2009 11:49:58 +0000
+
+grub-installer (1.36ubuntu4) jaunty; urgency=low
+
+  * cciss and ida logical drive numbers may go up to 15, not just 9.
+  * Only check for the boot partition being on dmraid if the user allowed us
+    to activate dmraid, to cope with cases where dmraid is misdetected
+    (LP: #346001).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 20 Mar 2009 18:26:39 +0000
+
+grub-installer (1.36ubuntu3) jaunty; urgency=low
+
+  [ Evan Dandrea ]
+  * Clarify why we cannot always default to the device that contains the
+    boot partition for grub-installer/bootdev.
+
+  [ Steve Langasek ]
+  * Make grub2 available as an option in expert mode again, restoring the
+    Debian behavior.
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Mon, 16 Mar 2009 00:13:02 -0700
+
+grub-installer (1.36ubuntu2) jaunty; urgency=low
+
+  * Check dmraid's exit code as well as parsing its output, the latter for
+    backward compatibility with dmraid << 1.0.0.rc15-1~exp4 only
+    (LP: #325947).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu, 12 Feb 2009 12:42:05 +0000
+
+grub-installer (1.36ubuntu1) jaunty; urgency=low
+
+  * Resynchronise with Debian (XFS change fixes LP: #8058). Remaining
+    changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed.
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for Wubi. Setting this disables normal grub
+      installation, but still generates a device.map; it also hides the
+      menu.
+    - Only support grub-installer/grub2_instead_of_grub_legacy by preseeding
+      for now.
+    - Handle cases where /boot is bind-mounted.
+    - Add another guard against calling 'udevadm info' with an empty device
+      name.
+    - Add support for writing an MBR on each disk in an mdadm-managed RAID
+      providing /boot.
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Add support for lpia.
+    - Handle /boot being on a virtio device.
+    - Set a sensible default boot device when /cdrom is not iso9660, as this
+      is probably a USB install and (hd0) does not make sense when
+      installing from a removable disk.
+    - Use rootnoverify rather than root when chain-loading Microsoft
+      operating systems.
+    - 'dmraid -c -s' changed its output format; cope with both old and new.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 23 Jan 2009 13:19:18 +0000
+
 grub-installer (1.36) unstable; urgency=low
 
   * Allow to install grub when /boot is on XFS. Since version 0.97-47lenny2
@@ -1111,6 +2626,71 @@ grub-installer (1.36) unstable; urgency=
 
  -- Frans Pop <fjp@debian.org>  Fri, 23 Jan 2009 02:59:03 +0100
 
+grub-installer (1.35ubuntu4) jaunty; urgency=low
+
+  * Fix syntax error in otheros.sh.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 21 Nov 2008 23:52:52 +0000
+
+grub-installer (1.35ubuntu3) jaunty; urgency=low
+
+  * Nail another instance of dmraid output-checking.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 21 Nov 2008 21:08:56 +0000
+
+grub-installer (1.35ubuntu2) jaunty; urgency=low
+
+  * Hide GRUB menu if grub-installer/bootdev_directory is preseeded; this is
+    used in the Wubi case where GRUB is used as a secondary boot loader, and
+    so the user already had a chance to boot from another operating system
+    (thanks, Agostino Russo; LP: #289791).
+  * Use rootnoverify rather than root when chain-loading Microsoft operating
+    systems (LP: #10661).
+  * 'dmraid -c -s' changed its output format; cope with both old and new.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 21 Nov 2008 21:00:39 +0000
+
+grub-installer (1.35ubuntu1) jaunty; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed.
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for installation-from-windows. Setting this disables
+      normal grub installation, but still generates a device.map.
+    - Only support grub-installer/grub2_instead_of_grub_legacy by preseeding
+      for now.
+    - Handle cases where /boot is bind-mounted.
+    - Add another guard against calling 'udevadm info' with an empty device
+      name.
+    - Add support for writing an MBR on each disk in an mdadm-managed RAID
+      providing /boot.
+    - Properly make use of output from os-prober to configure the booting of
+      other operating systems on dmraid arrays. Attempt to guess where in
+      the device map the array belongs, by substituting the first drive in
+      the dmraid array for the dmraid array device node itself, and removing
+      any reference to other member disks of the array.
+    - Add support for lpia.
+    - Handle /boot being on a virtio device.
+    - Set a sensible default boot device when /cdrom is not iso9660, as this
+      is probably a USB install and (hd0) does not make sense when
+      installing from a removable disk.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 10 Nov 2008 00:39:33 +0000
+
 grub-installer (1.35) unstable; urgency=low
 
   * Add support for MMC/SD card devices (mmcblkX).
@@ -1160,6 +2740,106 @@ grub-installer (1.34) unstable; urgency=
 
  -- Otavio Salvador <otavio@debian.org>  Sun, 21 Sep 2008 21:47:51 -0300
 
+grub-installer (1.32ubuntu10) intrepid; urgency=low
+
+  [ Evan Dandrea ]
+  * Set a sensible default boot device when /cdrom is not iso9660, as this
+    is probably a USB install and (hd0) does not make sense when installing
+    from a removable disk (LP: #282037).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 20 Oct 2008 23:08:21 +0100
+
+grub-installer (1.32ubuntu9) intrepid; urgency=low
+
+  * grub4dos can't handle UUIDs, so tweak previous change to continue using
+    groot=()/ubuntu/disks in that case (LP: #283520).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 15 Oct 2008 11:17:06 +0100
+
+grub-installer (1.32ubuntu8) intrepid; urgency=low
+
+  * Cope with new UUID-style groot when handling
+    grub-installer/bootdev_directory (LP: #283520).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 15 Oct 2008 09:20:51 +0100
+
+grub-installer (1.32ubuntu7) intrepid; urgency=low
+
+  * grub-installer: if the boot filesystem is on a virtio device, we need to
+    null out the $frdisk variable (LP: #281492)
+
+ -- Dustin Kirkland <kirkland@ubuntu.com>  Tue, 14 Oct 2008 17:31:47 -0500
+
+grub-installer (1.32ubuntu6) intrepid; urgency=low
+
+  * Add support for lpia (LP: #274781)
+
+ -- Emmet Hikory <persia@ubuntu.com>  Fri, 26 Sep 2008 22:38:21 +0900
+
+grub-installer (1.32ubuntu5) intrepid; urgency=low
+
+  * grub-installer: Properly make use of output from os-prober to configure
+    the booting of other operating systems on dmraid arrays. Attempt to
+    guess where in the device map the array belongs, by substituting
+    the first drive in the dmraid array for the dmraid array device node
+    itself, and removing any reference to other member disks of the array.
+
+ -- Luke Yelavich <themuso@ubuntu.com>  Thu, 25 Sep 2008 23:14:10 +1000
+
+grub-installer (1.32ubuntu4) intrepid; urgency=low
+
+  [ Dustin Kirkland ]
+  * grub-installer: fix faulty logic (assumed mutual exclusion of dmraid,
+    multipath, and md), (LP: #270758).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 16 Sep 2008 10:31:53 +0100
+
+grub-installer (1.32ubuntu3) intrepid; urgency=low
+
+  [ Dustin Kirkland ]
+  * grub-installer: fix broken md device determination (LP: #264533).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Sat, 06 Sep 2008 10:44:21 +0100
+
+grub-installer (1.32ubuntu2) intrepid; urgency=low
+
+  [ Colin Watson ]
+  * Add another guard against calling 'udevadm info' with an empty device
+    name (LP: #30772).
+
+  [ Dustin Kirkland ]
+  * grub-installer: add support for writing an MBR on each disk in an
+    mdadm-managed RAID providing /boot (LP: #33649)
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu, 07 Aug 2008 19:02:15 +0100
+
+grub-installer (1.32ubuntu1) intrepid; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed.
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Unless grub-installer/make_active is preseeded to false, mark the
+      partition to which GRUB is being installed as bootable, or failing
+      that the first available primary partition on the disk to which GRUB
+      is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for installation-from-windows. Setting this disables
+      normal grub installation, but still generates a device.map.
+    - Only support grub-installer/grub2_instead_of_grub_legacy by preseeding
+      for now.
+    - Handle cases where /boot is bind-mounted.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 16 Jun 2008 16:45:11 +0100
+
 grub-installer (1.32) unstable; urgency=low
 
   [ Updated translations ]
@@ -1329,6 +3009,87 @@ grub-installer (1.28) unstable; urgency=
 
  -- Robert Millan <rmh@aybabtu.com>  Mon,  4 Feb 2008 15:31:06 +0100
 
+grub-installer (1.27ubuntu7) hardy; urgency=low
+
+  [ Colin Watson ]
+  * Backport from trunk:
+    - Run grub in the chroot for password encryption.
+
+  [ James Westby ]
+  * Confirm the GRUB password after entry (LP: #42019). Note that
+    grub-installer/password-again must now be preseeded in addition to
+    grub-installer/password, and that grub-installer/password-crypted now
+    takes an MD5-crypted password rather than a boolean.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 15 Apr 2008 01:55:07 +0100
+
+grub-installer (1.27ubuntu6) hardy; urgency=low
+
+  * Added the grub-installer/make_active debconf question.  When
+    preseeded false, this will skip the code that marks a partition as
+    bootable.
+
+ -- Evan Dandrea <evand@ubuntu.com>  Thu, 13 Mar 2008 09:56:02 -0400
+
+grub-installer (1.27ubuntu5) hardy; urgency=low
+
+  * grub-installer: Pass the correct number of arguments to db_input for
+    grub-installer/sataraid-error.
+
+ -- Luke Yelavich <luke.yelavich@canonical.com>  Wed, 13 Feb 2008 23:15:50 +1100
+
+grub-installer (1.27ubuntu4) hardy; urgency=low
+
+  * Teach grub-installer about virtio devices (/dev/vd*).
+
+ -- Soren Hansen <soren@ubuntu.com>  Wed, 13 Feb 2008 00:38:04 +0100
+
+grub-installer (1.27ubuntu3) hardy; urgency=low
+
+  * Generate a device.map when bootdev_directory is set (loop
+    installations) (LP: #188460).  Thanks Agostino Russo.
+
+ -- Evan Dandrea <evand@ubuntu.com>  Wed, 06 Feb 2008 12:22:56 -0500
+
+grub-installer (1.27ubuntu2) hardy; urgency=low
+
+  [ Colin Watson ]
+  * udev 117 merged all udev tools into a single binary called udevadm.
+    Check for this and use it instead of udevinfo if available.
+
+  [ Evan Dandrea ]
+  * Handle cases where /boot is bindmounted (LP: #181658).
+
+ -- Evan Dandrea <evand@ubuntu.com>  Fri, 18 Jan 2008 15:41:36 -0500
+
+grub-installer (1.27ubuntu1) hardy; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed.
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Add user parameters to defoptions rather than kopt, so that they
+      aren't used in the recovery mode option.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+    - Mark the partition to which GRUB is being installed as bootable, or
+      failing that the first available primary partition on the disk to
+      which GRUB is being installed.
+    - Support grub-installer/bootdev_directory preseeding to make use of the
+      relative path feature of grub4dos, so that we can point grub4dos at
+      part of a disk for installation-from-windows. Setting this disables
+      normal grub installation.
+    - Only support grub-installer/grub2_instead_of_grub_legacy by preseeding
+      for now.
+  * Adjust Vcs-* headers for Ubuntu.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 26 Nov 2007 14:45:05 +0000
+
 grub-installer (1.27) unstable; urgency=low
 
   [ Romain Perier ]
@@ -1464,6 +3225,51 @@ grub-installer (1.25) unstable; urgency=
 
  -- Frans Pop <fjp@debian.org>  Fri, 06 Jul 2007 00:08:48 +0200
 
+grub-installer (1.24ubuntu4) gutsy; urgency=low
+
+  * Only support grub-installer/grub2_instead_of_grub_legacy by preseeding
+    for now, to avoid a prompt (albeit only in expert mode) that won't work
+    on our CDs (LP: #138035).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 07 Sep 2007 19:27:20 +0100
+
+grub-installer (1.24ubuntu3) gutsy; urgency=low
+
+  * Support grub-installer/bootdev_directory preseeding to make use of the
+    relative path feature of grub4dos, so that we can point grub4dos at part
+    of a disk for installation-from-windows. Setting this disables normal
+    grub installation.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 07 Sep 2007 15:57:47 +0100
+
+grub-installer (1.24ubuntu2) gutsy; urgency=low
+
+  * Mark the partition to which GRUB is being installed as bootable, or
+    failing that the first available primary partition on the disk to which
+    GRUB is being installed (LP: #14244).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 24 Aug 2007 12:05:09 +0100
+
+grub-installer (1.24ubuntu1) gutsy; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed.
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Add user parameters to defoptions rather than kopt, so that they
+      aren't used in the recovery mode option.
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+  * Only purge the package from grub and grub2 that we aren't using, not
+    both.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 27 Apr 2007 11:21:09 +0100
+
 grub-installer (1.24) unstable; urgency=low
 
   * Fix syntax error in grub-installer script.
@@ -1521,6 +3327,37 @@ grub-installer (1.21) unstable; urgency=
 
  -- Frans Pop <fjp@debian.org>  Wed, 31 Jan 2007 17:43:58 +0100
 
+grub-installer (1.20ubuntu3) feisty; urgency=low
+
+  * Set Maintainer to ubuntu-installer@lists.ubuntu.com.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu, 15 Mar 2007 00:34:41 +0000
+
+grub-installer (1.20ubuntu2) feisty; urgency=low
+
+  * Drop dependency on dmidecode-udeb and rely on new archdetect support for
+    Intel Macs. Requires libdebian-installer4-udeb 0.47ubuntu1.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 17 Jan 2007 13:13:40 +0000
+
+grub-installer (1.20ubuntu1) feisty; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed.
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Add user parameters to defoptions rather than kopt, so that they
+      aren't used in the recovery mode option (closes: Malone #31905).
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 19 Dec 2006 14:03:41 +0000
+
 grub-installer (1.20) unstable; urgency=low
 
   * Fix serial console support in the grub configuration. Closes: #224641.
@@ -1543,6 +3380,24 @@ grub-installer (1.20) unstable; urgency=
 
  -- Frans Pop <fjp@debian.org>  Thu, 30 Nov 2006 15:21:33 +0100
 
+grub-installer (1.19ubuntu1) feisty; urgency=low
+
+  * Resynchronise with Debian. Remaining changes:
+    - Show the grub menu and raise the menu timeout if other operating
+      systems are installed.
+    - Ask grub-installer/only_debian at medium priority.
+    - Remove splash boot parameter unless debian-installer/framebuffer=true.
+    - If / or /boot are on a removable device, install GRUB there by
+      default.
+    - Only mount /target/proc if it isn't already mounted.
+    - Add user parameters to defoptions rather than kopt, so that they
+      aren't used in the recovery mode option (closes: Malone #31905).
+    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+      grub-installer to use its default MBR selection method despite there
+      being unsupported operating systems on the disk.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 21 Nov 2006 04:55:45 +0000
+
 grub-installer (1.19) unstable; urgency=low
 
   [ Otavio Salvador ]
@@ -1638,6 +3493,12 @@ grub-installer (1.18) unstable; urgency=
 
  -- Otavio Salvador <otavio@debian.org>  Thu, 31 Aug 2006 19:10:57 -0300
 
+grub-installer (1.17ubuntu1) edgy; urgency=low
+
+  * Resynchronise with Debian.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 30 Jun 2006 09:53:03 +0100
+
 grub-installer (1.17) unstable; urgency=low
 
   [ Otavio Salvador ]
@@ -1680,6 +3541,45 @@ grub-installer (1.15) unstable; urgency=
 
  -- Joey Hess <joeyh@debian.org>  Fri, 19 May 2006 13:31:58 -0400
 
+grub-installer (1.14ubuntu5) dapper; urgency=low
+
+  * Don't fall over if installing to an XFS root filesystem in
+    noninteractive mode (closes: Malone #46764).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Sun, 28 May 2006 14:43:00 +0100
+
+grub-installer (1.14ubuntu4) dapper; urgency=low
+
+  * Return early from is_removable if the argument isn't a mount point
+    (closes: Malone #40100).
+  * Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
+    grub-installer to use its default MBR selection method despite there
+    being unsupported operating systems on the disk (part of Malone #40131).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 19 Apr 2006 11:26:18 +0100
+
+grub-installer (1.14ubuntu3) dapper; urgency=low
+
+  * Remove espresso-grub package, moved into espresso proper.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed,  5 Apr 2006 17:46:49 +0100
+
+grub-installer (1.14ubuntu2) dapper; urgency=low
+
+  * Modify defoptions now in the no-framebuffer case, not nonaltoptions.
+  * Add user parameters to defoptions rather than kopt, so that they aren't
+    used in the recovery mode option (closes: Malone #31905).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 27 Mar 2006 10:02:29 +0100
+
+grub-installer (1.14ubuntu1) dapper; urgency=low
+
+  * Resynchronise with Debian.
+  * Backport from trunk:
+    - Disable grub-installer on Intel-based Macs.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 22 Mar 2006 11:27:37 +0000
+
 grub-installer (1.14) unstable; urgency=low
 
   * Make sure no .svn directories get included in the package.
@@ -1706,6 +3606,56 @@ grub-installer (1.13) unstable; urgency=
 
  -- Frans Pop <fjp@debian.org>  Wed, 25 Jan 2006 12:38:06 +0100
 
+grub-installer (1.12ubuntu6) dapper; urgency=low
+
+  * Only mount /proc if it isn't already mounted.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 13 Feb 2006 12:18:02 +0000
+
+grub-installer (1.12ubuntu5) dapper; urgency=low
+
+  * Make espresso-grub depend on espresso (yes, this means a circular
+    dependency, sorry; closes: Malone #30045).
+  * Force grub-installer/bootdev to (hd0) in the event that not all
+    installed operating systems are recognised. By definition, you can
+    always repair the situation with the live CD you're installing from.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue,  7 Feb 2006 17:44:39 +0000
+
+grub-installer (1.12ubuntu4) dapper; urgency=low
+
+  * Fix support for putting / on a removable device
+    - Make sure to mount /proc before possibly running findfs, since it will
+      fail if not
+    - Use udevinfo as well as the removable flag file to detect if a device
+      is removable or not.  Anything on USB or IEEE1394 is defined as
+      removable.
+    - Override device.map if installing onto a removable device, since we
+      know/hope that it will be BIOS drive 0x80
+
+ -- Tollef Fog Heen <tfheen@ubuntu.com>  Fri,  3 Feb 2006 18:27:18 +0100
+
+grub-installer (1.12ubuntu3) dapper; urgency=low
+
+  * espresso/grubinstaller.py: Define prepare() instead of overriding
+    run_command(). Breaks espresso (<< 0.99.7).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu,  2 Feb 2006 22:39:30 +0000
+
+grub-installer (1.12ubuntu2) dapper; urgency=low
+
+  * Fix espresso-grub error handling.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed,  1 Feb 2006 10:54:42 +0000
+
+grub-installer (1.12ubuntu1) dapper; urgency=low
+
+  * Resynchronise with Debian.
+  * Add an espresso-grub package, providing grub-installer as an Espresso
+    module.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 23 Jan 2006 14:42:48 +0000
+
 grub-installer (1.12) unstable; urgency=low
 
   [ Christian Perrier ]
@@ -1765,6 +3715,28 @@ grub-installer (1.12) unstable; urgency=
 
  -- Colin Watson <cjwatson@debian.org>  Wed, 18 Jan 2006 10:10:07 +0000
 
+grub-installer (1.11ubuntu3) dapper; urgency=low
+
+  * Use -f in readlink.
+
+ -- Fabio M. Di Nitto <fabbione@ubuntu.com>  Fri, 13 Jan 2006 09:39:38 +0100
+
+grub-installer (1.11ubuntu2) dapper; urgency=low
+
+  * Detect if / or /boot are on a removable device and if so, install grub MBR
+    on such device instead of bios (hd0).
+    This change will allow users to install for example on a USB stick and
+    be able to boot the entire system from it assuming the device doesn't
+    change name. This latter issue will be addressed later.
+
+ -- Fabio M. Di Nitto <fabbione@ubuntu.com>  Mon, 09 Jan 2006 09:52:04 +0100
+
+grub-installer (1.11ubuntu1) dapper; urgency=low
+
+  * Resynchronise with Debian.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 25 Oct 2005 12:55:15 +0100
+
 grub-installer (1.11) unstable; urgency=low
 
   * Use grub-setup -y option. This is present in sarge, but not woody so we
@@ -1833,6 +3805,19 @@ grub-installer (1.10) unstable; urgency=
 
  -- Joey Hess <joeyh@debian.org>  Fri, 15 Jul 2005 17:13:09 +0300
 
+grub-installer (1.09ubuntu2) breezy; urgency=low
+
+  * Remove splash boot parameter unless debian-installer/framebuffer=true
+    (Ubuntu #13977).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon,  5 Sep 2005 14:08:09 +0100
+
+grub-installer (1.09ubuntu1) breezy; urgency=low
+
+  * Resynchronise with Debian.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon,  6 Jun 2005 12:09:13 +0100
+
 grub-installer (1.09) unstable; urgency=low
 
   * Timo Aaltonen, Colin Watson
@@ -1865,6 +3850,12 @@ grub-installer (1.09) unstable; urgency=
 
  -- Colin Watson <cjwatson@debian.org>  Wed,  1 Jun 2005 01:16:10 +0000
 
+grub-installer (1.08ubuntu1) breezy; urgency=low
+
+  * Resynchronise with Debian.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 23 May 2005 14:15:19 +0100
+
 grub-installer (1.08) unstable; urgency=low
 
   * Joey Hess
@@ -1903,6 +3894,12 @@ grub-installer (1.08) unstable; urgency=
 
  -- Colin Watson <cjwatson@debian.org>  Fri, 20 May 2005 11:31:43 +0000
 
+grub-installer (1.07.1ubuntu1) breezy; urgency=low
+
+  * Resynchronise with Debian.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 20 Apr 2005 19:14:26 +1000
+
 grub-installer (1.07.1) unstable; urgency=low
 
   * Includes substitution variable fixes in translated templates.
@@ -1916,6 +3913,20 @@ grub-installer (1.07.1) unstable; urgenc
 
  -- Joey Hess <joeyh@debian.org>  Wed,  2 Feb 2005 18:06:47 -0500
 
+grub-installer (1.07ubuntu2) hoary; urgency=low
+
+  * Drop priorities of grub-installer/with_other_os and
+    grub-installer/only_debian questions to high (matching Debian) and
+    medium respectively.
+
+ -- Colin Watson <cjwatson@canonical.com>  Sat,  1 Jan 2005 23:52:05 +0000
+
+grub-installer (1.07ubuntu1) hoary; urgency=low
+
+  * Resynchronise with Debian.
+
+ -- Colin Watson <cjwatson@canonical.com>  Tue,  9 Nov 2004 23:10:20 +0000
+
 grub-installer (1.07) unstable; urgency=low
 
   * Frans Pop
@@ -1935,6 +3946,19 @@ grub-installer (1.07) unstable; urgency=
 
  -- Joey Hess <joeyh@debian.org>  Tue,  2 Nov 2004 10:00:50 -0500
 
+grub-installer (1.06ubuntu2) hoary; urgency=low
+
+  * Make sure grub-installer.isinstallable is executable.
+
+ -- Colin Watson <cjwatson@canonical.com>  Thu,  4 Nov 2004 11:42:28 +0000
+
+grub-installer (1.06ubuntu1) hoary; urgency=low
+
+  * Resynchronise with Debian (thanks, Scott James Remnant).
+  * Update Ubuntu branding.
+
+ -- Colin Watson <cjwatson@canonical.com>  Fri, 29 Oct 2004 12:02:35 +0100
+
 grub-installer (1.06) unstable; urgency=low
 
   * Updated translations: 
@@ -2161,6 +4185,55 @@ grub-installer (0.51) unstable; urgency=
 
  -- Joey Hess <joeyh@debian.org>  Sat, 17 Jul 2004 14:24:42 -0400
 
+grub-installer (0.50ubuntu6) warty; urgency=low
+
+  * Updated translations:
+    - Greek (el.po) by Logiotatidis George
+
+ -- Colin Watson <cjwatson@canonical.com>  Tue, 12 Oct 2004 14:34:57 +0100
+
+grub-installer (0.50ubuntu5) warty; urgency=low
+
+  * Show the grub menu and raise the menu timeout if other operating systems
+    are installed (closes: Ubuntu #993).
+
+ -- Colin Watson <cjwatson@canonical.com>  Mon, 11 Oct 2004 17:55:28 +0100
+
+grub-installer (0.50ubuntu4) warty; urgency=low
+
+  * Backport from Debian (Joey Hess) for Warty #1337:
+    - Use the user-params command to get parameters the user manually
+      entered on the command line, and add these into the grub config file.
+
+ -- Colin Watson <cjwatson@canonical.com>  Mon, 20 Sep 2004 17:48:40 +0100
+
+grub-installer (0.50ubuntu3) warty; urgency=low
+
+  * Tollef Fog Heen
+    - Ubuntu branding.
+  * Colin Watson
+    - Update most translations.
+
+ -- Colin Watson <cjwatson@flatline.org.uk>  Mon, 16 Aug 2004 17:34:35 +0100
+
+grub-installer (0.50ubuntu2) warty; urgency=low
+
+  * Colin Watson
+    - grub-installer/bootdev must be asked (i.e. critical priority) on the
+      code path where unsupported operating systems were found, otherwise
+      bootdev ends up empty and grub-installer fails.
+
+ -- Colin Watson <cjwatson@flatline.org.uk>  Mon,  2 Aug 2004 20:33:55 +0100
+
+grub-installer (0.50ubuntu1) warty; urgency=low
+
+  * Colin Watson
+    - Ask grub-installer/with_other_os at critical priority, since it can
+      render a previously working system unbootable if Linux doesn't boot
+      and os-prober failed to detect your other operating systems.
+
+ -- Colin Watson <cjwatson@flatline.org.uk>  Wed, 21 Jul 2004 15:56:16 +0100
+
 grub-installer (0.50) unstable; urgency=low
 
   * Re-upload sans changes.
diff -pruN 1.128/debian/control 1.128ubuntu14/debian/control
--- 1.128/debian/control	2014-09-15 09:42:43.000000000 +0000
+++ 1.128ubuntu14/debian/control	2017-01-16 01:31:58.000000000 +0000
@@ -1,11 +1,13 @@
 Source: grub-installer
 Section: debian-installer
 Priority: standard
-Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
+Maintainer: Ubuntu Installer Team <ubuntu-installer@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
 Uploaders: Otavio Salvador <otavio@debian.org>, Felix Zielcke <fzielcke@z-51.de>, Colin Watson <cjwatson@debian.org>, Christian Perrier <bubulle@debian.org>, Steve McIntyre <93sam@debian.org>
 Build-Depends: debhelper (>= 9), po-debconf (>= 0.5.0), libparted-dev
-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=d-i/grub-installer.git
-Vcs-Git: git://anonscm.debian.org/d-i/grub-installer.git
+XS-Debian-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=d-i/grub-installer.git
+XS-Debian-Vcs-Git: git://anonscm.debian.org/d-i/grub-installer.git
+Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/grub-installer/ubuntu
 
 Package: grub-installer
 Architecture: i386 hurd-i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc ppc64el mipsel arm64
diff -pruN 1.128/debian/grub-installer.templates 1.128ubuntu14/debian/grub-installer.templates
--- 1.128/debian/grub-installer.templates	2014-12-29 22:19:09.000000000 +0000
+++ 1.128ubuntu14/debian/grub-installer.templates	2017-01-16 01:31:58.000000000 +0000
@@ -264,6 +264,13 @@ Type: text
 # :sl2:
 _Description: Force GRUB installation to the EFI removable media path
 
+Template: grub-installer/timeout
+Type: text
+Description: for internal use; can be preseeded
+ Wait for the given number of seconds before proceeding with the boot process.
+ This makes it possible to leave time for invoking grub's menu in VMs where
+ it might take a little bit before you get access to the console.
+
 Template: grub-installer/force-efi-extra-removable
 Type: boolean
 Default: false
diff -pruN 1.128/grub-installer 1.128ubuntu14/grub-installer
--- 1.128/grub-installer	2015-12-02 23:31:47.000000000 +0000
+++ 1.128ubuntu14/grub-installer	2019-10-08 09:24:14.000000000 +0000
@@ -40,18 +40,48 @@ debug () {
 ARCH="$(archdetect)"
 info "architecture: $ARCH"
 
+umount_dirs=
+
+cleanup () {
+	for dir in $umount_dirs; do
+		umount "$ROOT/${dir#/}" || true
+	done
+}
+
+umount_on_exit () {
+	if [ "$umount_dirs" ]; then
+		umount_dirs="$umount_dirs $1"
+	else
+		umount_dirs="$1"
+		trap cleanup EXIT HUP INT QUIT TERM
+	fi
+}
+
+# XXX cjwatson 2019-03-25: This is all far too complicated and fragile, and
+# should be replaced with in-target or similar.
+
 # Ensure proc is mounted in all the $chroot calls;
 # needed for RAID+LVM for example
 initial_proc_contents="$(ls $ROOT/proc)"
 if [ -z "$initial_proc_contents" ]; then
 	info "Mounting /proc into $ROOT"
 	if [ "$(udpkg --print-os)" = "kfreebsd" ]; then
-		mount -t linprocfs proc $ROOT/proc
+		mount -t linprocfs proc $ROOT/proc && umount_on_exit /proc
 	else
-		mount -t proc proc $ROOT/proc
+		mount -t proc proc $ROOT/proc && umount_on_exit /proc
 	fi
 fi
 
+if [ "$(udpkg --print-os)" = linux ] && [ -z "$(ls $ROOT/sys)" ]; then
+	mount -t sysfs sysfs $ROOT/sys && umount_on_exit /sys
+fi
+
+# On Linux, we need /run in the chroot to work around
+# https://bugs.debian.org/918590.
+if [ "$(udpkg --print-os)" = "linux" ] && [ ! -d "$ROOT/run/udev" ]; then
+	mount --bind /run $ROOT/run
+fi
+
 get_serial_console() {
 	# Get the last 'console=' entry (if none, the whole string is returned)
 	local defconsole="$(sed -e 's/.*\(console=[^ ]*\).*/\1/' /proc/cmdline)"
@@ -100,9 +130,29 @@ grub_probe () {
 	$chroot $ROOT grub-probe $@
 }
 
+device_map=$ROOT/boot/grub/device.map
+
 # Usage: convert os_device
 # Convert an OS device to the corresponding GRUB drive
 convert () {
+	# Adjust the device map to add a SATA RAID array.
+	if [ "$grub_version" = grub ] && [ "$frtype" = "sataraid" ] && type dmraid >/dev/null 2>&1; then
+		temp_map=$ROOT/tmp/sataraid.map
+		echo quit | $chroot $ROOT /usr/sbin/grub --batch --device-map=/tmp/sataraid.map >/dev/null 2>&1
+
+		# Dmraid -r seems to list disks in reverse order to how they
+		# are detected by the kernel.
+		satadisk=$(dmraid -r | grep $(basename "$frdev") | cut -f 1 -d : | tail -1)
+		sed -i "s@$satadisk@$frdev@" $temp_map
+
+		# Remove member disks of the SATA RAID array from the device map.
+		for sdisk in $(dmraid -r | grep $(basename "$frdev") | cut -f 1 -d : | grep -v "$satadisk"); do
+			cat $temp_map | grep -v "$sdisk" > $temp_map.new
+			mv $temp_map.new $temp_map
+		done
+		mv $temp_map $device_map
+	fi
+
 	tmp_drive="$(grub_probe -d -t drive "$1")" || exit $?
 	if [ "$partition_offset" != 0 ]; then
 		tmp_part="$(echo "$tmp_drive" | sed 's%.*,\([0-9]*\)).*%\1%')"
@@ -134,7 +184,7 @@ hurd_convert () {
 # This should probably be rewritten using udevadm or similar.
 device_to_disk () {
 	echo "$1" | \
-		sed 's:\(/dev/\(cciss\|ida\|rs\)/c[0-9]d[0-9][0-9]*\|/dev/mmcblk[0-9]\|/dev/nvme[0-9][0-9]*n[0-9][0-9]*\|/dev/\(ad\|ada\|da\|vtbd\|xbd\)[0-9]\+\|/dev/[hs]d[0-9]\+\|/dev/[a-z]\+\).*:\1:'
+		sed 's:\(/dev/\(cciss\|ida\|rs\)/c[0-9]d[0-9][0-9]*\|/dev/mmcblk[0-9]\|/dev/nvme[0-9][0-9]*n[0-9][0-9]*\|/dev/\(ad\|ada\|da\|vtbd\|xbd\)[0-9]\+\|/dev/[hms]d[0-9]\+\|/dev/[a-z]\+\).*:\1:'
 }
 
 # Run update-grub in $ROOT
@@ -145,8 +195,8 @@ update_grub () {
 	else
 		in_target="log-output -t grub-installer $chroot $ROOT"
 	fi
-	if ! $in_target $update_grub; then
-		error "Running '$update_grub' failed." 1>&2
+	if ! $in_target $update_grub_cmd; then
+		error "Running '$update_grub_cmd' failed." 1>&2
 		db_input critical grub-installer/update-grub-failed || [ $? -eq 30 ]
 		db_go || true
 		db_progress STOP
@@ -169,6 +219,48 @@ findfstype () {
 	esac
 }
 
+is_removable () {
+	removabledevice="$(mount | grep "on $ROOT${1%/} " | cut -d' ' -f1)"
+	if [ -z "$removabledevice" ]; then
+		return
+	fi
+	# check if the device we got is a symlink. That might happen in future
+	# if we implement probe-for-root-fs
+	if [ -L "$removabledevice" ]; then
+		removabledevice="$(readlink -f $removabledevice)"
+	fi
+	# copy from convert(). We can't use the entire stuff yet. We can clean it later on.
+	removabledevice="$(echo "$removabledevice" | sed -e 's%\([vsh]d[a-z]\)[0-9]*$%\1%' -e 's%\(fd[0-9]*\)$%\1%' -e 's%/part[0-9]*$%/disc%' -e 's%\(c[0-7]d[0-9]*\).*$%\1%' -e 's%^/dev/%%g')"
+	if [ -e "/sys/block/$removabledevice/removable" ]; then
+		if [ "$(cat /sys/block/$removabledevice/removable)" != "0" ]; then
+			echo "/dev/$removabledevice"
+			return
+		fi
+	fi
+	if [ -z "$removabledevice" ]; then
+		return
+	fi
+	if type udevadm >/dev/null 2>&1; then
+		if [ "$bootfstype" = "zfs" ] || [ "$rootfstype" = "zfs" ]; then
+			bus="$(udevadm info -q env -n $removabledevice || true)"
+		else
+			bus="$(udevadm info -q env -n $removabledevice)"
+		fi
+	else
+		if [ "$bootfstype" = "zfs" ] || [ "$rootfstype" = "zfs" ]; then
+			bus="$(udevinfo -q env -n $removabledevice || true)"
+		else
+			bus="$(udevinfo -q env -n $removabledevice)"
+		fi
+	fi
+	bus="$(echo "$bus" | grep ^ID_BUS= | sed 's/^ID_BUS=//')"
+	case $bus in
+		usb|ieee1394)
+			echo "/dev/$removabledevice"
+			;;
+	esac
+}
+
 # by-id mapping copied from grub-pc.postinst.
 
 cached_available_ids=
@@ -222,6 +314,35 @@ devices_to_ids()
 	echo "$ids"
 }
 
+# Split a device name into a disk device name and a partition number, if
+# possible.
+split_device () {
+	disk=
+	part=
+	case $1 in
+		/dev/[vhs]d[a-z]*|/dev/fio[a-z]*)
+			disk="$(echo "$1" | sed 's,\(/dev/[a-z]\+\).*,\1,')"
+			part="$(echo "$1" | sed 's,/dev/[a-z]\+\(.*\),\1,')"
+			;;
+		/dev/*/c*d*)
+			disk="$(echo "$1" | sed 's,\(/dev/.*/c[0-9]\+d[0-9]\+\).*,\1,')"
+			part="$(echo "$1" | sed 's,/dev/.*/c[0-9]\+d[0-9]\+p\([0-9]\+\),\1,')"
+			[ "$part" != "$1" ] || part=
+			;;
+		/dev/mmcblk*)
+			disk="$(echo "$1" | sed 's,\(/dev/mmcblk[0-9]\+\).*,\1,')"
+			part="$(echo "$1" | sed 's,/dev/mmcblk[0-9]\+p\([0-9]\+\),\1,')"
+			[ "$part" != "$1" ] || part=
+			;;
+		/dev/nvme*n*)
+			disk="$(echo "$1" | sed 's,\(/dev/nvme[0-9]\+n[0-9]\+\).*,\1,')"
+			part="$(echo "$1" | sed 's,/dev/nvme[0-9]\+n[0-9]\+p\([0-9]\+\),\1,')"
+			[ "$part" != "$1" ] || part=
+			;;
+	esac
+	echo "$disk $part"
+}
+
 rootfs=$(findfs /)
 bootfs=$(findfs /boot)
 [ -n "$bootfs" ] || bootfs="$rootfs"
@@ -252,7 +373,10 @@ case $prefix in
     /dev/mapper)
 	disc_offered_devfs="$bootfs"
 	;;
-    /dev/[hsv]d[a-z0-9]|/dev/xvd[a-z]|/dev/cciss/c[0-9]d[0-9]*|/dev/ida/c[0-9]d[0-9]*|/dev/rs/c[0-9]d[0-9]*|/dev/mmcblk[0-9]|/dev/nvme[0-9]*n[0-9]*|/dev/ad[0-9]*|/dev/da[0-9]*)
+    /dev/loop)
+	disc_offered_devfs="$bootfs"
+	;;
+    /dev/[hmsv]d[a-z0-9]*|/dev/xvd[a-z]|/dev/cciss/c[0-9]d[0-9]*|/dev/ida/c[0-9]d[0-9]*|/dev/rs/c[0-9]d[0-9]*|/dev/mmcblk[0-9]|/dev/nvme[0-9]*n[0-9]*|/dev/ad[0-9]*|/dev/da[0-9]*|/dev/fio[a-z])
 	disc_offered_devfs="$prefix"
 	;;
     *)
@@ -264,9 +388,11 @@ disc_offered=$(mapdevfs "$disc_offered_d
 # Identify partition table of the disk containing our boot partition
 bootfslabel=$(partmap $disc_offered || echo unknown)
 
+found=0
 # Check if the boot file system is on Serial ATA RAID
 frdev=""
-if type dmraid >/dev/null 2>&1 && dmraid -s -c >/dev/null 2>&1 && \
+if [ "$found" = "0" ] && type dmraid >/dev/null 2>&1 && \
+   dmraid -s -c >/dev/null 2>&1 && \
    db_get disk-detect/activate_dmraid && [ "$RET" = true ]; then
 	for frdisk in $(dmraid -s -c); do
 		if echo "$disc_offered" | grep -q "/$frdisk[0-9]\+"; then
@@ -274,34 +400,70 @@ if type dmraid >/dev/null 2>&1 && dmraid
 			frbootpart=${disc_offered#$frdev}
 			frgrubroot=$frbootpart
 			frtype=sataraid
+			found=1
 			break
 		fi
 	done
+	[ "$found" = "1" ] || frdisk=
+fi
 # Check if the boot file system is on multipath
-elif type multipath >/dev/null 2>&1; then
+if [ "$found" = "0" ] && type multipath >/dev/null 2>&1; then
 	for frdisk in $(multipath -l 2>/dev/null | \
-			grep '^mpath[0-9]\+ ' | cut -d ' ' -f 1); do
+			grep '^mpath[a-z]\+ ' | cut -d ' ' -f 1); do
 		if echo "$disc_offered" | 	   \
-			grep -q "^/dev/mapper/${frdisk}-part[0-9]\+"; then
+			grep -q "^/dev/mapper/${frdisk}[0-9]\+"; then
 			frdev=/dev/mapper/$frdisk
 			frbootpart=${disc_offered#$frdev}
-			frgrubroot=${frbootpart#-part}
+			frgrubroot=${frbootpart#p}
 			frtype=multipath
+			found=1
 			break
 		fi
 	done
-	if [ "$frdisk" ]; then
+	if [ "$found" = "1" ]; then
 		# Create the device nodes for grub:
 		apt-install dmsetup
 		$chroot $ROOT dmsetup mknodes
+	else
+		frdisk=
 	fi
-elif type lvdisplay >/dev/null 2>&1 && \
+fi
+if [ "$found" = "0" ] && type lvdisplay >/dev/null 2>&1 && \
      (lvdisplay "$disc_offered" | grep -q 'LV Name' 2>/dev/null || \
       [ -e "$(dirname "$disc_offered")/control" ]); then
 	# Don't set frdev/frdisk here, otherwise you'll end up in different
 	# code paths below ...
 	frtype=lvm
 fi
+# Check if the boot file system is on an mdadm device
+if [ "$found" = "0" ] && type mdadm >/dev/null 2>&1; then
+	frdisk_list=
+	for frdisk in $(mdadm --detail "$bootfs_nodevfs" 2>/dev/null | \
+			grep " active sync " 2>/dev/null | \
+			sed "s/^.* active sync\s*//" 2>/dev/null \
+	); do
+		case $frdisk in
+		    /dev/*)	;;
+		    *)		continue ;;
+		esac
+		# Build a list of devices in the mirror
+		frdisk_list="$frdisk_list $(mapdevfs "$frdisk" || true)"
+		frdev=
+		frtype="mdadm"
+		found=1
+	done
+fi
+# Check if the boot file system is on a virtio device, /dev/vd*
+if [ "$found" = "0" ] && echo "$bootfs" | grep -qs "^\/dev\/vd[a-z]"; then
+	frdisk=
+	found=1
+fi
+# Check if the boot file system is on a loopback device
+if [ "$found" = "0" ] && echo "$bootfs" | grep -qs '^/dev/loop'; then
+	frdev="$bootfs"
+	frtype="loop"
+	found=1
+fi
 
 info "Identified partition label for $bootfs: $bootfslabel"
 
@@ -338,11 +500,19 @@ case $ARCH in
 		if [ -f /sys/firmware/efi/fw_platform_size ] ; then
 			SIZE=$(cat /sys/firmware/efi/fw_platform_size)
 			if [ $SIZE -eq 64 ] ; then
-				grub_package="grub-efi-amd64"
+				grub_package="grub-efi-amd64-signed"
 			elif [ $SIZE -eq 32 ] ; then
 				grub_package="grub-efi-ia32"
 			fi
 		fi
+		if [ ! -d /target/boot/efi ]; then
+			# No EFI System Partition, so presumably the partitioner
+			# believed this to be unnecessary, perhaps because we're
+			# installing on a pre-existing MBR partition table or
+			# perhaps because there's a BIOS Boot Partition.  In either
+			# case, the right answer is to fall back to grub-pc.
+			grub_package="grub-pc"
+		fi
 	fi
 	;;
     i386/*|amd64/*)
@@ -362,31 +532,49 @@ case $ARCH in
 	grub_package="grub-pc"
 esac
 
-case "$frtype:$bootfstype:$bootfslabel:$grub_package" in
-    sataraid:*:*:*)
-	# Serial ATA RAID partition, currently only grub is supported
-	grub_package="grub"
-	;;
-    multipath:*:*:*)
-	# Multipath requires GRUB Legacy for now
-	grub_package="grub"
-	;;
-    *:*:*:grub-yeeloong | lvm:*:*:* | *:*:gpt:* | :ext4:*:grub | *:ufs:*:* | *:zfs:*:* | *:btrfs:*:* )
-	# grub-legacy is not an option in these configurations
-	;;
-    *:*:*:grub-pc)
-	db_get grub-installer/grub2_instead_of_grub_legacy
-	if [ "$RET" = false ]; then
-		grub_package="grub"
-	fi
-	;;
-esac
-
 case $ARCH:$grub_package in
     ppc64el/*:grub-ieee1275)
+	# By default, use the first PReP partition found (prep-bootdev).
+	# If available, prefer a PReP partition in the same device (disc_offered).
+	# (the matching works on devices with/without disk-partition separator.)
+	# On MD/mdadm devices, each component device may have a PReP partition.
+
+	wipe_bootdevs=""
 	wipe_bootdev="$(/usr/lib/grub-installer/prep-bootdev)"
-	info "Wiping PReP partition $wipe_bootdev"
-	log-output -t grub-installer dd if=/dev/zero of="$wipe_bootdev" bs=512 count="$(blockdev --getsz "$wipe_bootdev")"
+	for prep_p in $(/usr/lib/grub-installer/prep-bootdev -l); do
+		prep_dev=$(split_device $prep_p)
+		offered=$(split_device $disc_offered)
+		if [ "${prep_dev%% *}" = "${offered%% *}" ]; then
+			wipe_bootdev=$prep_p
+			break
+		fi
+
+		if echo $disc_offered | grep -q '/dev/md[0-9]\+'; then
+			if mdadm --detail --verbose $disc_offered \
+			     | sed -n 's:.*\(/dev/.*[^0-9]\)[0-9]\+$:\1:p' \
+			     | grep "${prep_dev%% *}"; then
+				wipe_bootdevs="$wipe_bootdevs $prep_p"
+			fi
+		fi
+	done
+	unset prep_p
+
+	if [ -z "$wipe_bootdevs" ]; then
+		wipe_bootdevs="$wipe_bootdev"
+	fi
+
+	for wipe_bootdev in $wipe_bootdevs; do
+		if [ -n "$wipe_bootdev" ] && [ -e "$wipe_bootdev" ]; then
+			info "Wiping PReP partition $wipe_bootdev"
+			log-output -t grub-installer dd if=/dev/zero of="$wipe_bootdev" bs=512 count="$(blockdev --getsz "$wipe_bootdev")"
+		else
+			info "WARNING: PReP partition not found: $wipe_bootdev"
+		fi
+	done
+
+	if [ -z "$wipe_bootdevs" ]; then
+		info "WARNING: no PReP partition found"
+	fi
 	;;
 esac
 
@@ -394,47 +582,54 @@ case $grub_package in
     grub)
 	grub_version="grub"
 	menu_file="menu.lst"
-	update_grub="update-grub"
+	update_grub_cmd="update-grub -y"
 	partition_offset=1
 	frgrubroot=$(($frgrubroot - 1))
 	;;
     *)
 	grub_version="grub2"
 	menu_file="grub.cfg"
-	update_grub="update-grub"
+	update_grub_cmd="update-grub"
 	partition_offset=0
 	;;
 esac
 
+# determine if /boot or / are on a removable disk. We will do it for Linux only
+# and see how bad it goes.
+
+if [ "$(uname -s | tr '[A-Z]' '[a-z]')" = "linux" ]; then
+	bootremovable="$(is_removable /boot)"
+	[ -n "$bootremovable" ] || bootremovable="$(is_removable /)"
+fi
+
 user_params=$(user-params) || true
 defopt_params=""
 kopt_params=""
 got_quiet=""
+got_splash=""
 for u_param in $user_params; do
 	case "$u_param" in
 	    quiet)
 		got_quiet=1
-		defopt_params=${defopt_params:+$defopt_params }$u_param ;;
+		if ! db_get debian-installer/quiet || [ "$RET" = true ]; then
+			defopt_params=${defopt_params:+$defopt_params }$u_param
+		fi
+		;;
+	    splash)
+		got_splash=1
+		;;
 	    *)
 		kopt_params=${kopt_params:+$kopt_params }$u_param ;;
 	esac
 done
-if [ "$grub_version" = grub2 ]; then
-	# Add user parameters to the menu file; some options are only added
-	# to the default entry for a kernel instead of all entries.
-	# We have to duplicate grub2's default for
-	# GRUB_CMDLINE_LINUX_DEFAULT here.
-	if [ -z "$got_quiet" ]; then
-		defopt_params="quiet${defopt_params:+ $defopt_params}"
-	fi
-	# (quoting to deconfuse vim)
-	$chroot $ROOT 'debconf-set-selections' <<EOF
-$grub_package grub2/linux_cmdline string $kopt_params
-$grub_package grub2/linux_cmdline_default string $defopt_params
-EOF
+if [ "$got_splash" ] && \
+   db_get debian-installer/framebuffer && [ "$RET" = true ] && \
+   (! db_get debian-installer/splash || [ "$RET" = true ]); then
+	defopt_params=${defopt_params:+$defopt_params }splash
 fi
 if [ "$grub_package" = grub-pc ]; then
 	# Empty this for now to stop it being asked. We'll fix this up later.
+	# (quoting to deconfuse vim)
 	$chroot $ROOT 'debconf-set-selections' <<EOF
 $grub_package grub-pc/install_devices multiselect
 $grub_package grub-pc/install_devices_empty boolean true
@@ -450,30 +645,26 @@ db_progress INFO grub-installer/progress
 # we need to purge them first to support users who try grub2 and then switch
 # to grub legacy, or vice-versa
 case "$grub_package" in
-    grub)
-	log-output -t grub-installer $chroot $ROOT dpkg -P grub-pc-bin grub-pc grub-efi grub-efi-amd64-bin grub-efi-amd64 grub-efi-ia32-bin grub-efi-ia32
-	;;
     grub-pc)
-	log-output -t grub-installer $chroot $ROOT dpkg -P grub grub-legacy grub-efi grub-efi-amd64-bin grub-efi-amd64 grub-efi-ia32-bin grub-efi-ia32
-    ;;
-    grub-efi*)
-	log-output -t grub-installer $chroot $ROOT dpkg -P grub grub-legacy grub-pc-bin grub-pc
-    ;;
+	log-output -t grub-installer $chroot $ROOT dpkg -P grub-efi grub-efi-amd64-bin grub-efi-amd64 grub-efi-amd64-signed grub-efi-ia32-bin grub-efi-ia32
+	;;
+    grub-efi)
+	log-output -t grub-installer $chroot $ROOT dpkg -P grub-efi-amd64-signed
+	;;
 esac
 
 exit_code=0
 inst_package=$grub_package
 case "$grub_package" in
-    grub)
-	if apt-install --no-recommends grub-legacy ; then
-		inst_package=grub-legacy
-	else
-		apt-install $grub_package || exit_code=$? 
-	fi
-	;;
    *)
 	# Will pull in os-prober based on global setting for Recommends
 	apt-install $grub_package || exit_code=$? 
+	case $grub_package in
+	    *-signed)
+		apt-install shim-signed || true
+		apt-install grub-pc || true
+		;;
+	esac
 	;;
 esac
 
@@ -545,7 +736,7 @@ if [ -s /tmp/os-probed ]; then
 	done
 	IFS="$OLDIFS"
 	
-	if [ -n "$unsupported_os_list" ]; then
+	if [ -z "$OVERRIDE_UNSUPPORTED_OS" ] && [ -n "$unsupported_os_list" ]; then
 		# Unsupported OS, jump straight to manual boot device question.
 		state=2
 	else
@@ -558,7 +749,7 @@ else
 	state=1
 fi
 
-if [ "$frdev" ]; then
+if [ "$frdev" ] && [ "$frtype" != "sataraid" ] && [ "$frtype" != "loop" ]; then
 	if [ -e $ROOT$frdev ] && [ -e $ROOT$frdev$frbootpart ] && \
 	   [ $frgrubroot -ge $((1 - $partition_offset)) ]; then
 		db_subst grub-installer/$frtype GRUBROOT $ROOT$frdev$frbootpart
@@ -575,6 +766,9 @@ fi
 default_bootdev_os="$($chroot $ROOT grub-mkdevicemap --no-floppy -m - | head -n1 | cut -f2)"
 if [ "$default_bootdev_os" ]; then
 	default_bootdev="$($chroot $ROOT readlink -f "$default_bootdev_os")"
+	if db_get grub-installer/bootdev && [ "$RET" = '(hd0)' ]; then
+		db_set grub-installer/bootdev "$default_bootdev"
+	fi
 else
 	default_bootdev="(hd0)"
 fi
@@ -595,7 +789,35 @@ if db_get cdrom-detect/hybrid; then
 fi
 case $ARCH:$grub_package in
     *:grub|*:grub-pc|sparc:grub-ieee1275)
-	if [ "$(device_to_disk "$cdsrc")" = "$default_bootdev" ] || \
+	if [ "$grub_version" = grub2 ] && \
+	    ([ "$frtype" = mdadm ] || [ "$frtype" = multipath ]); then
+		# Check whether any of the RAIDed devices is a partition, and if so
+		# install to the corresponding disk instead, as GRUB 2 doesn't like
+		# installing to a RAID device composed of partitions.
+		# TODO: This duplicates some pretty horrible code from above. This
+		# should at least be turned into a function or something ...
+		disks=
+		use_disks=
+		for frdisk_one in $frdisk_list; do
+			prefix=$(echo "$frdisk_one" | \
+			  sed 's:\(/dev/\(cciss\|ida\|rs\)/c[0-9]d[0-9][0-9]*\|/dev/mmcblk[0-9]\|/dev/\(ad\|da\)[0-9]\+\|/dev/nvme[0-9]n[0-9]\|/dev/[a-z]\+\).*:\1:')
+			disks="${disks:+$disks }$prefix"
+			case $prefix in
+			    /dev/[hmsv]d[a-z]|/dev/xvd[a-z]|/dev/cciss/c[0-9]d[0-9]*|/dev/ida/c[0-9]d[0-9]*|/dev/rs/c[0-9]d[0-9]*|/dev/mmcblk[0-9]|/dev/ad[0-9]*|/dev/da[0-9]*|/dev/fio[a-z]|/dev/nvme[0-9]n[0-9])
+				if [ "$prefix" != "$frdisk_one" ]; then
+					use_disks=1
+				fi
+				;;
+			esac
+		done
+		if [ "$use_disks" ]; then
+			default_bootdev="$disks"
+		else
+			default_bootdev="$bootfs_nodevfs"
+		fi
+		db_set grub-installer/bootdev "$default_bootdev"
+		state=3
+	elif [ "$(device_to_disk "$cdsrc")" = "$default_bootdev" ] || \
 	   ([ -n "$hdsrc" ] && [ "$(device_to_disk "$hdsrc")" = "$default_bootdev" ]) || \
 	   ([ "$default_bootdev" = '(hd0)' ] && \
 	    (([ -n "$cdfs" ] && [ "$cdfs" != "iso9660" ]) || \
@@ -614,11 +836,7 @@ case $ARCH:$grub_package in
 	fi
 	;;
     ppc64el/*:grub-ieee1275)
-	# Hack to pick the right boot device.  This should really be done in
-	# grub-install instead, and will need to be done there in order to
-	# support major GRUB upgrades properly, but this will tide us over
-	# for now.
-	bootdev="$(/usr/lib/grub-installer/prep-bootdev)"
+	bootdev="$wipe_bootdev"
 	state=3
 	;;
     *)
@@ -635,7 +853,7 @@ select_bootdev() {
 	debug "select_bootdev: arg='$1'"
 
 	local dev_list dev_descr grubdev devices disk_id dev descr
-	local default_choice chosen result
+	local default_choice priority chosen result
 
 	result=""
 	default_choice="$1"
@@ -666,15 +884,20 @@ select_bootdev() {
 
 	db_subst grub-installer/choose_bootdev DEVICES_LIST "$dev_list"
 	db_subst grub-installer/choose_bootdev DESCRIPTIONS "$dev_descr"
+	priority=high
 	# set initial selection
 	if [ -n "$default_choice" ] ; then
 		chosen="$(readlink -f "$default_choice")"
 		if [ -n "$chosen" ] ;then
 			db_set grub-installer/choose_bootdev "$chosen"
 		fi
+	elif [ "$(echo "$devices" | wc -l)" = 1 ]; then
+		# only one likely choice
+		db_set grub-installer/choose_bootdev "$dev_list"
+		priority=low
 	fi
 
-	db_input high grub-installer/choose_bootdev || true
+	db_input "$priority" grub-installer/choose_bootdev || true
 	if ! db_go; then
 		log "Returning to menu"
 		db_progress STOP
@@ -713,6 +936,13 @@ while : ; do
 		fi
 		break
 	elif [ "$state" = 1 ]; then
+		if [ "$frdev" ]; then
+			# If /boot is on SATA RAID/multipath, then there's
+			# only one possible answer; we don't support device
+			# selection yet. This is pretty nasty.
+			db_set $q true || true
+			db_fset $q seen true || true
+		fi
 		db_input high $q || true
 		if ! db_go; then
 			# back up to menu
@@ -721,6 +951,15 @@ while : ; do
 		fi
 		db_get $q
 		if [ "$RET" = true ]; then
+			if [ -n "$bootremovable" ]; then
+				bootdev="$bootremovable"
+				if [ "$grub_version" = grub ] && \
+				   [ ! -e "$device_map" ]; then
+					mkdir -p "$(dirname "$device_map")"
+					echo "(hd0) $bootremovable" > "$device_map"
+				fi
+			fi
+
 			# default_bootdev can be guessed incorrectly.
 			# If the user supplied a value for bootdev,
 			# ask them to resolve any conflict.
@@ -784,10 +1023,33 @@ info "Installing grub on '$bootdev'"
 
 update_mtab
 
-if [ -z "$frdisk" ]; then
+mkdir -p $ROOT/boot/grub
+
+write_grub() {
+	info "Installing GRUB to $frdev; grub root is $disc_offered"
+	# TODO: Check for errors during this process!
+	TERM=linux $chroot $ROOT \
+        grub --device-map=/dev/null >/var/log/grub-${frtype}.log 2>&1 </dev/null <<EOF
+device (hd0,$frgrubroot) $disc_offered
+device (hd0) $frdev
+root (hd0,$frgrubroot)
+setup (hd0)
+quit
+EOF
+}
+
+if [ -z "$frdisk" ] || [ "$grub_version" = grub2 ]; then
 
 	# Install grub on each space separated disk in the list
 	bootdevs="$bootdev"
+
+	case $ARCH:$grub_package in
+	    ppc64el/*:grub-ieee1275)
+		# On MD/mdadm devices, each component device may have a PReP partition.
+		bootdevs="$wipe_bootdevs"
+		;;
+	esac
+
 	for bootdev in $bootdevs; do
 		grub_install_params=
 		if ! is_floppy "$bootdev"; then
@@ -797,6 +1059,13 @@ if [ -z "$frdisk" ]; then
 			else
 				info "grub-install does not support --no-floppy"
 			fi
+			if [ -e $ROOT/boot/grub/device.map ] && grep '^(fd' $ROOT/boot/grub/device.map; then
+				recheck="--recheck"
+			fi
+		else
+			if [ -e $ROOT/boot/grub/device.map ] && ! grep '^(fd' $ROOT/boot/grub/device.map; then
+				recheck="--recheck"
+			fi
 		fi
 
 		# Should we force a copy of grub-efi to be installed
@@ -819,7 +1088,7 @@ EOF
 		fi
 
 		if [ "$grub_version" = "grub" ] ; then
-			grub_install_params="$grub_install_params --recheck"
+			grub_install_params="$grub_install_params $recheck"
 		else
 			# install even if it requires blocklists
 			grub_install_params="$grub_install_params --force"
@@ -858,15 +1127,14 @@ EOF
 else
 
 	# Semi-manual grub setup for Serial ATA RAID/multipath
-	info "Boot partition is on a Serial ATA RAID disk or multipath device"
-	info "Installing GRUB to $frdev; grub root is $disc_offered"
+	info "Boot partition is on a Serial ATA RAID disk, multipath, or mdadm device"
 	case $(archdetect) in
 	    i386/*)
 		stagedir=i386-pc ;;
 	    amd64/*)
 		stagedir=x86_64-pc ;;
 	    *)
-		error "Unsupported architecture for SATA RAID/multipath installation"
+		error "Unsupported architecture for SATA RAID/multipath/mdadm installation"
 		exit 1
 		;;
 	esac
@@ -877,47 +1145,20 @@ else
 	mkdir -p $ROOT/boot/grub
 	cp $ROOT/usr/lib/grub/$stagedir/* $ROOT/boot/grub
 
-	# TODO: Check for errors during this process!
-	TERM=linux $chroot $ROOT \
-        grub --device-map=/dev/null >/var/log/grub-${frtype}.log 2>&1 </dev/null <<EOF
-device (hd0,$frgrubroot) $disc_offered
-device (hd0) $frdev
-root (hd0,$frgrubroot)
-setup (hd0)
-quit
-EOF
+	if [ "$frtype" = "mdadm" ]; then
+		for frdisk in $frdisk_list; do
+			frdev=$(echo "$frdisk" | sed "s/[0-9]\+$//")
+			disc_offered=$frdev
+			frbootpart=${frdisk#$frdev}
+			frgrubroot=$(($frbootpart-1))
+			write_grub
+		done
+	else
+		write_grub
+	fi
 
 fi
 
-# Split a device name into a disk device name and a partition number, if
-# possible.
-split_device () {
-	disk=
-	part=
-	case $1 in
-		/dev/[vhs]d[a-z]*)
-			disk="$(echo "$1" | sed 's,\(/dev/[a-z]\+\).*,\1,')"
-			part="$(echo "$1" | sed 's,/dev/[a-z]\+\(.*\),\1,')"
-			;;
-		/dev/*/c*d*)
-			disk="$(echo "$1" | sed 's,\(/dev/.*/c[0-9]\+d[0-9]\+\).*,\1,')"
-			part="$(echo "$1" | sed 's,/dev/.*/c[0-9]\+d[0-9]\+p\([0-9]\+\),\1,')"
-			[ "$part" != "$1" ] || part=
-			;;
-		/dev/mmcblk*)
-			disk="$(echo "$1" | sed 's,\(/dev/mmcblk[0-9]\+\).*,\1,')"
-			part="$(echo "$1" | sed 's,/dev/mmcblk[0-9]\+p\([0-9]\+\),\1,')"
-			[ "$part" != "$1" ] || part=
-			;;
-		/dev/nvme*n*p*)
-			disk="$(echo "$1" | sed 's,\(/dev/nvme[0-9]\+n[0-9]\+\).*,\1,')"
-			part="$(echo "$1" | sed 's,/dev/nvme[0-9]\+n[0-9]\+p\([0-9]\+\),\1,')"
-			[ "$part" != "$1" ] || part=
-			;;
-	esac
-	echo "$disk $part"
-}
-
 make_device_map () {
 	# If you're preseeding (hd0) et al, stop - preseed OS device names
 	# instead.  However, for backward compatibility we ensure that a
@@ -937,6 +1178,12 @@ make_device_map () {
 }
 
 make_active_partition () {
+	if [ "$grub_package" != "grub-pc" ]; then
+	# only do this for grub-pc since on EFI $bootdev is a dummy argument
+	# and looking for a partition table on the wrong or non existing disk
+	# crashes the installer LP:#1303790
+		return
+	fi
 	bootdisk=
 	bootpart=
 	case $bootdev in
@@ -1011,7 +1258,7 @@ fi
 db_progress STEP 1
 db_progress INFO grub-installer/progress/step_config_loader
 
-if [ "$bootfstype" = "zfs" ] || [ "$rootfstype" = "zfs" ] ; then
+if [ "$bootfstype" = "zfs" ] || [ "$rootfstype" = "zfs" ]  && [ -f "/boot/zfs/zpool.cache" ]; then
 	# Required by update-grub on ZFS
 	mkdir -p $ROOT/boot/zfs
 	cp /boot/zfs/zpool.cache $ROOT/boot/zfs/
@@ -1025,7 +1272,7 @@ update_grub
 # For dmraid we can end up with e.g. '(sil_aiahbgbgaaaj1)', or we can end up
 # with '(hd0,0)' when it should be a higher partition
 # TODO: This should really be better supported in update-grub
-if [ "$frdev" ] && \
+if [ "$grub_version" = grub ] && [ "$frdev" ] && \
    ! grep -q "^# groot=(hd0,$frgrubroot)" $ROOT/boot/grub/$menu_file; then
 	info "Fixing up the grub root to '(hd0,$frgrubroot)'"
 	sed -i "/^# groot/s/(.*)/(hd0,$frgrubroot)/" $ROOT/boot/grub/$menu_file
@@ -1104,20 +1351,85 @@ if [ "$grub_version" = "grub" ] ; then
 	fi 
 fi
 
+# Add user parameters to menu.lst; some options are only added to the
+# default entry for a kernel instead of all entries.
 if [ "$grub_version" = grub ]; then
-	# Add user parameters to menu.lst; some options are only added to
-	# the default entry for a kernel instead of all entries. We can't do
-	# this in the same place as the grub2 case because we need the menu
-	# file to exist.
+	if db_get debian-installer/splash && [ "$RET" = false ]; then
+		sed -i 's!^\(# defoptions=.*\) splash\( \|$\)!\1\2!' $ROOT/boot/grub/$menu_file
+	fi
 	if [ "$defopt_params" ]; then
 		sed -i "s!^\(# defoptions=.*\)!\1 $defopt_params!" $ROOT/boot/grub/$menu_file
 	fi
 	if [ "$kopt_params" ]; then
 		sed -i "s!^\(# kopt=.*\)!\1 $kopt_params!" $ROOT/boot/grub/$menu_file
 	fi
-	# In either case, update the Debian kernel entries
-	if [ "$user_params" ]; then
-		update_grub
+else
+	# It's simplest to duplicate grub2's default for
+	# GRUB_CMDLINE_LINUX_DEFAULT here, as well as its handling of
+	# quoting.
+	set_config_item () {
+		local key value
+		key="$1"
+		value="$(echo "$2" | sed -e 's,[$`"\],\\&,g')"
+		if grep -q "^$key=" "$ROOT/etc/default/grub"; then
+			value="$(echo "$value" | sed -e 's,[\@],\\&,g')"
+			sed -i -re "s@^($key=).*@\1\"$value\"@" "$ROOT/etc/default/grub"
+		else
+			echo >> "$ROOT/etc/default/grub"
+			echo "$key=\"$value\"" >> "$ROOT/etc/default/grub"
+		fi
+	}
+
+	if [ -z "$got_splash" ] && \
+	   db_get debian-installer/framebuffer && [ "$RET" = true ] && \
+	   (! db_get debian-installer/splash || [ "$RET" = true ]); then
+		defopt_params="splash${defopt_params:+ $defopt_params}"
+	fi
+	if [ -z "$got_quiet" ] && \
+	   (! db_get debian-installer/quiet || [ "$RET" = true ]); then
+		defopt_params="quiet${defopt_params:+ $defopt_params}"
+	fi
+	set_config_item GRUB_CMDLINE_LINUX_DEFAULT "$defopt_params"
+	set_config_item GRUB_CMDLINE_LINUX "$kopt_params"
+fi
+# In either case, update the Debian kernel entries
+if [ "$user_params" ]; then
+	update_grub
+fi
+
+if db_get grub-installer/timeout
+then
+	# Check whether it's a number
+	if [ "$RET" -eq "$RET" ] 2> /dev/null
+	then
+		timeout="$RET"
+	fi
+fi
+
+if [ -s /tmp/os-probed ]; then
+	# Other operating systems are installed, so show the menu by default
+	# and raise the timeout.
+	if [ "$grub_version" = grub ]; then
+		sed -i 's/^hiddenmenu[[:space:]]*$/#hiddenmenu/;
+			s/^\(timeout[[:space:]][[:space:]]*\).*/\110/' \
+			$ROOT/boot/grub/menu.lst
+	else
+		sed -i 's/^GRUB_HIDDEN_TIMEOUT=.*/#&/;
+			s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=10/' \
+			$ROOT/etc/default/grub
+		update_grub # propagate to grub.cfg
+	fi
+elif [ -n "$timeout" ]; then
+	# Leave a slight delay
+	if [ "$grub_version" = grub ]; then
+		sed -i 's/^hiddenmenu[[:space:]]*$/#hiddenmenu/;
+			s/^\(timeout[[:space:]][[:space:]]*\).*/\1'$timeout'/' \
+			$ROOT/boot/grub/menu.lst
+	else
+		sed -i 's/^GRUB_HIDDEN_TIMEOUT=.*/#&/;
+			s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT='$timeout'/' \
+			$ROOT/etc/default/grub
+		update_grub # propagate to grub.cfg
 	fi
 fi
 
@@ -1158,74 +1470,77 @@ if $chroot $ROOT dpkg --compare-versions
 	no_floppy="--no-floppy"
 fi
 
-for os in $(cat /tmp/os-probed); do
-	IFS="$OLDIFS"
-	title=$(echo "$os" | cut -d: -f2)
-	shortname=$(echo "$os" | cut -d: -f3)
-	type=$(echo "$os" | cut -d: -f4)
-	case "$type" in
-	    chain)
-		partition=$(mapdevfs $(echo "$os" | cut -d: -f1))
-		grubdrive=$(convert "$partition") || true
-		if [ -n "$grubdrive" ]; then
-			case $grub_version in
-			    grub)	grub_write_chain ;;
-			    grub2)	grub2_write_chain ;;
-			esac
-		fi
-		;;
-	    linux)
-		partition=$(echo "$os" | cut -d: -f1)
-		mappedpartition=$(mapdevfs "$partition")
-		IFS="$newline"
-		for entry in $(linux-boot-prober "$partition"); do
-			IFS="$OLDIFS"
-			bootpart=$(echo "$entry" | cut -d: -f2)
-			mappedbootpart=$(mapdevfs "$bootpart") || true
-			if [ -z "$mappedbootpart" ]; then
-				mappedbootpart="$bootpart"
-			fi
-			label=$(echo "$entry" | cut -d : -f3)
-			if [ -z "$label" ]; then
-				label="$title"
-			fi
-			kernel=$(echo "$entry" | cut -d : -f4)
-			initrd=$(echo "$entry" | cut -d : -f5)
-			if echo "$kernel" | grep -q '^/boot/' && \
-			   [ "$mappedbootpart" != "$mappedpartition" ]; then
-				# separate /boot partition
-				kernel=$(echo "$kernel" | sed 's!^/boot!!')
-				initrd=$(echo "$initrd" | sed 's!^/boot!!')
-				grubdrive=$(convert "$mappedbootpart") || true
-			else
-				grubdrive=$(convert "$mappedpartition") || true
+if [ "$grub_version" != grub2 ] || \
+   ! $chroot $ROOT which os-prober >/dev/null 2>&1; then
+	for os in $(cat /tmp/os-probed); do
+		IFS="$OLDIFS"
+		title=$(echo "$os" | cut -d: -f2)
+		shortname=$(echo "$os" | cut -d: -f3)
+		type=$(echo "$os" | cut -d: -f4)
+		case "$type" in
+		    chain)
+			partition=$(mapdevfs $(echo "$os" | cut -d: -f1))
+			grubdrive=$(convert "$partition") || true
+			if [ -n "$grubdrive" ]; then
+				case $grub_version in
+				    grub)	grub_write_chain ;;
+				    grub2)	grub2_write_chain ;;
+				esac
 			fi
-			params="$(echo "$entry" | cut -d : -f6-) $serial"
+			;;
+		    linux)
+			partition=$(echo "$os" | cut -d: -f1)
+			mappedpartition=$(mapdevfs "$partition")
+			IFS="$newline"
+			for entry in $(linux-boot-prober "$partition"); do
+				IFS="$OLDIFS"
+				bootpart=$(echo "$entry" | cut -d: -f2)
+				mappedbootpart=$(mapdevfs "$bootpart") || true
+				if [ -z "$mappedbootpart" ]; then
+					mappedbootpart="$bootpart"
+				fi
+				label=$(echo "$entry" | cut -d : -f3)
+				if [ -z "$label" ]; then
+					label="$title"
+				fi
+				kernel=$(echo "$entry" | cut -d : -f4)
+				initrd=$(echo "$entry" | cut -d : -f5)
+				if echo "$kernel" | grep -q '^/boot/' && \
+				   [ "$mappedbootpart" != "$mappedpartition" ]; then
+					# separate /boot partition
+					kernel=$(echo "$kernel" | sed 's!^/boot!!')
+					initrd=$(echo "$initrd" | sed 's!^/boot!!')
+					grubdrive=$(convert "$mappedbootpart") || true
+				else
+					grubdrive=$(convert "$mappedpartition") || true
+				fi
+				params="$(echo "$entry" | cut -d : -f6-) $serial"
+				case $grub_version in
+				    grub)	grub_write_linux ;;
+				    grub2)	grub2_write_linux ;;
+				esac
+				IFS="$newline"
+			done
+			IFS="$OLDIFS"
+			;;
+		    hurd)
+			partition=$(mapdevfs $(echo "$os" | cut -d: -f1))
+			grubdrive=$(convert "$partition") || true
+			hurddrive=$(hurd_convert "$partition") || true
+			# Use the standard hurd boilerplate to boot it.
 			case $grub_version in
-			    grub)	grub_write_linux ;;
-			    grub2)	grub2_write_linux ;;
+			    grub)	grub_write_hurd ;;
+			    grub2)	grub2_write_hurd ;;
 			esac
-			IFS="$newline"
-		done
-		IFS="$OLDIFS"
-		;;
-	    hurd)
-		partition=$(mapdevfs $(echo "$os" | cut -d: -f1))
-		grubdrive=$(convert "$partition") || true
-		hurddrive=$(hurd_convert "$partition") || true
-		# Use the standard hurd boilerplate to boot it.
-		case $grub_version in
-		    grub)	grub_write_hurd ;;
-		    grub2)	grub2_write_hurd ;;
+			;;
+		    *)
+			info "unhandled: $os"
+			;;
 		esac
-		;;
-	    *)
-		info "unhandled: $os"
-		;;
-	esac
-	IFS="$newline"
-done
-IFS="$OLDIFS"
+		IFS="$newline"
+	done
+	IFS="$OLDIFS"
+fi
 rm -f /tmp/os-probed
 
 if [ -s $tmpfile ] ; then
@@ -1297,7 +1612,10 @@ fi
 db_progress STEP 1
 db_progress STOP
 
+if [ "$(udpkg --print-os)" = "linux" ] && ! umount $ROOT/run; then
+	info "Failed to unmount /run in $ROOT"
+fi
 if ! umount $ROOT/proc; then
 	info "Failed to unmount /proc in $ROOT"
-
 fi
+
diff -pruN 1.128/prep-bootdev.c 1.128ubuntu14/prep-bootdev.c
--- 1.128/prep-bootdev.c	2014-08-22 00:19:16.000000000 +0000
+++ 1.128ubuntu14/prep-bootdev.c	2017-01-16 01:31:58.000000000 +0000
@@ -6,6 +6,8 @@ int
 main(int argc, char *argv[])
 {
 	PedDevice *dev;
+	// use "-l" to list all prep partitions found (not just the first one).
+	int list = (argc == 2 && !strncmp(argv[1], "-l", strlen("-l")));
 
 	ped_exception_fetch_all();
 	ped_device_probe_all();
@@ -27,8 +29,10 @@ main(int argc, char *argv[])
 				path = ped_partition_get_path(part);
 				if (path) {
 					printf("%s\n", path);
-					free(path);
-					return 0;
+					if (!list) {
+						free(path);
+						return 0;
+					}
 				}
 				free(path);
 			}
