Subject: bug#110 closed by "Ralph Ronnquist (rrq)" <[email-masked]> (done)

From: "Devuan bug Tracking System" <[email-masked]>
Date: Fri, 17 Jan 2020 13:33:03 +0000

This is an automatic notification regarding your bug report
which was filed against the devuan-installer package:

#110: devuan-installer: GRUB installation fails on NMVe drives

It has been closed by "Ralph Ronnquist (rrq)" <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact "Ralph Ronnquist (rrq)" <[email-masked]> by
replying to this email.

-- 
110: bugs.devuan.org//cgi/bugreport.cgi?bug=110
Devuan Bug Tracking System
Contact [email-masked] with problems

Subject: done
From: "Ralph Ronnquist (rrq)" <[email-masked]>
To: [email-masked]
Date: Sat, 18 Jan 2020 00:11:21 +1100

Resolved for beowulf ISOs

Ralph.

Subject: devuan-installer: GRUB installation fails on NMVe drives
From: Olaf Meeuwissen <[email-masked]>
To: Devuan Bug Tracking System <[email-masked]>
Date: Sun, 25 Jun 2017 15:39:13 +0900

Package: devuan-installer
Severity: important

Dear Maintainer,

Installing with the devuan_jessie_1.0.0_amd64_NETINST.iso installer
worked like a charm until it tried to install GRUB2.  That failed with

  main-menu[226]: WARNING **: Configuring 'grub-installer' failed with error code 1
  main-menu[226]: WARNING **: Menu-item 'grub-installer' failed.
  main-menu[226]: INFO: Modifying debconf priority limit from 'high' to 'medium'
  debconf: Setting debconf/priority to medium
  lilo-installer: LILO not usable on EFI PCs withouBIOS compatibility: use grub-efi

Comparing with the Debian 8.8.0 and 9.0.0 installers, I found that the
8.8.0 version displayed the same behaviour.  The installer for 9.0.0
worked fine though.

Comparing the grub-installer.udebs I noticed that NVMe drives are not
supported in the Devuan installer.  The attached patch worked fine for
me (UEFI install, encrypted LVM with separate partitions for /home, /var
and /tmp).  I "applied" the patch by executing a shell and editing the
/usr/bin/grub-installer with nano.

The patch as well as some other fixes are included in version 1.140 of
the grub-installer udeb.

# I'm aware of #23 but as that had zero detail of what the problem was I
# decided to submit this as a separate issue.  As this only affects NVMe
# drives, I figured important was good enough a priority.

Hope this helps,
--
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Software                        https://my.fsf.org/donate
 Join the Free Software Foundation              https://my.fsf.org/join
--- grub-installer.orig	2017-06-25 15:15:37.706091061 +0900
+++ grub-installer	2017-06-25 15:16:47.118435258 +0900
@@ -134,7 +134,7 @@
 # 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/\(ad\|ada\|da\)[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\)[0-9]\+\|/dev/[hs]d[0-9]\+\|/dev/[a-z]\+\).*:\1:'
 }
 
 # Run update-grub in $ROOT
@@ -252,7 +252,7 @@
     /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/ad[0-9]*|/dev/da[0-9]*)
+    /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]*)
 	disc_offered_devfs="$prefix"
 	;;
     *)
@@ -909,6 +909,11 @@
 			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"
 }