Apple Intelligence now features Image Playground, Genmoji, Writing Tools enhancements, seamless support for ChatGPT, and visual intelligence.

Apple Intelligence has also begun language expansion with localized English support for Australia, Canada, Ireland, New Zealand, South Africa, and the U.K. Learn more >

You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

manually repair GUID table

System: Macbook Pro 13 (Late 2013) with Yosemite 10.10.3


Question: How can I manually repair the GUID partition table without destroying windows or OSX


I resized my bootcamp partition by first creating empty space with disk utility. Then booting into windows and using Mini Tool Partiton manager to expand the partition into the free space. This worked in giving my a bootable windows partition and I can also boot into OSX so I dont want to break it now!


However OSX can no longer mount the bootcamp partition and thinks its corrupted.


I have already dug into this somewhat and it seems that the issue is that Mini Tool has edited the MBR but this change has not been detected by OSX and put in the GUID partition table (these are separate entities? correct me if I'm wrong).


So using "sudo gpt show disk0" i get this


gpt show: disk0: Suspicious MBR at sector 0
      start       size  index  contents
          0          1         MBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6        
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640  859375000      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  859784640    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  861054176        800        
  861054976   49645568      4 
  910700544   66404352      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  977104896        131        
  977105027         32         Sec GPT table
  977105059          1         Sec GPT header


Disk util list shows

diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            440.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:       Microsoft Basic Data                         34.0 GB    disk0s4


and Testdisk (which you can get here http://www.cgsecurity.org/Download_and_donate.php/testdisk-7.0.mac_intel.tar.bz2) shows this


TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/disk0 - 500 GB / 465 GiB - 977105060 sectors (RO)
     Partition               Start        End    Size in sectors
>P EFI System                    40     409639     409600 [EFI]
 D Mac HFS                   409640  859784639  859375000
D MS Data                745005064  861054976  116049913
D Mac HFS                859784640  861054175    1269536
D MS Data                861054976  977104888  116049913
D MS Data                910700544  977104895   66404352
D Mac HFS                975835488  977105023    1269536





Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
                P=Primary  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
     Enter: to continue
FAT32, blocksize=512, 209 MB / 200 MiB


So from this i'm pretty sure the issue is that there are two entries for the same bootcamp partition and both are from before I did the resize. It seems the windows partition resized now goes from 861054976 to 977104888 but the GUID partition table says 910700544 to 977104888.


How do I fix this without destroying my setup?

MacBook Pro (Retina, 13-inch, Late 2013), OS X Yosemite (10.10.3)

Posted on May 25, 2015 7:14 AM

Reply
23 replies

Jun 10, 2015 11:46 AM in response to ppitton

The following status seems to be the root cause of your issue.

Journal: Unknown (not mounted)

Your disk get re-numbered. Is it possible to have only this disk and the internal connected for the duration of troubleshooting.


Can you also run


diskutil enableJournal diskN


Has this disk been moved between multiple systems recently?

Jun 10, 2015 12:07 PM in response to Loner T

Hi,


thanks. Yes, went to a friend and asked for help. He ran "Wondershare Data Recovery" which is a readonly analyzing tool.


Then went back home and hoping to solve without that program and 12hrs analyzing and maybe getting half the data.


The diskutil revealed:

PPMacBookPro:~ Peter$ diskutil enableJournal disk2s2

An error occurred journaling the file system: Couldn't mount disk (-69842)

a little more detailed now. In the meantime I rebooted with "Recovery Mode" and diskutil offered to change the size which it doesn't when connected without RecoveryMode. Don't quite understand this difference.


Thx for your help...

Jun 10, 2015 12:23 PM in response to Loner T

Ahh, getting too many abbreviations: LV/LVG? What is "cs verbs"?


Yes, diskutil did allow (and I did) change to "full size partition".


Looks now like:

PPMacBookPro:~ Peter$ diskutil info disk2s2

Device Identifier: disk2s2

Device Node: /dev/disk2s2

Part of Whole: disk2

Device / Media Name: Apple_HFS_Untitled_2


Volume Name: 1TB_Auslagerung


Mounted: No


File System Personality: HFS+

Type (Bundle): hfs

Name (User Visible): Mac OS Extended

Journal: Unknown (not mounted)

Owners: Disabled


Partition Type: Apple_HFS

OS Can Be Installed: No

Media Type: Generic

Protocol: FireWire

SMART Status: Not Supported

Volume UUID: F3A6B8DF-6C56-3B28-9F98-206D36875C7B

Disk / Partition UUID: 026A1615-B3E0-40A8-9704-32B0ABACACF7


Total Size: 999.9 GB (999860912128 Bytes) (exactly 1952853344 512-Byte-Units)

Volume Free Space: 0 B (0 Bytes) (exactly 0 512-Byte-Units)

Device Block Size: 512 Bytes


Read-Only Media: No

Read-Only Volume: Not applicable (not mounted)

Ejectable: Yes


Whole: No

Internal: No


gdisk now reveals:


Command (? for help): i


Partition number (1-2): 1

Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI System)

Partition unique GUID: EEFB69A9-7CB6-493F-B3FF-5AA782F277CF

First sector: 40 (at 20.0 KiB)

Last sector: 409639 (at 200.0 MiB)

Partition size: 409600 sectors (200.0 MiB)

Attribute flags: 0000000000000000

Partition name: 'EFI System Partition'


Command (? for help): i

Partition number (1-2): 2

Partition GUID code: 48465300-0000-11AA-AA11-00306543ECAC (Apple HFS/HFS+)

Partition unique GUID: 026A1615-B3E0-40A8-9704-32B0ABACACF7

First sector: 409640 (at 200.0 MiB)

Last sector: 1953262983 (at 931.4 GiB)

Partition size: 1952853344 sectors (931.2 GiB)

Attribute flags: 0000000000000000

Partition name: 'Apple_HFS_Untitled_2'


And "gpt" shows:


PPMacBookPro:~ admin$ sudo gpt show disk2


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-00A0C93EC93B

409640 1952853344 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

1953262984 262151

1953525135 32 Sec GPT table

1953525167 1 Sec GPT header


Not sure what to do...

Anything else I could offer?


Thx & brgds,


Peter

Jul 28, 2015 8:58 PM in response to fyl23

Can you start a new discussion and post the output of the following Terminal commands from a new terminal session? You can leave this Gdisk terminal session running as is.


diskutil list

diskutil cs list

sudo gpt -vv -r show /dev/disk0

sudo fdisk /dev/disk0

sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null | hexdump -C

manually repair GUID table

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.