1. Join Date
    Jan 2011
    Posts
    4
    Online
    snowkid2themax is offline
    #1

    Syncing GPT with MBR?


    Short Story:

    After resizing partitions on my I've ended up with a GPT table that is out of sync with the MBR. Is there any way to sync the GPT with the MBR and not the other way around (like gptsync)? I've looked into gdisk and the f recovery command, but it seems to suggest deleting partitions
    Warning! This will destroy the currently defined partitions! Proceed?
    (I'd like to keep the data on both partitions in-tact if at all possible)


    Long Story:

    I originally had my hard drive partitioned with Windows 7 partition owning 250GB while OS X owned the rest. However, as I got more into PC gaming I decided to resize the partitions to grant Windows 7 more space. Considering that I didn't own an external hard drive large enough to back up my windows partition, I decided to truncate my OS X partition with GParted and grow my Windows partition within Windows 7 itself (because GParted gave me a warning that moving the partition within Linux would cause boot errors). I was able to expand the Windows 7 partition within windows and everything seemed to be hunky dory (I even added a considerable amount of data to this newly expanded partition). Upon rebooting a few days later, I found that the Windows 7 partition no longer booted. I realize now that modifying the partition within windows was probably a big mistake as windows only read the MBR (and thus the GPT partition table was left unchanged). Now the GPT displays this:
    Code:
     #      Start LBA      End LBA  Type
     1             40       409639  EFI System (FAT)
     2         409640   1049763839  Mac OS X HFS+
     3     1436043264   1953523711  Basic Data
    While the MBR displays this:
    Code:
     # A    Start LBA      End LBA  Type
     1              1       409639  ee  EFI Protective
     2         409640   1049763839  af  Mac OS X HFS+
     3 *   1049763840   1953523711  07  NTFS/HPFS
    The GPT thinks that there is a bunch of unallocated space, when in reality Windows 7 is already using this "unallocated" space. Is there any safe way to sync the GPT table with the MBR table?

  2. Moderator
    Join Date
    May 2012
    Posts
    35,487
    System
    Intel DH67BL/HP ProBook 4530s
    CPU
    Core i7-2600K/Core i3-2310m
    Graphics
    Intel HD 3000
    Geekbench Score
    11641
    Online
    RehabMan is online now
    iPhone MacBook Air
    #2

    Syncing GPT with MBR?


    Quote Originally Posted by snowkid2themax View Post
    Short Story:

    After resizing partitions on my I've ended up with a GPT table that is out of sync with the MBR. Is there any way to sync the GPT with the MBR and not the other way around (like gptsync)? I've looked into gdisk and the f recovery command, but it seems to suggest deleting partitions (I'd like to keep the data on both partitions in-tact if at all possible)


    Long Story:

    I originally had my hard drive partitioned with Windows 7 partition owning 250GB while OS X owned the rest. However, as I got more into PC gaming I decided to resize the partitions to grant Windows 7 more space. Considering that I didn't own an external hard drive large enough to back up my windows partition, I decided to truncate my OS X partition with GParted and grow my Windows partition within Windows 7 itself (because GParted gave me a warning that moving the partition within Linux would cause boot errors). I was able to expand the Windows 7 partition within windows and everything seemed to be hunky dory (I even added a considerable amount of data to this newly expanded partition). Upon rebooting a few days later, I found that the Windows 7 partition no longer booted. I realize now that modifying the partition within windows was probably a big mistake as windows only read the MBR (and thus the GPT partition table was left unchanged). Now the GPT displays this:
    Code:
     #      Start LBA      End LBA  Type
     1             40       409639  EFI System (FAT)
     2         409640   1049763839  Mac OS X HFS+
     3     1436043264   1953523711  Basic Data
    While the MBR displays this:
    Code:
     # A    Start LBA      End LBA  Type
     1              1       409639  ee  EFI Protective
     2         409640   1049763839  af  Mac OS X HFS+
     3 *   1049763840   1953523711  07  NTFS/HPFS
    The GPT thinks that there is a bunch of unallocated space, when in reality Windows 7 is already using this "unallocated" space. Is there any safe way to sync the GPT table with the MBR table?
    You can probably convert the partitions to "pure" GPT with gdisk using your MBR, since the MBR is the correct one at this point. You will have to read about the commands in gdisk to see how to do that. I've never run into the need to do what you now need to do, so I cannot tell you exactly how, but gdisk is very powerful and most certainly can do what you need.

    That said, you should make a backup now. NTFS from Windows, and HFS+ from from OS X. Because you never know what damage you may cause trying to fix this situation.

    With hybrid MBR/GPT, you should always do your edits with a utility that is hybrid aware (OS X Disk Utility) or do the edits on GPT, and use gptsync to re-create MBR from GPT. And almost always when moving things around like that you will end up having to do some repair of Windows \BOOT\BCD file using BCDEDIT to make Windows bootable. Best to plan up-front and not resize.
    Laptop#1: HP ProBook 4540s D8C12UT (1080p), i5-3230m, BIOS F.43: OS X 10.9.4/10.7.5/Win81.
    Laptop#2: Lenovo U430 Touch, i7-4500U: OS X 10.9.4/10.8.5/Win81.
    Desktop: DIY Intel DH67GD, Core i7-2600K, Dell U3011+U2001FP: 10.9.4/10.7.5/Win7/Win81/Ubuntu12.10.
    Projects || Blog

  3. Similar Threads:

Tags for this Thread