Bootcamp issue after resizing partition

Discussion in 'Windows, Linux & Others on the Mac' started by Johnsonhkg, Jul 21, 2015.

  1. Johnsonhkg macrumors newbie

    Jul 21, 2015
    Hi folks,

    I found some threads with cases similar to mine, but not exactly... so I figure to post a new one here.

    My iMac is set up to bootcamp Windows 7. Recently the Windows partition is full so yesterday I reduced the OS X partition (using Disk Utility), and extended the Windows partition (using MiniTool Partition Wizard free). Everything went well...until I boot to OS X.

    Now in Startup Disk, it can't find my bootcamp disk. Bootcamp disk is not shown in Finder as well.

    However, my bootcamp does show in Startup Manager (hitting "option" key while starting the Mac), and I can boot to Windows with no problem.

    And in Windows environment, everything is intact, it shows the reduced OS X partition and extended Windows partition.

    The report from Partition Inspector shows:
    *** Report for internal hard disk ***
    Current GPT partition table:
    #      Start LBA      End LBA  Type
    1             40       409639  EFI System (FAT)
    2         409640    879315887  Mac OS X HFS+
    3      879315888    880585423  Mac OS X Boot
    4     1271212032   1953523711  Basic Data
    Current MBR partition table:
    # A    Start LBA      End LBA  Type
    1              1       409639  ee  EFI Protective
    2         409640    879315887  af  Mac OS X HFS+
    3      879315888    880585423  ab  Mac OS X Boot
    4 *    880586752   1953523711  07  NTFS/HPFS
    MBR contents:
    Boot Code: Unknown, but bootable
    Partition at LBA 40:
    Boot Code: None (Non-system disk message)
    File System: FAT32
    Listed in GPT as partition 1, type EFI System (FAT)
    Partition at LBA 409640:
    Boot Code: None
    File System: HFS Extended (HFS+)
    Listed in GPT as partition 2, type Mac OS X HFS+
    Listed in MBR as partition 2, type af  Mac OS X HFS+
    Partition at LBA 879315888:
    Boot Code: None
    File System: HFS Extended (HFS+)
    Listed in GPT as partition 3, type Mac OS X Boot
    Listed in MBR as partition 3, type ab  Mac OS X Boot
    Partition at LBA 1271212032:
    Boot Code: None
    File System: Unknown
    Listed in GPT as partition 4, type Basic Data
    Partition at LBA 880586752:
    Boot Code: Windows BOOTMGR (Vista)
    File System: NTFS
    Listed in MBR as partition 4, type 07  NTFS/HPFS, active
    The result from sudo gpt -r -vv show /dev/rdisk0:
    pt show: /dev/rdisk0: mediasize=1000204886016; sectorsize=512; blocks=1953525168
    gpt show: /dev/rdisk0: Suspicious MBR at sector 0
    gpt show: /dev/rdisk0: Pri GPT at sector 1
    gpt show: /dev/rdisk0: Sec GPT at sector 1953525167
           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   878906248      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
       879315888     1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
       880585424        1328        
       880586752   390625280      4 
      1271212032   682311680      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
      1953523712        1423        
      1953525135          32         Sec GPT table
      1953525167           1         Sec GPT header
    By going through different articles related to similar problems, I suspect my GPT record is not correct, but I am not sure (since in many other cases, it is the MBR that causes the issue)

    Can anyone help me to look into it and give me some input? I am also unsure how to fix the GPT if it is indeed the cause of the issue.

    Thank you very much.
  2. Altemose macrumors G3


    Mar 26, 2013
    Elkton, Maryland
    According to Apple, the only way to increase or decrease the size of a Boot Camp partition is to remove and recreate the partition. I am not aware of a way to adjust the GPT tables but maybe others can chime in.
  3. maflynn Moderator


    Staff Member

    May 3, 2009
    What I found what worked for me was to backup the windows partition using WinClone, delete the partition, recreate the bootcamp partition and then using Winclone to restore to the larger partition.
  4. DFWHD macrumors regular

    Aug 6, 2011
    I just had the exact same thing happen to me. I've spent over 30 hours over the past few days trying everything folks mention. Final option was WinClone, but it was a waste of money as it could not see the bootcamp partition.
  5. Johnsonhkg thread starter macrumors newbie

    Jul 21, 2015
    Hi folks,

    Take a look of this thread:

    For my case, basically something went wrong with my GPT and it was out of sync with the MBR (MBR correct, GPT not. That's why in Windows environment, everything is good and it shows both my bootcamp and OS X partitions. But in OS X, bootcamp partition is gone)

    By using GPT Fdisk, I am able to re-create a correct GPT which sync with MBR. Now my bootcamp is back, and I've been using the system for a week now and do not find any issue. Everything back to normal.

    A thumbs up to the folks detailing the solution in that thread.

    Hope this helps!
  6. KdParker macrumors 601


    Oct 1, 2010
    Found a solution that worked for me:

    This is a little more detail on how to change the GPT.

    Yes. First, download gdisk (URL in the OP) and run the installer package. Then run gdisk from a terminal window and run the v (verify command). If verify indicates no problems, then you're good to go and can just type "q" to quit. However, if it shows something like this, then you have the problem:

    sudo gdisk /dev/disk0

    Command (? for help): v

    Warning! Mismatched GPT and MBR partition! MBR partition 4, of type 0x07, has no corresponding GPT partition! You may continue, but this condition might cause data loss in the future!

    Identified 1 problems!

    Next, display the MBR partition table and make note of the start and end sectors for your BOOTCAMP partition. This should be partition 4 unless you've added additional partition(s), which is not officially supported by Boot Camp. It should show something like this:

    Command (? for help): r

    Recovery/transformation command (? for help): o

    Disk size is 1953525168 sectors (931.5 GiB)

    MBR disk identifier: 0x7C170CB2

    MBR partitions:

    Number Boot Start Sector End Sector Status Code

    1 1 409639 primary 0xEE

    2 409640 975693095 primary 0xAF

    3 975693096 976962631 primary 0xAB

    4 * 976963584 1952806911 primary 0x07

    Next, display the GPT partition table information. Compare the start and end sectors for partition 4 to the MBR partition 4 start and end sectors. Most likely the start sectors will match, but the end sectors will be different.

    Recovery/transformation command (? for help): m

    Command (? for help): p

    Number Start (sector) End (sector) Size Code Name

    1 40 409639 200.0 MiB EF00 EFI System Partition

    2 409640 975693095 465.1 GiB AF00 Customer

    3 975693096 976962631 619.9 MiB AB00 Recovery HD

    4 976963584 1953523711 465.7 GiB 0700 BOOTCAMP

    Next, delete the GPT partition 4. (Note: this does not delete the actual partition from disk. It only deletes gdisk's in-memory representation of the GPT).

    Command (? for help): d

    Partition number (1-4): 4

    Now, create a new partition 4 using the start and end sector values from the MBR partition 4.

    Command (? for help): n

    Partition number (4-128, default 4): 4

    First sector (34-1953525134, default = 976962632) or {+-}size{KMGTP}: 976963584

    Last sector (976963584-1953525134, default = 1953525134) or {+-}size{KMGTP}: 1952806911

    Current type is 'Apple HFS/HFS+'

    Hex code or GUID (L to show codes, Enter = AF00): 0700

    Changed type of partition to 'Microsoft basic data'

    Now, change the name of the new partition 4 to BOOTCAMP:

    Command (? for help): c

    Partition number (1-4): 4

    Enter name: BOOTCAMP

    Run the verify command. It should report no problems. If it still reports a problem, quit (q command) and start over.

    Command (? for help): v

    If everything checks out, write new partition table to disk and exit.

    Command (? for help): w

    Reboot and test your dual boot setup to verify all is working correctly.

Share This Page