Re: GPT - (last) call for action



Hi, all--

On Jun 10, 2007, at 3:13 PM, Rui Paulo wrote:
:Media sector size is 512
:Warning: BIOS sector numbering starts with sector 1
:Information from DOS bootblock is:
:The data for partition 1 is:
:sysid 238 (0xee),(EFI GPT)
: start 40, size 409600 (200 Meg), flag 0
: beg: cyl 0/ head 0/ sector 41;
: end: cyl 406/ head 6/ sector 14

I think I have it mostly figured out, but the 'start 40' in your
output can't be right. The intel documentation says that the
starting LBA in a PMBR record must be set to 1 by definition
(table 11-7 in the 1.10 documentation).

I don't know why Apple does that.

The offset of 40 sectors sounds like it is pointing to the first partition listed within the GPT?

A typical Intel Mac system using GPT ought to look something like this:

# fdisk /dev/rdisk0
Disk: /dev/rdisk0 geometry: 9964/255/63 [160086528 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 160086520] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

# gpt -r show /dev/rdisk0
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B- xxxxxxxxxxxx
409640 159414704 2 GPT part - 48465300-0000-11AA-AA11- xxxxxxxxxxxx
159824344 262151
160086495 32 Sec GPT table
160086527 1 Sec GPT header

The first, small partition is almost certainly a "boothfs" boot partition, as described in the man page for Apple's version of fdisk:

" In the default template, partition number 1 will be configured as a Dar-
win boot partition spanning from cylinder 0, head 1, sector 1, and
extending for 8 megabytes. Partition number 2 will be configured as a
Darwin HFS partition spanning the rest of the disk. This mode is
designed to initialize an MBR the very first time, or when it has been
corrupted beyond repair.

You can specify other default partition styles with the -a flag. The
available styles are:

boothfs Creates an 8Mb boot partition (type AB hex) and makes the
rest of the disk a Darwin HFS partition (type AF hex).

bootufs Creates an 8Mb boot partition (type AB hex) and makes the
rest of the disk a Darwin UFS partition (type A8 hex).

hfs Makes the entire disk one Darwin UFS partition (type A8 hex).

ufs Makes the entire disk one HFS+ partition (type AF hex).

dos Makes the entire disk one DOS partition (type 0C hex).

raid Makes the entire disk one type AC hex partition.

The -u flag is used to update the MBR code on a given drive. The MBR
code extends from offset 0x000 to the start of the partition table at
offset 0x1BE. It is similar to the -i flag, except the existing parti-
tion table is preserved. This is useful for writing new MBR code onto an
existing drive, and is equivalent to the DOS command ``FDISK / MBR''.
Note that this option will overwrite the NT disk signature, if present.
The -u and -i flags may not be specified together."

Also cf: http://en.wikipedia.org/wiki/GUID_Partition_Table

--
-Chuck

_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [Summary/Solved] Re: [opensuse] Partition Recovery? Is it even missing to begin with or just shi
    ... best zero the disk and reinstall. ... regarding how to look at the code within the various bytes of the boot sector. ... It just created that "bogus" partition entry in the MBR-Partitiontable ...
    (SuSE)
  • Re: bootsect.bak
    ... This first sector on each ... HDD is the MBR - the Master Boot Record. ... there is just enough room to hold the 64-byte Partition Table plus ... extension in the Root of that Active partition. ...
    (microsoft.public.windows.vista.general)
  • Re: bootsect.bak
    ... of Windows, so this answer may not be correct for all versions. ... This first sector on each ... HDD is the MBR - the Master Boot Record. ... there is just enough room to hold the 64-byte Partition Table plus ...
    (microsoft.public.windows.vista.general)
  • RE: Change Tracks Per Sector on system Partition
    ... mirroring system partitions of a cluster to an offsite SAN due to differing ... We cannot physically read the file system boot sector usually at ... If your software mirror a Windows NT/2000/2003 operating system partition ... another disk that is translated as 32spt, ...
    (microsoft.public.windows.server.setup)
  • ATA 4 KiB sector issues.
    ... It looks like transition to ATA 4k drives will be quite painful and we ... read 64 sectors from LBA ... first partition ends up on sector 63 and later ones on cylinder ... results in the correct alignment for Windows Vista and 7. ...
    (Linux-Kernel)