On 12/01/2011 01:05 PM, Conrad G T Yoder wrote:
> On Dec 1, 2011, at 12:02 PM, Rod Smith wrote:
>> On 11/30/2011 10:42 PM, Conrad G T Yoder wrote:
>>> I have a MacBook Pro, running OS X 10.6 with, of course, a GPT Disk.
>>> The OS X Disk Utility reports no problems with the drive, but when I
>>> try to repartition the drive, Disk Utility does not allow me to
>>> resize partitions. When I try to use the OS X command-line tool, I
>>> get the error, "Error: -9939: The partition cannot be resized."
>>> So I downloaded GPT fdisk and ran gdisk. Upon starting it, I get the
>>> GPT fdisk (gdisk) version 0.8.1
>>> Type device filename, or press <Enter> to exit: /dev/disk0
>>> Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
>>> on the recovery & transformation menu to examine the two tables.
>>> Warning! One or more CRCs don't match. You should repair the disk!
>>> Partition table scan:
>>> MBR: hybrid
>>> BSD: not present
>>> APM: not present
>>> GPT: damaged
>>> Found valid MBR and corrupt GPT. Which do you want to use? (Using the
>>> GPT MAY permit recovery of GPT data.)
>>> 1 - MBR
>>> 2 - GPT
>>> 3 - Create blank GPT
>>> Your answer:
>>> And I'm not sure what the next best step here is. Any suggestions?
>>> Let me know if you would like more info.
>> At this point, you should definitely select option 2 (GPT). After this
>> point, though, you may encounter problems because there's been damage to
>> one of the partition tables. You should probably check both partition
>> tables by using the 'c' and 'e' options on the recovery & transformation
>> menu, as the program suggests, to see which one is correct. (Use 'p'
>> after loading each table to view it, and use your own knowledge of what
>> the partition table SHOULD look like to determine which is correct.)
>> For more on recovering GPT data, see my Web page on the topic:
>> It's also conceivable you'll need to re-create the hybrid MBR; but you
>> shouldn't worry about that just yet. You'll know you'll need to do that
>> if a 'v' operation reports a mismatch between the GPT and MBR data or if
>> you can't boot Windows after you make your repairs to the GPT data.
>> As a side comment, it's possible that this damage was caused by Windows
>> disk encryption tools or a GPT-unaware boot loader. If you've used such
>> tools, you should uninstall them ASAP. I recommend first repairing the
>> disk, then backing up the GPT data (using 'b' on gdisk's main menu),
>> then removing the offending software, then checking the disk again for
>> damage (since removing the software could cause more damage to the disk).
>> If you need more advice, feel free to send another e-mail to the list,
>> or to me directly.
> Thanks much for the info. I did the steps (r, p, c, p, e, p, q) and the current partition table is "correct" - at least more correct than the backup (backup has none of my data partitions and only lists the "EFI System Partition" partition). But of course the current partition map still has problems. Here is the output of the 'v' command:
> Command (? for help): v
> Caution: The CRC for the backup partition table is invalid. This table may
> be corrupt. This program will automatically create a new backup partition
> table when you save your partitions.
> Problem: main header's disk GUID (9A22DB81-C298-4CFD-A064-ADAAE4D5C859) doesn't
> match the backup GPT header's disk GUID (A64224D6-475A-4A35-BC7B-3F0184268F0B)
> You should use the 'b' or 'd' option on the recovery & transformation menu to
> select one or the other header.
> Identified 2 problems!
> Command (? for help):
Chances are you'll be OK by selecting the main header and table and then
using 'w' to save your changes to disk; however, there's a remote chance
that the problem is even worse than it seems. You might want to perform
a backup of your important data from the disk, on the off chance that
using gdisk to re-write good data will cause more problems.