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.

Repairing Boot Camp after creating new partition

I'm running OS X 10.8 and Windows 7 x64 Pro.


After properly setting up Boot Camp to dual-boot Windows on my Mac mini, I decided to test whether or not it was true that creating another partition (a data partition for OS X) would interfere with Boot Camp. Wikipedia claims it does interfere but without citing a source, whilst the Boot Camp documentation itself only specifies that the disk must be a single partition _prior_ to setup - there's no mention of whether the disk must be _kept_ that way afterwards.


I opened Disk Utility, reduced the size of my OS X parition from 420GB to 80GB, and created a new partition in the unallocated space. Here's how it looks now:

User uploaded file

When I attempted to proceed with the process, I did receive a warning that doing this (and I quote), "may" cause problems with Boot Camp. Seeing as it was inconclusive, I thought I'd give it a shot - nothing ventured…


Of course, it borked Boot Camp, otherwise I wouldn't be posting here. Whilst OS X boots just fine, the Boot Camp partition now no longer shows up in the Startup Manager, though it does in the Startup Disk prefPane. If I do attempt to boot into Boot Camp, I receive the following message on a black screen:

No bootable device --- insert boot disk and press any key

The advice given to someone who had this same problem was, "fix your damaged Boot Camp volume." But I'm at a loss as to how to do that.


So, anyone know how to proceed now so that I can keep my partitions as is, whilst fully restoring normal Boot Camp functionality?

Mac mini (Mid 2011), Mac OS X (10.7.4)

Posted on Jul 26, 2012 11:28 PM

Reply
1,534 replies

Nov 9, 2015 2:03 PM in response to Christopher Murphy

Hi Christopher,


I tried creating new MBR using gdisk and it screwed up bootcamp. When I try to start mac by pressing option key it only showed Macintosh HD. Than I followed your instructions and got the bootcamp windows drive option back in the startup disk options. Now the windows is complaining that some drives are inaccessible and its failing to start. Could you please suggest some solution on this.


FYI


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

1 40 409639 200.0 MiB EF00 EFI System Partition

2 409640 243413599 115.9 GiB AF05 Macintosh HD

3 243413600 244683135 619.9 MiB AB00 Recovery HD

4 244684800 977104895 349.2 GiB 0700 BOOTCAMP


When I choose windows and boot in its asking to insert windows installation/recovery CD and press enter. I tried inserting USB 3.0/ Super drive with windows 7 CD with No Luck.


I followed

r <enter> go to the recovery & transformation menu

h <enter> create a new hybrid MBR

4 <enter> add partion 4 to the MBR

<enter> accept the default MBR hex code of 07

y <enter> set the bootable flag

n <enter> do not protect more partitions

o < enter> print (display) the MBR


Thanks,

Al

Nov 10, 2015 10:41 AM in response to donfromduvall

Anyone familiar with this readout following the sudo gpt -vv -r show /dev/disk0 command? Doesn't look good.


dons-mbp:~ donharward$ sudo gpt -vv -r show /dev/disk0

Password:

gpt show: /dev/disk0: mediasize=251000193024; sectorsize=512; blocks=490234752

gpt show: /dev/disk0: Suspicious MBR at sector 0

gpt show: /dev/disk0: Pri GPT at sector 1

gpt show: error: bogus map

gpt show: unable to open device '/dev/disk0': Undefined error: 0

dons-mbp:~ donharward$


Bootcamp gone after partitioning

Nov 29, 2015 3:05 PM in response to Christopher Murphy

Hey there.


I've used your tutorial, and some similar and identical ones, while having csrutil disable in the Recovery Mode (because I couldn't write the MBR at the end without disabling csrutil) but to no avail. I've made sure to do it correctly. My BOOTCAMP has id 5.


