From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JKmuJ-0005EN-Cm for mharc-grub-devel@gnu.org; Thu, 31 Jan 2008 22:49:39 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JKmuH-0005Ds-FL for grub-devel@gnu.org; Thu, 31 Jan 2008 22:49:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JKmuE-0005DT-Vb for grub-devel@gnu.org; Thu, 31 Jan 2008 22:49:36 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JKmuE-0005DP-MW for grub-devel@gnu.org; Thu, 31 Jan 2008 22:49:34 -0500 Received: from c60.cesmail.net ([216.154.195.49]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1JKmuE-00013n-Id for grub-devel@gnu.org; Thu, 31 Jan 2008 22:49:34 -0500 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 31 Jan 2008 22:49:33 -0500 Received: from [192.168.1.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id 157B3619055 for ; Thu, 31 Jan 2008 22:49:33 -0500 (EST) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <20080131215712.GA16531@nubol.oskuro.net> References: <20080131215712.GA16531@nubol.oskuro.net> Content-Type: text/plain Date: Thu, 31 Jan 2008 22:49:32 -0500 Message-Id: <1201837772.18433.34.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-1.fc8) Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: OF device names and util/biosdisk.c X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2008 03:49:38 -0000 On Thu, 2008-01-31 at 22:57 +0100, Jordi Mallach wrote: > jordi@horta:~$ sudo grub-mkdevicemap --device-map=/dev/stdout > (hd) /dev/hda > > However, grub-probe totally doesn't like the lack of drive number: > jordi@horta:~$ sudo grub-probe /boot/grub > grub-probe: error: /boot/grub/device.map:1: Bad device name > > If I edit my device.map and add a drive number, say hd0: > > jordi@horta:~$ sudo grub-probe /boot/grub > hfs Yes, I've seen this problem. > util/biosdisk.c assumes: > > if (drive < 0 || drive >= (int) (sizeof (map) / sizeof (map[0]))) > show_error ("Bad device name"); > > Can this be ifndef GRUB_MACHINE_PCBIOS'd? No. This would lead to using a wrong index in the map table. I think the code should be changed so that the map uses consecutive numbers for the entries in device.map and stores the actual names. The BIOS numbers for the disks should not be needed in cross-platform utilities. If they are, the code should be fixed. -- Regards, Pavel Roskin