Control: found -1 grub-installer/1.122
On 05/27/2015 04:30 PM, Steve Rowe wrote:
I just realized that an out-of-band email thread I had with Cyril didn’t make
it to this issue - here’s the final email to me from Cyril:
-----
Steve Rowe <sar...@gmail.com> (2015-05-12):
On May 12, 2015, at 4:49 PM, Cyril Brulebois <k...@debian.org> wrote:
--- 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:'
I moved the addition to the end, which makes visual inspection slightly
easier.
There’s a problem with this: the preceding pattern "/dev/[a-z]\+" will match
"/dev/nvme.*”, so the nvme pattern will never be reached.
Good catch, pushed this extra commit accordingly:
https://anonscm.debian.org/cgit/d-i/grub-installer.git/commit/?id=22a8aef
# 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]*)
Same story here.
Looks like there is no general pattern that will match “/dev/nvme.*”
above, so putting it at the end isn’t a problem.
Adjusted for consistency.
I installed Debian testing on a PC with NVMe Samsung 950 Pro as boot
disk.
I had to manually modify grub-installer (with nano within the d-i
console), because it was failing.
The problem seems to be the following.
In the commit
https://anonscm.debian.org/cgit/d-i/grub-installer.git/commit/?id=22a8aef
there are two changes: the first one is for a sed command line and is
OK. The second one is for a case command. In the case command the syntax
is file globbing, not regular expression.
So, the * is interpreted differently.
In my opinion, in the case command
/dev/nvme[0-9][0-9]*n[0-9][0-9]*
should be replaced by
/dev/nvme[0-9]*n[0-9]*
This will result in actual consistency with the sed command.
N.B.: I personally tested the grub-installer script modified as
previously proposed:
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:'
and
/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]*)
It works.
Please fix the case command in grub-installer, so that next time someone
installs Debian testing on an NVMe disk it will work without modifications.
Thanks!