|
From: | David Peet |
Subject: | grub-install fix for problem with /dev/sdp and /dev/sdaa |
Date: | Fri, 12 Apr 2013 23:23:29 +0000 |
User-agent: | Microsoft-MacOutlook/14.3.2.130206 |
Hi,
I have a CentOS 6.3 based system and the grub-install script
does not work for devices named /dev/sdp or /dev/sdp<number>,
and they also do not work with devices named /dev/sd<letter><letter>
and /dev/sd<letter><letter><number> like /dev/sdaa
and /dev/sdaa1
which is the next drive after /dev/sdz.
The fix is easy.
Attached is the patch file, and also here is the actual code in case
attachments don't get through.
Thanks
-David Peet
--- grub-install
2013-04-12 15:25:59.843730959 -0700
+++ grub-install.fixed
2013-04-12 15:27:32.272648482 -0700
@@ -102,8 +102,8 @@
linux*)
tmp_disk=`echo "$1" | grep -v '/mapper/control$' |
grep -v '/mapper/[[:alnum:]]\+-[[:alnum:]]\+$' | uniq |
-
sed -e 's%\([shv]d[a-z]\)[0-9]*$%\1%' \
-
-e 's%\(d[0-9]*\)p[0-9]*$%\1%' \
+
sed -e 's%\([shv]d[a-z][a-z]*\)[0-9]*$%\1%' \
+
-e 's%\(d[0-9]*\)p[0-9][0-9]*$%\1%' \
-e 's%\(fd[0-9]*\)$%\1%' \
-e 's%/part[0-9]*$%/disc%' \
-e 's%\(c[0-7]d[0-9]*\).*$%\1%' \
@@ -112,7 +112,7 @@
-e 's%\(/mapper/[[:alpha:]]\+_[[:alpha:]]\+\)[[:digit:]]\+$%\1%'`
tmp_part=`echo "$1" | grep -v '/mapper/control$' |
grep -v '/mapper/[[:alnum:]]\+-[[:alnum:]]\+$' | uniq |
-
sed -e 's%.*/[shv]d[a-z]\([0-9]*\)$%\1%' \
+
sed -e 's%.*/[shv]d[a-z][a-z]*\([0-9]*\)$%\1%' \
-e 's%.*d[0-9]*p%%' \
-e 's%.*/fd[0-9]*$%%' \
-e 's%.*/floppy/[0-9]*$%%' \
|
grub-install.patch
Description: grub-install.patch
[Prev in Thread] | Current Thread | [Next in Thread] |