Some more crucial info:

  • Operating systeem: Windows 10 (just upgraded from 8.1)
  • The error: "Your PC/Device needs to be repaired."
  • When it happened: I wanted to resize my Mac partition to make extra space for my Windows partition, knowing that it might break (because I looked it up beforehand). I resized the partition (making a new 46 GB unnamed partition), rebooted into Windows and it worked! I went to partitions and saw a 46 GB hard drive of which I thought that was the newly created free space, but I wasn't really sure that it was (because I'm used to seeing Unallocated Space as soon as I shrink a hard drive) so I booted back into Mac. Next, I reformatted the unnamed partition to MS-DOS because I thought, without reason, that it would transform it into unallocated space (I know that was stupid). I rebooted and now it says "Your PC/Device needs to be repaired." every time I boot. Booting into SAFE MODE doesn't work either. No options Windows gives me work.
  • What I've tried: All tutorials I could find. The ones where I use that GPT extension in Terminal, and ones that don't need it, but nothing worked. I still see the error.


I really want this to work because I need Windows for school, and quickly. It would really be a drag and take a long time if I have to reinstall Windows and update all over again.

I have lots of experience with Windows (and a bit with partitions and EFI, too) but very little with Mac (this MacBook is my first Mac ever.


I'm running Mac OS X El Capitan. I got this MacBook Pro 2015 13.3 inch yesterday.


Quick question:Would going to an Apple Certified reseller work? Could they possibly fix it in-store? Or would I have to pay or get it sent to Apple repair centers?


I'm willing to try anything to get this working without reinstalling (either Windows or Mac).

Thanks a bunch in advance!


Greeting from Holland,

Jeroen M.


<Personal Information Edited By Host>


EDIT: Currently deleting the unnamed partition and resizing the Mac partition again. Will let you know how things go.

Nov 29, 2015 4:20 PM in response to jeroengast

Can you post a new discussion and include the output of the following Terminal commands?


diskutil list

diskutil cs list

sudo gpt -vv -r show /dev/disk0

sudo fdisk /dev/disk0


The "sudo" commands will prompt for your password, and it will not be echoed back. You may also see a warning about improper use of "sudo" and potential data loss due to "abuse" of the command.

Nov 29, 2015 7:27 PM in response to Loner T

Hey Loner,


Thanks a lot for responding so quickly. Fortunately, I got Windows working again, and it doesn't stop there.


So a lot has happened in about 3.5 hours. I've been working on this the entire time.


TL;DR: Use Winclone to backup your BOOTCAMP into an image, run Boot Camp Assistant, wipe BOOTCAMP partition, rerun Boot Camp Assistant, make new Boot Camp, reinstall Windows until you have installed the Boot Camp drivers again, and then, in Mac, restore the image to the fresh BOOTCAMP partition.

It worked for me.

Now running my original Windows 10 in a 100GB partition instead of 30GB.


Here's the full story:


So my intention was enlarging the Windows partition by shrinking my Mac partition and then assigning that unallocated space to my Windows partition.

When shrinking my partition in Mac and returning to Windows I saw the aforementioned unallocated space turned out to be a Healthy partition in HFS format.

I jumped back to Mac to make it an MS-DOS partition.

Windows gave me the "Your PC/Device needs to be repaired." error.

In Mac I repartitioned my SSD once again so that only BOOTCAMP and Mac were on it. No extra space or partitions.

Windows worked! But I still hadn't solved my problem of gaining some extra space on that partition.

I googled and "reddited" and figured that the best way was to backup the BOOTCAMP's data (through Winclone), revert back to one Mac partition in the Boot Camp Assistant (since that is the only thing that program can do aside from making a partition) and then repartitioning with more storage to begin with, open the Windows installer, format BOOTCAMP into NTFS and then restore the backup from Winclone within Mac.

I grabbed a copy of Winclone and made a backup. I partitioned into all Mac and repartitioned into Mac and 100GB Windows, booted into Windows, reformatted the 100GB BOOTCAMP volume in NTFS, went back to Mac and restored the Winclone backup!


It failed.


If I tried to boot into Windows while holding alt/⌥ at boot and select "Windows" it just booted into Mac instead.

I tried to restore the MBR (which, to my intuition, wasn't really broke at all) with the code from this thread and others. Didn't work as well.


I proceeded to do the whole thing over again, but this time not stop at the setup, but rather install Windows up until I installed the Boot Camp drivers and rebooted. I thought that my Mac would, at that point, be completely "in sync with" or "have knowledge" of the BOOTCAMP partition again, including the boot record. Can't explain it well, but it felt right.


It worked! FINALLY! I installed Windows, made an account, installed the included Boot Camp drivers, rebooted (because Boot Camp told me so) into Windows, rebooted again into Mac, restored the Winclone backup, rebooted into Windows (fingers crossed) and it worked! 100GB partition with my old Windows 10 installation.


I still want to thank you for your support and help.

Hope I could help someone with this information. I'll post this intel, together with the fix, on Apple Forums and reddit, and I'll make a YouTube video, to reach as many people facing problems when trying to resize their BOOTCAMP partition on El Capitan.


Thanks again!

Jeroen M.

Dec 1, 2015 4:55 PM in response to Scotch_Brawth

HI Christopher,

I tried to resize my bootcamp and mac spaces recently

I cannot boot into windows now. Get an error about missing MBR

Do you think you could help me here?


Sanjayas-MacBook-Pro:~ sanjaya83$ sudo fdisk /dev/disk0

Disk: /dev/disk0 geometry: 38913/255/63 [625142448 sectors]

Signature: 0xAA55

Starting Ending

#: id cyl hd sec - cyl hd sec [ start - size]

------------------------------------------------------------------------

1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>

2: AF 1023 254 63 - 1023 254 63 [ 409640 - 349609376] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 350019016 - 1269536] Darwin Boot

4: 0C 1023 254 63 - 1023 254 63 [ 351289344 - 273852416] Win95 FAT32L

Sanjayas-MacBook-Pro:~ sanjaya83$ sudo gdisk /dev/disk0

GPT fdisk (gdisk) version 1.0.1


Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

NOTE: Write test failed with error number 1. It will be impossible to save

changes to this disk's partition table!

You may need to deactivate System Integrity Protection to use this program. See

https://www.quora.com/How-do-I-turn-off-the-rootless-in-OS-X-El-Capitan-10-11

for more information.


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/disk0: 625142448 sectors, 298.1 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 55739070-E42E-4414-947D-F1AAD2EB65D0

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 625142414

Partitions will be aligned on 8-sector boundaries

Total free space is 1453 sectors (726.5 KiB)


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

1 40 409639 200.0 MiB EF00 EFI System Partition

2 409640 350019015 166.7 GiB AF00 Customer

3 350019016 351288551 619.9 MiB AB00 Recovery HD

4 351289344 625141759 130.6 GiB 0700 BOOTCAMP


Command (? for help):

Dec 1, 2015 4:58 PM in response to Christopher Murphy

HI Christopher,

I tried to resize my bootcamp and mac spaces recently

I cannot boot into windows now. Get an error about missing MBR

Do you think you could help me here?


Sanjayas-MacBook-Pro:~ sanjaya83$ sudo fdisk /dev/disk0

Disk: /dev/disk0 geometry: 38913/255/63 [625142448 sectors]

Signature: 0xAA55

Starting Ending

#: id cyl hd sec - cyl hd sec [ start - size]

------------------------------------------------------------------------

1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>

2: AF 1023 254 63 - 1023 254 63 [ 409640 - 349609376] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 350019016 - 1269536] Darwin Boot

4: 0C 1023 254 63 - 1023 254 63 [ 351289344 - 273852416] Win95 FAT32L

Sanjayas-MacBook-Pro:~ sanjaya83$ sudo gdisk /dev/disk0

GPT fdisk (gdisk) version 1.0.1


Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

NOTE: Write test failed with error number 1. It will be impossible to save

changes to this disk's partition table!

You may need to deactivate System Integrity Protection to use this program. See

https://www.quora.com/How-do-I-turn-off-the-rootless-in-OS-X-El-Capitan-10-11

for more information.


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/disk0: 625142448 sectors, 298.1 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 55739070-E42E-4414-947D-F1AAD2EB65D0

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 625142414

Partitions will be aligned on 8-sector boundaries

Total free space is 1453 sectors (726.5 KiB)


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

1 40 409639 200.0 MiB EF00 EFI System Partition

2 409640 350019015 166.7 GiB AF00 Customer

3 350019016 351288551 619.9 MiB AB00 Recovery HD

4 351289344 625141759 130.6 GiB 0700 BOOTCAMP


Command (? for help):

Repairing Boot Camp after creating new partition

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