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

Feb 11, 2016 3:07 PM in response to Christopher Murphy

Hi Chris,


I have been following your solution. As you said to report back. at this point. I didnt see the star at 07. Can you please help me and let me what I need to do from here to login into windows.


Command (? for help): p

Disk /dev/disk0: 490234752 sectors, 233.8 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 501C1C66-4C7A-480F-BF6A-A1C30B5CD766

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 490234718

Partitions will be aligned on 8-sector boundaries

Total free space is 263013 sectors (128.4 MiB)


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

1 40 409639 200.0 MiB EF00 EFI System Partition

2 409640 329296167 156.8 GiB AF05 Customer

3 329296168 330565703 619.9 MiB AB00 Recovery HD

4 330565704 390365183 28.5 GiB AF00 Untitled

5 390627328 490233855 47.5 GiB 0700 BOOTCAMP

You should have two entries. One type EE, one 07, with the 07 entry marked with * under Boot. If you don't, report back. If you do, write out the update partition information, and hope a power failure doesn't occur for the next few seconds...

Feb 28, 2016 10:49 PM in response to jeroengast

Many thanks to Jeroen for suggesting the WinClone route, worked like a charm!! I was lucky I could still access my bootcamp with Parallels but was getting, "Your PC/Device needs to be repaired" when trying to boot directly to Windows after attempting to increase the Windows partition w/ disk utility (seems to be a common problem, you'd think they'd build in a warning of some kind!)


My Recovery drive is still screwed up, but it'll have to wait another day.

I am noticing a discrepancy in Windows reporting the size of the drive after the restore:

User uploaded file


My original drive size was ~250 GB and I increased it to 350 GB. "This PC" reports the old size of the drive but the disk manager shows the new and old sizes, Jeroen, did you have this issue?

Mar 14, 2016 3:21 PM in response to ImminentTechnologies

I wanted to follow up on my last post for posterity's sake.


I was able to resize Windows' filesystem to match its partition size by using a feature in Winclone. After restoring my backup to the bootcamp partition, I selected my bootcamp partition from the Sources list, then I went to Tools > Expand Windows (NTFS) Filesystem and Winclone expanded the filesystem to match the partition I had set with the Bootcamp Utility.


Another issue I had after incorrectly resizing the Windows partition incorrectly the first time w/ Disk Utility and blowing up Windows was that my recovery partition was unusable and/or not available from the Boot Manager menu (hold option at startup), replaced by an entry called "EFI Boot" that, when selected would try to boot and cause the MBP to crash/shutdown. On top of that, holding Command + R when booting would skip the onboard recovery and go right to internet recovery which half the time would load recovery and half the time would result in the prohibited symbol. Inspecting diskutil revealed that my recovery partition was totally gone:

User uploaded file

I went to get help at the genius bar and via the phone technical support and both didn't help me. I ended up finding a blog that led me to a tool/script, that, in conjunction with the El Capitan installer, will restore the recovery partition:

http://www.hongkiat.com/blog/recovery-partition-os-x/

http://musings.silvertooth.us/2014/07/recovery-partition-creator-3-8/

Mar 27, 2016 8:09 AM in response to Scotch_Brawth

Hi to all.. this whole workout worked for me.. but my mac is on el capitan... so when i gave the write command i got an error... this can be solved by using the command : csrutil disable

to do this you must boot in recovery mode..

for some reason i wasn't able to boot in recovery mode .. so i started from a bootable backup drive...

once booted i did all steps as written in this treat... and now i have 3 partitions OS X/Bootcamp and DATA fully working...


Thank you all..

May 6, 2016 10:47 AM in response to Loner T

I came across this thread while searching for a solution to a problem I'm having, but it seems like the solutions given to others might be specific to them and I want to ensure I don't mess anything up further. If anyone can help walk me through how to fix this, I would really appreciate it.


Basically, I wanted to increase the size of my Windows 10 bootcamp partition so I could try out the free Overwatch open beta going on right now. So I went into Disk Utility and tried to increase the size of the bootcamp partition, but it wouldn't let me. It would let me create a new empty partition, though, so I thought I could work with that. So I made a new 5 GB partition, but once I tried rebooting into Windows, it wouldn't work. I don't get the option to select Windows at boot anymore. It just lists Macintosh HD at the only option. So I went back to Disk Utility and deleted the new partition I had made, but it's still not allowing me to boot into Windows.


Here is the Terminal output for the commands you listed:


$ diskutil list

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *500.3 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_CoreStorage Macintosh HD 388.4 GB disk0s2

3: Apple_Boot Recovery HD 650.1 MB disk0s3

4: Microsoft Basic Data BOOTCAMP 111.0 GB disk0s4

