Bug#479056: grub-probe also fails with cciss
Roland Dreier
rdreier at cisco.com
Tue May 6 20:16:51 UTC 2008
> Next time, please don't add stuff to another bug just because it's similar.
> File a new one instead.
Sorry -- I thought it was basically the same bug (unknown device name
pattern for root filesystem causes grub to destroy device.map).
> Could you use the attached patch on grub-common, and report?
Seems to help a little (although the patch adds trailing whitespace ;), but:
without the patch I get:
$ sudo update-grub
Searching for GRUB installation directory ... found: /boot/grub
grub-probe: error: Cannot find a GRUB drive for /dev/cciss/c0d0p6. Check your device.map.
with the patch I get the same thing the first time around, but then:
$ sudo update-grub
Searching for GRUB installation directory ... found: /boot/grub
grub-probe: error: /boot/grub/device.map:1: Duplicated entry found
and device.map is:
$ cat /boot/grub/device.map
(hd0) /dev/cciss/c0d0
(hd1) /dev/cciss/c0d1
the error is coming from
grub-probe --device-map=/boot/grub/device.map -t drive -d /dev/cciss/c0d0p6
and seems to be caused by the following problem (shown by adding "-v"
flag to the grub-probe command line):
grub-probe: info: Cannot find a GRUB drive for `/dev/cciss/c0d0p6', will regenerate device.map and try again
(The "Duplicated entry" error seems to be an unrelated buglet caused by
grub-probe not discarding the previous map[] contents when regenerating
device.map)
I guess a change to get_os_disk() like the below is needed too?
update-grub seems to work with your patch plus this change.
--- util/biosdisk.c.orig 2008-05-06 13:00:47.000000000 -0700
+++ util/biosdisk.c 2008-05-06 13:02:45.000000000 -0700
@@ -671,6 +671,17 @@
return path;
}
+
+ /* If this is a CCISS disk. */
+ if (strncmp ("cciss/c", p, 7) == 0)
+ {
+ /* /dev/cciss/c[0-9]+d[0-9]+(p[0-9]+)? */
+ p = strchr (p, 'p');
+ if (p)
+ *p = '\0';
+
+ return path;
+ }
/* If this is an IDE disk or a SCSI disk. */
if ((strncmp ("hd", p, 2) == 0
More information about the Pkg-grub-devel
mailing list