Package: grub-installer
Version: 1.128
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu cosmic ubuntu-patch
Dear Maintainer,
What led up to the situation?
installing ubuntu
What exactly did you do (or not do) that was effective (or
ineffective)?
installing ubuntu on raid1 on NVMe devices
What was the outcome of this action?
grub-installer fails with something like "cannot install to /dev/md0"
What outcome did you expect instead?
Grub-installer is successful
In Ubuntu, the attached patch was applied to achieve the following:
Description: Add support for installation on NVMe with RAID1
Author: Hans van den Bogert
Bug: https://bugs.launchpad.net/ubuntu/+source/grub-installer/+bug/1771845
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: grub-installer-1.128ubuntu8/grub-installer
===
--- grub-installer-1.128ubuntu8.orig/grub-installer
+++ grub-installer-1.128ubuntu8/grub-installer
@@ -785,7 +785,7 @@ case $ARCH:$grub_package in
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/[a-z]\+\).*:\1:')
+ 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])
Thanks for considering the patch.
-- System Information:
Debian Release: buster/sid
APT prefers bionic-updates
APT policy: (500, 'bionic-updates'), (500, 'bionic-security'), (500, 'bionic')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.15.0-20-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru grub-installer-1.128ubuntu8/debian/control
grub-installer-1.128ubuntu9/debian/control
--- grub-installer-1.128ubuntu8/debian/control 2017-01-16 02:31:58.0
+0100
+++ grub-installer-1.128ubuntu9/debian/control 2018-05-17 18:16:35.0
+0200
@@ -1,8 +1,7 @@
Source: grub-installer
Section: debian-installer
Priority: standard
-Maintainer: Ubuntu Installer Team
-XSBC-Original-Maintainer: Debian Install System Team
+Maintainer: Debian Install System Team
Uploaders: Otavio Salvador , Felix Zielcke
, Colin Watson , Christian Perrier
, Steve McIntyre <93...@debian.org>
Build-Depends: debhelper (>= 9), po-debconf (>= 0.5.0), libparted-dev
XS-Debian-Vcs-Browser:
http://anonscm.debian.org/gitweb/?p=d-i/grub-installer.git
diff -Nru grub-installer-1.128ubuntu8/debian/patches/pc-mdadm-nvme.diff
grub-installer-1.128ubuntu9/debian/patches/pc-mdadm-nvme.diff
--- grub-installer-1.128ubuntu8/debian/patches/pc-mdadm-nvme.diff
1970-01-01 01:00:00.0 +0100
+++ grub-installer-1.128ubuntu9/debian/patches/pc-mdadm-nvme.diff
2018-05-17 18:16:18.0 +0200
@@ -0,0 +1,18 @@
+Description: Add support for installation on NVMe with RAID1
+Author: Hans van den Bogert
+Bug: https://bugs.launchpad.net/ubuntu/+source/grub-installer/+bug/1771845
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: grub-installer-1.128ubuntu8/grub-installer
+===
+--- grub-installer-1.128ubuntu8.orig/grub-installer
grub-installer-1.128ubuntu8/grub-installer
+@@ -785,7 +785,7 @@ case $ARCH:$grub_package in
+ 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/[a-z]\+\).*:\1:')
++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])
diff -Nru