/dev/disk1 (internal, virtual):

#: TYPE NAME SIZE IDENTIFIER

0: Apple_HFS Macintosh HD +388.1 GB disk1

Logical Volume on disk0s2

BADA0F47-13F7-4920-ABB4-2ED458405A0F

Unlocked Encrypted


$ diskutil cs list

CoreStorage logical volume groups (1 found)

|

+-- Logical Volume Group E5C14C1F-1E21-4D66-98AC-5AE7969E32E1

=========================================================

Name: Macintosh HD

Status: Online

Size: 388418744320 B (388.4 GB)

Free Space: 6533120 B (6.5 MB)

|

+-< Physical Volume 7E003CB6-6606-4617-BB5D-2082F61E64D7

| ----------------------------------------------------

| Index: 0

| Disk: disk0s2

| Status: Online

| Size: 388418744320 B (388.4 GB)

|

+-> Logical Volume Family 822B8A7C-F4C8-4EBD-954A-45D43FFC4388

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

Encryption Type: AES-XTS

Encryption Status: Unlocked

Conversion Status: Complete

High Level Queries: Fully Secure

| Passphrase Required

| Accepts New Users

| Has Visible Users

| Has Volume Key

|

+-> Logical Volume BADA0F47-13F7-4920-ABB4-2ED458405A0F

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

Disk: disk1

Status: Online

Size (Total): 388055695360 B (388.1 GB)

Revertible: Yes (unlock and decryption required)

LV Name: Macintosh HD

Volume Name: Macintosh HD

Content Hint: Apple_HFS


$ sudo gpt -vv -r show /dev/disk0

gpt show: /dev/disk0: mediasize=500277790720; sectorsize=512; blocks=977105060

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

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

gpt show: /dev/disk0: Sec GPT at sector 977105059

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 758630360 2 GPT part - 53746F72-6167-11AA-AA11-00306543ECAC

759040000 1269760 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

760309760 216795136 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

977104896 131

977105027 32 Sec GPT table

977105059 1 Sec GPT header


$ sudo fdisk /dev/disk0

Disk: /dev/disk0 geometry: 60821/255/63 [977105060 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: AC 1023 254 63 - 1023 254 63 [ 409640 - 758630360] <Unknown ID>

3: AB 1023 254 63 - 1023 254 63 [ 759040000 - 1269760] Darwin Boot

4: 0C 1023 254 63 - 1023 254 63 [ 760309760 - 216795136] Win95 FAT32L

May 17, 2016 6:20 PM in response to Velvet_Man

I followed Loner T's suggestion and posted a new topic about this, but it quickly got burried in the ever-growing pile of new topics—all on this subject. So I went back through everything and tried to figure it out myself, and I got it sorted out. So, since this thread was the top hit in google when I was trying to find an answer for this problem, I'll put the answer that worked for me here in case it helps someone else.


This is a solution Loner T has offered to several people having this issue in this and other threads:


sudo fdisk -e /dev/disk0

p

setpid 4

07

flag 4

p

write

y


However, that didn't work for me because every time I got to the second to last step, I'd enter the "write" command and hit enter, and it would tell me the operation was not permitted. I found the answer somewhere in my reading, though. You have to boot into recovery (hold down CMD+R while booting), open the Terminal, and type "csrutil disable" to disable System Integrity Protection (sometimes called rootless). Once this is disabled, reboot and enter the commands above and it should work this time. Now reboot while holding down the OPT key, and Windows should be back. It worked for me at least. And don't worry about disabling SIP. It turns itself back on when you reboot again.


Also note that the commands "setpid 4" and "flag 4" worked for me because my Windows partition was the fourth in the list when I entered the "p" command. I've seen it in other threads where the desired partition was listed third, so the commands had to be "setpid 3" and "flag 3."

There, that should help anyone else who stumbles in here from google with this problem.


Cheers!

Jul 8, 2016 9:29 AM in response to Christopher Murphy

I had exactly the same problem and did what you said, but I got this after "w" and "y" commands.


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

OK; writing new GUID partition table (GPT) to /dev/disk0.

Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Unable to open device '/dev/disk0' for writing! Errno is 1! Aborting write!



EDIT

FOund my answer in an earlier post.

Jul 13, 2016 9:47 AM in response to Christopher Murphy

Hi Christopher, I'm on the same problem, I can not start Windows 10 on my MacBook Air.

In short, reduced the Macintosh partition 90GB to 80GB HD and unable to allocate space 10GB free at (BootCamp) Windows, I returned to assign the Macintosh HD 90GB running again

I try to follow your footsteps, but no where to create the MBR and partition to assign

I'm too worried because I have some software licenses on the Windows partition and do not want to lose.

I'll thank me much 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.