[Cialug] Partition table gone

Zachary Kotlarek zach at kotlarek.com
Sat Feb 21 12:18:50 CST 2009


On Feb 21, 2009, at 9:54 AM, Daniel A. Ramaley wrote:

> I have an "interesting" problem. A 2-year old Macbook with a 320 GB
> internal drive has had the first 512 bytes of said drive zeroed. Now  
> it
> won't boot from the hard disk. Booting from an OS X CD, the disk
> utility shows the entire drive as blank and all ready to be  
> partitioned
> and formatted. Which would be great if i wanted to reinstall  
> everything
> from scratch.


On EFI machines, the first LBA, including the traditional primary  
partition table, is not actually used -- it's just there so machines/ 
software that don't know about GPT (GUID Partition Table) don't see  
the disk as empty. So if you really only overwrote the first 512 bytes  
I would not expect you to have and trouble with the disk, at least not  
on a machine that actually reads GPT disks.

That being said, if you think having the first LBA restored would help  
things I can send you a copy of one from an Intel Mac. Probably even  
one with a 320 GB disk.

If you did blow away the partition table from the beginning of the  
disk (maybe you overwrote the first 512 blocks instead of bytes) you  
can restore it from the backup at the end of the disk -- it's written  
to both ends. Note that while the partition entries are stored in the  
same order on both ends, the header is the first and last LBA on the  
disk (sans the fake MBR in LBA0), so you need to copy in two distinct  
segments.

OS X provides a gpt command-line tool, which I suspect is on the  
install disk. You could use it, or any other GPT-aware formatting tool  
that does not try to initialize volumes, to manually restore the  
table. Assuming you know the exact size and location of each partition  
of course.
x-man-page://8/gpt

Basic GPT references:
http://en.wikipedia.org/wiki/GUID_Partition_Table
http://developer.apple.com/technotes/tn2006/tn2166.html

	Zach

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2746 bytes
Desc: not available
Url : http://cialug.org/pipermail/cialug/attachments/20090221/c93f4ce4/smime.bin


More information about the Cialug mailing list