bug-grub
[Top][All Lists]
Advanced

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

address@hidden: Bug#290098: grub: doesn't work with cciss and others]


From: Jason Thomas
Subject: address@hidden: Bug#290098: grub: doesn't work with cciss and others]
Date: Thu, 13 Jan 2005 09:27:21 +1100
User-agent: Mutt/1.5.6+20040907i

----- Forwarded message from Guido Guenther <address@hidden> -----

> Date: Wed, 12 Jan 2005 18:27:33 +0100
> From: Guido Guenther <address@hidden>
> To: Debian Bug Tracking System <address@hidden>
> Subject: Bug#290098: grub: doesn't work with cciss and others
> 
> Package: grub
> Severity: important
> Version: 0.95+cvs20040624-12
> 
> Hi,
> many devices (cciss, ida) name partitions like
> <disk>p<part_number> instead of <disk><part_number> (note the extra p).
> Grub then fails when calling e.g. 'setup (hd0)'.  This patch fixes the
> problem for cciss, ataraid, ida and others. 
> Taken from fedora core 3.
> Cheers,
>  -- Guido
> 
> -- System Information:
> Debian Release: 3.1
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: powerpc (ppc)
> Kernel: Linux 2.6.10-agx0
> Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

> --- tmp/grub-0.95+cvs20040624/lib/device.c    2004-05-23 18:45:35.000000000 
> +0200
> +++ grub-0.95+cvs20040624/lib/device.c        2005-01-12 18:19:14.000000000 
> +0100
> @@ -858,8 +938,14 @@
>        if (strcmp (dev + strlen(dev) - 5, "/disc") == 0)
>       strcpy (dev + strlen(dev) - 5, "/part");
>      }
> -  sprintf (dev + strlen(dev), "%d", ((partition >> 16) & 0xFF) + 1);
> -  
> +  sprintf (dev + strlen(dev), "%s%d", 
> +   /* Compaq smart and others */
> +   (strncmp(dev, "/dev/ida/", 9) == 0 ||
> +   strncmp(dev, "/dev/ataraid/", 13) == 0 ||
> +   strncmp(dev, "/dev/cciss/", 11) == 0 ||
> +   strncmp(dev, "/dev/rd/", 8) == 0) ? "p" : "",
> +   ((partition >> 16) & 0xFF) + 1);
> +
>    /* Open the partition.  */
>    fd = open (dev, O_RDWR);
>    if (fd < 0)


----- End forwarded message -----

-- 
Jason Thomas
Linux System Administrator
http://www.sage-au.org.au/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]