[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] grub-installer: Handle disks with multi-letter names

On a system with more than 26 disks, after /dev/sda through /dev/sdz are
used, disks start to get names like /dev/sdaa, /dev/sdab, etc.
Unfortunately grub-installer doesn't cope with these names; the pattern
used to figure out how to compute disc_offered_devfs doesn't match
properly and so trying to install a system with the root FS on eg
/dev/sdaa fails when trying to install grub.

Fix this by extending the pattern used to match /dev/sdX and /dev/vdX to
handle the cases where X is two or three letters (I checked the kernel
source, and the sd and vd cases will only use up to three letters; the
IDE hd case only uses one letter).

cf https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/776633
(I've only tested this with Ubuntu but the upstream grub-installer tree
pretty clearly has the same bug)
 grub-installer |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/grub-installer b/grub-installer
index 95b6532..c8c1e74 100755
--- a/grub-installer
+++ b/grub-installer
@@ -231,7 +231,7 @@ case $prefix in
-    /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-z]|/dev/[sv]d[a-z][a-z]|/dev/[sv]d[a-z][a-z][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]*)

Reply to: