partmap identifies ZFS partitions and also physical partitions of a MD
RAID as loop devices whereas blkid correctly detects a GPT label.
Closes: #1139183
---
 debian/control | 2 +-
 grub-installer | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index 9042e55e..68310e22 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@
 Architecture: amd64 arm64 armhf i386 ia64 hurd-i386 hurd-amd64 kfreebsd-i386 
kfreebsd-amd64 loong64 mipsel powerpc ppc64 ppc64el riscv64 sparc sparc64
 XB-Subarchitecture: ${subarch}
 Provides: bootable-system
-Depends: ${shlibs:Depends}, ${misc:Depends}, kernel-installer, created-fstab, 
di-utils, di-utils-mapdevfs, os-prober, partman-utils
+Depends: ${shlibs:Depends}, ${misc:Depends}, kernel-installer, created-fstab, 
di-utils, di-utils-mapdevfs, os-prober, util-linux-udeb
 XB-Installer-Menu-Item: 7400
 Package-Type: udeb
 Description: Install GRUB on a hard disk
diff --git a/grub-installer b/grub-installer
index 30e7ecfc..d05a5b10 100755
--- a/grub-installer
+++ b/grub-installer
@@ -260,7 +260,7 @@
 disc_offered=$(mapdevfs "$disc_offered_devfs")

 # Identify partition table of the disk containing our boot partition
-bootfslabel=$(partmap $disc_offered || echo unknown)
+bootfslabel=$(blkid -p -o value -s PART_ENTRY_SCHEME $disc_offered || echo 
unknown)

 info "Identified partition label for $bootfs: $bootfslabel"

@@ -693,7 +693,7 @@
            (([ -n "$cdfs" ] && [ "$cdfs" != "iso9660" ]) || \
             [ "$hybrid" = true ])) || \
           ([ "$default_bootdev" != '(hd0)' ] && \
-           ! partmap "$default_bootdev" >/dev/null && \
+           ! blkid -p -o value -s PART_ENTRY_SCHEME "$default_bootdev" 
>/dev/null && \
            ! grub_probe -t fs -d "$default_bootdev" >/dev/null); then
                db_fget grub-installer/bootdev seen
                if [ "$RET" != true ]; then
-- 
2.47.3

Reply via email to