diff -Nru grub-installer-1.128ubuntu6/debian/changelog grub-installer-1.128ubuntu6prepnvmedisk1/debian/changelog --- grub-installer-1.128ubuntu6/debian/changelog 2016-08-11 13:07:08.000000000 -0500 +++ grub-installer-1.128ubuntu6prepnvmedisk1/debian/changelog 2017-01-12 04:51:34.000000000 -0600 @@ -1,3 +1,10 @@ +grub-installer (1.128ubuntu5prepnvmedisk1) UNRELEASED; urgency=medium + + * grub-installer [ppc64el]: update the check to prefer a PReP partition + on the same device to correctly identify NVMe disks. (LP: #) + + -- Mauricio Faria de Oliveira Thu, 12 Jan 2017 08:46:06 -0200 + grub-installer (1.128ubuntu5) xenial; urgency=medium [ Mauricio Faria de Oliveira ] diff -Nru grub-installer-1.128ubuntu6/grub-installer grub-installer-1.128ubuntu6prepnvmedisk1/grub-installer --- grub-installer-1.128ubuntu6/grub-installer 2016-08-11 13:03:14.000000000 -0500 +++ grub-installer-1.128ubuntu6prepnvmedisk1/grub-installer 2017-01-12 04:45:29.000000000 -0600 @@ -491,12 +491,16 @@ # 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.) + # (NVMe needs a different check: 'prep_p' has disk-partition separator, + # but 'disc_offered' has not.) # On MD/mdadm devices, each component device may have a PReP partition. wipe_bootdevs="" wipe_bootdev="$(/usr/lib/grub-installer/prep-bootdev)" for prep_p in $(/usr/lib/grub-installer/prep-bootdev -l); do - if [ "${prep_p%[0-9]*}" = "${disc_offered%[0-9]*}" ]; then + if [ "${prep_p%[0-9]*}" = "${disc_offered%[0-9]*}" ] \ + || ( echo $prep_p | grep -q '/dev/nvme[0-9]\+n[0-9]\+p[0-9]\+' \ + && [ "${prep_p%p[0-9]*}" = "$disc_offered" ] ); then wipe_bootdev=$prep_p break fi