grub-devel
[Top][All Lists]
Advanced

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

Re: grub-probe fails to find PC partition due to Apple disklabel


From: Chris Knadle
Subject: Re: grub-probe fails to find PC partition due to Apple disklabel
Date: Tue, 15 Apr 2008 10:06:13 -0400
User-agent: KMail/1.9.9

On Monday 14 April 2008, Pavel Roskin wrote:
> On Mon, 2008-04-14 at 10:21 -0400, Chris Knadle wrote:
> >    Instead of probing for partmaps in a particular order, it seems that
> > solving for this might best be done by probing for all of the possible
> > partmaps for the architecture and trying to figure out which one best
> > fits. grub2's grub-probe is clearly already doing this; _however_,
> > somehow the PC partmap probe is subtly different depending on whether
> > partmap/apple.c is included in the search.
>
> Apple and PC partition maps can coexist.  The place occupied by the PC
> partition and the PC magic is not used by the Apple partition.
>
> The way to differentiate them would be to check at the first sector.  If
> it starts with 0x45 0x52, then it's an Apple partition.  A PC partition
> would have an executable entry there.

   I can verify that this disk does not have 0x45 0x52 in the first sector.  
To check I used 'hexedit /dev/hde' as root, and I've copy-pasted the relevant 
text of the first 2120 bytes.

   Rather than attach it (some mailing lists don't appreciate attachments -- 
let me know if you'd prefer an attachment), I've placed the above file at the 
link below if you want to have a look.  Regardless of the fact that there are 
bits of text like "Apple", "Apple_partition_map", "Apple_Free", "Apple_HFS", 
etc, I assure you that this disk is not in an Apple and has been in my 
Desktop IBM PC for six months as the main boot disk.

   I regularly build and install new Linux kernels on this disk, and grub + 
update-grub handled all of those very well up until this point, which in 
itself is amazing given that the first couple of sectors seem to be full of 
false information as far as reading it as a human being goes.  ;-)

      ftp://ftp.coredump.us/grub-debug/Linux-apple-disk_2120bytes.txt

   -- Chris

-- 

Chris Knadle
address@hidden




reply via email to

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