Apple Event: May 7th at 7 am PT

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

How to Fix the Broken Bootcamp Partition after Resizing Mac OS X Partition

Hi guys! Yesterday I was trying to resize my Windows 7 partition and now, I cannot seem to boot it up even though there is "WINDOWS" option in black screen mode.


I'm using Macbook Pro Retina Late 2013 and OS is Yosemite 10.10.4


Here are some useful information:


User uploaded file

User uploaded file

User uploaded file

I'm currently using "Deeper Search" function on Test disk but I don't know if I chose the right MS Data.


I've looked into many similar posts and it seemed like Loner T is very well informed about this issue.


Please help and thank you so much in advance!

MacBook Pro (Retina, 15-inch, Late 2013), OS X Yosemite (10.10.4)

Posted on Aug 4, 2015 12:03 AM

Reply
49 replies

Aug 4, 2015 7:56 AM in response to ReadyEddie

Let us test with the following configuration.

Leave your Testdisk display and start a new Terminal Window. You need to use the following steps. If you see any error messages during the following steps, please stop and post back here with the error message. The following steps have values from your Testdisk output (and you can verify) in Steps 7 and 8. Please notice the'+' sign in step 8 (this is called offset notation). The text in parentheses is for informational purpose to describe theaction being taken. Gdisk has one-character commands except when entering numbers.


Rebuild GPT4 using start/end offsets


  1. Sudo gdisk /dev/rdisk0
  2. P (print the full list of parts)
  3. D (delete)
  4. 4 (part 4)
  5. N (new part)
  6. 4 (part 4)
  7. 690245632 ( - Start offset in sectors or the start point for Bootcamp part)
  8. +286859257 ( - Size offset, as opposed to End offset)
  9. 0700 (Windows part type)
  10. P (print list of all parts just to see what changes will be made)
  11. W (Write the new GPT)
  12. Y (Yes! really write the new GPT)

This will delete and re-write the GPT partition info for /dev/disk0s4.

Rebuild MBR to match the new GPT information thus resetting the Hybrid MBR. Use defaults for other questions (like partition codes). The only values that need modifications are the Boot flags and step 10. Accept all other defaults that Gdisk offers. Please see thesample Q&A as an example. These steps can be repeated if you make a mistake before you get to Step 12, otherwise start from Step 1 for these steps. Step 6 has numbers which are typed with a space between the numbers.

  1. Sudo gdisk /dev/rdisk0
  2. P (Print list of parts)
  3. R (Recover)
  4. O (print current Hybrid MBR)
  5. H (chooses Hybrid)
  6. Partitions numbers to be hybridized: 2 3 4
  7. Y (Good for GRUB question)
  8. N (part 2 boot flag)
  9. N (part 3 boot flag)
  10. Y (part 4 boot flag make NTFS bootable partition)
  11. O (print current Hybrid MBR)
  12. W (Write the new MBR)
  13. Y (Yes! write the new MBR)
  14. Reboot


Here is sample Q&A for this section. Please notice the Press Enter/Return.


Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): Y


Creating entry for GPT partition #2 (MBR partition #2)

Enter an MBR hex code (default AF): Press Enter/Return

Set the bootable flag? (Y/N): N


Creating entry for GPT partition #3 (MBR partition #3)

Enter an MBR hex code (default AB): Press Enter/Return

Set the bootable flag? (Y/N): N


Creating entry for GPT partition #4 (MBR partition #4)

Enter an MBR hex code (default 07): Press Enter/Return

Set the bootable flag? (Y/N): Y


Test 1 - Does Bootcamp Volume show up in Finder?

Test 2 - Can you see files in Bootcamp Volume?

Test 3 - Can you select Bootcamp in System Preferences -> Startup Disk?

Test 4 - If Test 3 is successful, select Bootcamp and Click Restart.

Aug 4, 2015 8:05 AM in response to Loner T

so first part, i got this:


Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Partition table scan:

MBR: hybrid

