Package: grub-pc
Severity: important
Tags: patch

Hello,

on linux systems with udev, grub2 doesn't work at all, error message is
error: cannot find a GRUB drive for /dev/ide/host0/bus0/target0/lun0/...

A partial fix can be found at http://darac.livejournal.com/220952.html

But ... util/biosdisk.c has another issue with detecting udev. The 
routine has_devfs searchs for /dev/.devfsd, which cames from deprecated 
devfs. Enclosed is a synthetic patch, I compiled and ran it fine on my 
machine.

Best regards

Pascal Dupuis


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.23
Locale: LANG=fr_BE, LC_CTYPE=fr_BE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
--- util/biosdisk.oirg	2007-11-09 13:57:13.000000000 +0100
+++ util/biosdisk.c	2007-11-09 14:39:36.000000000 +0100
@@ -89,7 +89,8 @@
     {
       struct stat st;
 
-      dev_devfsd_exists = stat ("/dev/.devfsd", &st) == 0;
+      dev_devfsd_exists = stat ("/dev/.devfsd", &st) == 0
+	|| stat("/dev/.udev", &st) == 0;
     }
 
   return dev_devfsd_exists;
@@ -609,7 +610,7 @@
       if (have_devfs ())
 	{
 	  /* If this is an IDE disk.  */
-	  if (strncmp ("/dev/ide/", p, 9) == 0)
+	  if (strncmp ("ide/", p, 4) == 0)
 	    {
 	      p = strstr (p, "part");
 	      if (p)
@@ -619,7 +620,7 @@
 	    }
 
 	  /* If this is a SCSI disk.  */
-	  if (strncmp ("/dev/scsi/", p, 10) == 0)
+	  if (strncmp ("scsi/", p, 5) == 0)
 	    {
 	      p = strstr (p, "part");
 	      if (p)

Reply via email to