--- Begin Message ---
Package: debian-installer
Version: 20150422
Severity: critical
Tags: d-i patch
Justification: breaks the whole system
Dear Maintainer,
I used the Jessie DVD installer on a system with an NVMe SSD add-in-card (PCIe) that I wanted to make bootable, but there were two problems that halted the process:
1. In the install-the-base-system step, the initial ram disk creation step failed because it couldn't translate the nvme device name (nvme0n1p3) to the base name (nvme0n1).
2. In the boot loader installation step, the boot loader installation script again couldn't translate nvme0n1p3 to nvme0n1.
I reported #1, with a patch, at <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=785147>.
When I modified grub-installer to work with my NVMe disk, I missed the fact that it wasn't installed on permanent media, so I lost those changes. The attached patch is my attempt at reconstructing what worked for me, so *please bear in mind that I have not tested it*. One additional note: since I use the Linux kernel, my patch does not change the "hurd_convert" function, and looking at it, I'm guessing it should be modified too.
Steve Rowe
-- System Information:
Debian Release: 8.0
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.0.2 (SMP w/16 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
--- grub-installer-1.117/grub-installer 2015-01-12 23:01:14.000000000 -0500
+++ grub-installer-1.117/grub-installer.fixed 2015-05-12 15:13:49.002358498 -0400
@@ -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/nvme[0-9]n[0-9]\|/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:'
}
# 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/nvme[0-9]n[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/ad[0-9]*|/dev/da[0-9]*)
disc_offered_devfs="$prefix"
;;
*)
@@ -895,6 +895,10 @@
disk=
part=
case $1 in
+ /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]\(.*\),\1,')"
+ ;;
/dev/[vhs]d[a-z]*)
disk="$(echo "$1" | sed 's,\(/dev/[a-z]\+\).*,\1,')"
part="$(echo "$1" | sed 's,/dev/[a-z]\+\(.*\),\1,')"
--- End Message ---
--- Begin Message ---
Source: grub-installer
Source-Version: 1.122
We believe that the bug you reported is fixed in the latest version of
grub-installer, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 785149@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Christian Perrier <bubulle@debian.org> (supplier of updated grub-installer package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Wed, 13 May 2015 06:57:05 +0200
Source: grub-installer
Binary: grub-installer
Architecture: source i386
Version: 1.122
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Christian Perrier <bubulle@debian.org>
Description:
grub-installer - Install GRUB on a hard disk (udeb)
Closes: 785149
Changes:
grub-installer (1.122) unstable; urgency=medium
.
[ Cyril Brulebois ]
* Add support for /dev/nvme* devices (NVMe SSD Add-in-Card devices),
by mimicking what is already done in the /dev/mmcblk* case. Thanks to
Steve Rowe for the report and the initial patch! (Closes: #785149)
Checksums-Sha1:
da73c8bc40cecfaf792ad416c4d334b18af787cd 1938 grub-installer_1.122.dsc
42fcbb3e50405df220502664b3e6cccdbd0e8a8f 209760 grub-installer_1.122.tar.xz
c81a353d4cffd6af1cb5b1a0c8e855ec526fad4a 284580 grub-installer_1.122_i386.udeb
Checksums-Sha256:
7cb75584978437e2847f97c9a1acf0010f905723b570de7a5f531b4218814e83 1938 grub-installer_1.122.dsc
6c3332f12d58d45f81d4042a36c932147871b73c49c8248d97500b03f34b5693 209760 grub-installer_1.122.tar.xz
ca6f37cb5680022e3df2a3b841a14030556427f2df63d60cf3a186af793162ee 284580 grub-installer_1.122_i386.udeb
Files:
20b82a836bee20aa312d85433cb3ae55 1938 debian-installer standard grub-installer_1.122.dsc
eb3b5a70fa80fefffc9064345b2ec074 209760 debian-installer standard grub-installer_1.122.tar.xz
edf99864d0730f58ed2a625c2cfdb915 284580 debian-installer standard grub-installer_1.122_i386.udeb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJVUtpDAAoJEIcvcCxNbiWoT1UP/Amh1hOlR2We58atQC91KVMP
/i6ypR2VSG9Vk5HGBMZaPl0JpBkd4IPtsZl7BC4bnYpUdXdlbl3aS6HKicI94dXQ
3bUwHDmPgkZpAlurG4dHmayOe8SY5VYdE7TpSvXTxHkzwkCxAuMvo2AqOtaakxhO
f+Lcj4+TxA36VT0aJ7n1HUB/gfcVRRUU7ZB+9XSgVwGclY5KkEOewn6knvetXIL1
DOn+8YTDNgOBxgdwXOr8l4romqYOpkgvbbAUn4a+fZXWLdcWNvs0oU46sRp1wDh+
fUAIMsep7fNKUPqnDpbwsnK5yI4cQrsw0kCmQOUVGD4t8a1BlfnJq9lvhWfzSjyv
3L1pXraJpIrhLj8GBPmJTgGEYSJkQ7gJmVKA8n1eAK4a43eDU05YJUs9dPnL5WkG
1BM9xQvZLSRtOuFsXEZKvqymqMJu1eCWBqZKhg1AXYNM+zmT8kwkB91vzOHRVUu5
EeSHuW8sSlDxSu+TbrfwNRrpCoi/yaTjqRjNN2r3VY1xc+W386rOXLSn/wmlf1WX
STMipb744UBKBvDi6DRPedNNPzD2c7Z04wVrUnOPXe+SeVGmg7jdEgOcuQHRQFru
TU9J8WhY4J/5voUdd6De4P/i2tZn2/fbdaedkg8daLVTebpM3IUW28awzffhWk8k
rw86p94SlGi7UnKOHkKB
=+ASx
-----END PGP SIGNATURE-----
--- End Message ---