BSD: not present

APM: not present

GPT: present


Found valid GPT with hybrid MBR; using GPT.


Command (? for help): p

Disk /dev/rdisk0: 977105060 sectors, 465.9 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 2548512F-99A2-43F1-96E0-7DAC31CD1D76

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 977105026

Partitions will be aligned on 8-sector boundaries

Total free space is 93503401 sectors (44.6 GiB)


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

1 40 409639 200.0 MiB EF00 EFI System Partition

2 409640 688974271 328.3 GiB AF00 Customer

3 688974272 690243807 619.9 MiB AB00 Recovery HD

4 783747072 977104895 92.2 GiB 0700 BOOTCAMP


Command (? for help): d

Partition number (1-4): 4


Command (? for help): n

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

First sector (34-977105026, default = 690243808) or {+-}size{KMGTP}: 690245632

Last sector (690245632-977105026, default = 977105026) or {+-}size{KMGTP}: +286859257

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'


Command (? for help): p

Disk /dev/rdisk0: 977105060 sectors, 465.9 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 2548512F-99A2-43F1-96E0-7DAC31CD1D76

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 977105026

Partitions will be aligned on 8-sector boundaries

Total free space is 1968 sectors (984.0 KiB)


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

1 40 409639 200.0 MiB EF00 EFI System Partition

2 409640 688974271 328.3 GiB AF00 Customer

3 688974272 690243807 619.9 MiB AB00 Recovery HD

4 690245632 977104888 136.8 GiB 0700 Microsoft basic data


Command (? for help): w


Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING

PARTITIONS!!

Do you want to proceed? (Y/N):

I want to make sure before i put yes.

Aug 4, 2015 8:25 AM in response to Loner T

Eddies-MacBook-Pro:~ Eddie$ sudo gdisk /dev/rdisk0

GPT fdisk (gdisk) version 1.0.0

Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Partition table scan:

MBR: protective

BSD: not present

APM: not present

GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p

Disk /dev/rdisk0: 977105060 sectors, 465.9 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 2548512F-99A2-43F1-96E0-7DAC31CD1D76

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 977105026

Partitions will be aligned on 8-sector boundaries

Total free space is 1968 sectors (984.0 KiB)

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

1 40 409639 200.0 MiB EF00 EFI System Partition

2 409640 688974271 328.3 GiB AF00 Customer

3 688974272 690243807 619.9 MiB AB00 Recovery HD

4 690245632 977104888 136.8 GiB 0700 Microsoft basic data

Command (? for help): r

Recovery/transformation command (? for help): O

Disk size is 977105060 sectors (465.9 GiB)

MBR disk identifier: 0x00000000

MBR partitions:

Number Boot Start Sector End Sector Status Code

1 1 977105059 primary 0xEE

Recovery/transformation command (? for help): h

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,

just hit the Enter key at the below prompt and your MBR partition table will

be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be

added to the hybrid MBR, in sequence: 2 3 4

Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y

Creating entry for GPT partition #2 (MBR partition #2)

Enter an MBR hex code (default AF):

Set the bootable flag? (Y/N): n

Creating entry for GPT partition #3 (MBR partition #3)

Enter an MBR hex code (default AB):

Set the bootable flag? (Y/N): n

Creating entry for GPT partition #4 (MBR partition #4)

Enter an MBR hex code (default 07):

Set the bootable flag? (Y/N): y

Recovery/transformation command (? for help): O

Disk size is 977105060 sectors (465.9 GiB)

MBR disk identifier: 0x00000000

MBR partitions:

Number Boot Start Sector End Sector Status Code

1 1 409639 primary 0xEE

2 409640 688974271 primary 0xAF

3 688974272 690243807 primary 0xAB

4 * 690245632 977104888 primary 0x07

Recovery/transformation command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING

PARTITIONS!!

Let me know if I entered it right. 🙂

How to Fix the Broken Bootcamp Partition after Resizing Mac OS X Partition

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