Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KMWPt-00012u-5R for mharc-grub-devel@gnu.org; Fri, 25 Jul 2008 19:09:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KMWPr-000112-RE for grub-devel@gnu.org; Fri, 25 Jul 2008 19:09:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KMWPq-0000yV-Dz for grub-devel@gnu.org; Fri, 25 Jul 2008 19:09:39 -0400 Received: from [199.232.76.173] (port=60764 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KMWPq-0000yM-3U for grub-devel@gnu.org; Fri, 25 Jul 2008 19:09:38 -0400 Received: from lethe.ofobscurity.com ([64.85.165.57]:48608) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KMWPp-0003yZ-MZ for grub-devel@gnu.org; Fri, 25 Jul 2008 19:09:37 -0400 Received: from user-160u3tu.cable.mindspring.com ([76.15.15.190] helo=anan7.local) by lethe.ofobscurity.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1KMWPg-0000yp-Hr for grub-devel@gnu.org; Fri, 25 Jul 2008 19:09:28 -0400 From: Chris Knadle Organization: CoreDump.us To: The development of GRUB 2 Date: Fri, 25 Jul 2008 19:09:34 -0400 User-Agent: KMail/1.9.9 References: <200804131734.50447.Chris.Knadle@coredump.us> <200807231647.42719.Chris.Knadle@coredump.us> <20080725202718.GA18149@thorin> In-Reply-To: <20080725202718.GA18149@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807251909.34724.Chris.Knadle@coredump.us> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: grub-probe fails to find PC partition due to Apple disklabel 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, 25 Jul 2008 23:09:40 -0000 On Friday 25 July 2008, Robert Millan wrote: > On Wed, Jul 23, 2008 at 04:47:42PM -0400, Chris Knadle wrote: > > On Wednesday 23 July 2008, Chris Knadle wrote: > > > Right now part_map_iterate() detects an Apple partition based on Sector > > > 0 [which is unavoidable, since Sector 0 is not going to have an HFS+ > > > magic number] > > > > Sorry, I meant *partition 0*, not Sector 0... > > Assuming the problem is the missing check for the other magic number in > sector 0 (of the whole disk), I just sent a patch in: > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=475718#70 > > which supposedly fixes this problem. Please test! Just tested -- nope, grub-probe still can't find the device. Have a look at the following snippit of a 'grub-probe -vv /dev/hde3' output to see the interesting behavior this generates -- note that the first two bytes on this disk /dev/hde (i.e. the first two bytes on the disk, which should be part of the JUMP VECTOR to Grub) are 0xFC31. So this: kern/partition.c:106: Detecting apple_partition_map... kern/disk.c:368: Reading `hd0'... partmap/apple.c:129: bad magic (found 0xfc31; wanted 0x4552 kern/partition.c:112: apple_partition_map detection failed. means that this patch is trying to match the HFS magic number on the first sector of the drive, when that doesn't have a filesystem magic number at all. :-( Do you see the problem -- or am I wrong about this? If I'm correct (and I really hope I'm not), it means that there's no good way of discarding Apple partition detection based solely on Sector 0 of the drive -- which was already suspected anyway, since Apple and PC partition maps can coexist. I'm going to attach the full 'grub-probe' output and a dd of the first 1024 bytes of /dev/hde to the Debian bug report. -- Chris -- Chris Knadle Chris.Knadle@coredump.us