From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JvaCs-0007Gn-5f for mharc-grub-devel@gnu.org; Mon, 12 May 2008 11:44:54 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JvaCq-0007Ge-Bb for grub-devel@gnu.org; Mon, 12 May 2008 11:44:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JvaCo-0007GO-OY for grub-devel@gnu.org; Mon, 12 May 2008 11:44:51 -0400 Received: from [199.232.76.173] (port=39398 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JvaCo-0007GL-Kf for grub-devel@gnu.org; Mon, 12 May 2008 11:44:50 -0400 Received: from aybabtu.com ([69.60.117.155]:47045) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JvaCo-0000qm-9j for grub-devel@gnu.org; Mon, 12 May 2008 11:44:50 -0400 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JvaCm-0000Z5-RL for grub-devel@gnu.org; Mon, 12 May 2008 17:44:49 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1JvaCA-0000nP-FI for grub-devel@gnu.org; Mon, 12 May 2008 17:44:10 +0200 Date: Mon, 12 May 2008 17:44:10 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080512154409.GD1841@thorin> References: <481590B8.7000405@gmail.com> <20080429134626.GB8328@thorin> <481DC1BC.6020002@gmail.com> <20080506133126.GG5055@thorin> <4826DA0D.9070302@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4826DA0D.9070302@gmail.com> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: Bug#478238: grub-probe: fails to find drive for /dev/sda10 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: Mon, 12 May 2008 15:44:52 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sun, May 11, 2008 at 02:35:41PM +0300, Török Edwin wrote: > > /dev/sda9 is not a valid OpenBSD partition, and in partmap/pc.c:176 the > iteration fails with an error: invalid disk label magic 0x%x. > If I replace that return with a continue, it works. > > The problem is that grub2 stops looking for more partitions as soon as > it encountered the invalid partition, I think a correct fix for this belongs in grub_partition_iterate(). It should only let its hook determine abortability rather than mandate that invalid partitions should cause abortion. Please, can you test the attached patch? -- Robert Millan I know my rights; I want my phone call! What use is a phone call… if you are unable to speak? (as seen on /.) --9jxsPFA5p3P2qPhR Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="partition_iterate.diff" diff -x configure -x config.h.in -x CVS -x '*~' -x '*.mk' -urp ../grub2/kern/partition.c ./kern/partition.c --- ../grub2/kern/partition.c 2007-07-22 01:32:26.000000000 +0200 +++ ./kern/partition.c 2008-05-12 17:41:51.000000000 +0200 @@ -89,7 +89,7 @@ grub_partition_iterate (struct grub_disk const grub_partition_t partition)) { grub_partition_map_t partmap = 0; - int ret = 0; + int ret = 1; auto int part_map_iterate (const grub_partition_map_t p); auto int part_map_iterate_hook (grub_disk_t d, --9jxsPFA5p3P2qPhR--