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 30, 2012 12:19 PM in response to KJFMusic

Sounds like the volume has become corrupted. You have two Windows partitions on the same disk why? Anyway the Boot Camp partition scheme is already non-standard and you make it even less standard by having 5 GPT partitions when the MBR can only hold four. Not related to your current problem, but your Recovery HD partition is exposed as free space in the MBR implying anything in Windows can choose to overwrite those sectors at anytime without notice. But the GPT and MBR otherwise agree that there are two Windows partitions and the first one is flagged as bootable. So the next thing to do is boot from a Windows DVD and see if you can chkdsk /f both of those Windows volumes and make sure the file systems are clean.

Nov 30, 2012 4:59 PM in response to Christopher Murphy

Hi...thank you for you feedback.
I already instal gdisk 0.8.5

User uploaded file

But I also install another gdisk.this type is 0.6.1. Is it different program or just different series?But,I can not install this program...after i login, this windows come up.



User uploaded file

And, you told me to "You need to install gdisk, create a new hybrid MBR, and add partition 5 to the hybrid MBR, and flag it as bootable."


How is it?I already install gdisk 085.How can i know the program I installed is succed to install. because I can not see in Aplication/gdisk.


I use 'terminal' to write command,

sudo gpt -r -vv show disk0

sudo fdisk /dev/disk0

The result is like this.

User uploaded file

From this result, is it possible for me to get my windows OS back?How?
Thank you.


My regards,

(sorry for this long message)

Nov 30, 2012 10:36 PM in response to Christopher Murphy

Sorry..Im not good in English.

Do u mean I simply following this following command?

Write it exactly the same with this following command?

(taken from page 1)


sudo gdisk /dev/disk0

r <enter> go to the recovery & transformation menu

h <enter> create a new hybrid MBR

5 <enter> add partion 5 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

w <enter> write partition table to disk

Dec 1, 2012 1:46 AM in response to ngasuko

sorry...
I reread again and agan...the answer is just push 'enter' tab.
Thanks God, Finally. I got my windows OS back normally

But...still have litle problem.
Why in windows OS I can not see my dATA folder (MAC2, I plan use it as my share folder, so I can read, and edit both from Mac OS and Windows OS)

How is it? Is it because type format of my partition is wrong (I format it with 'MAC OS Extended, journalized')?

User uploaded file
Thankyou.


My Regards,

Dec 1, 2012 11:25 AM in response to ngasuko

If you redo the hybrid MBR and add partitions 4 and 5, accept default partition type, make only 5 bootable, then you will have access to whatever partition 4 is from within Windows again. I assume partition 4 is the data partition.


There is no safe way of having access to the original OS X partition as well. You can add partitions 2 4 5 to have access to both HFS+ partitions and Windows, but MBR cannot hold more than four entries. Which means you can't protect partition 3, there is no room in the MBR for it. So from the Windows perspective partition 3 will look like free space. If that's an OK risk for you to take, then create a hybrid MBR by adding partitions 2 4 5.


But this exemplifies why it is a bad idea to be making additional partitions on your boot drives. There's really no good reason for an additional HFS+ partition, where an additional folder would have done the same job just fine.

Dec 2, 2012 4:30 PM in response to Christopher Murphy

Dear Christopher,


my problem is connected to topic Mountain Lion upgrade from Snow Leopard but it is connected to another partition created in Boot Camp in the past. I would like to ask you for help, I don't know how to solve my problem.


I have Macbook Pro 13 year 2011 (2.66 GHz version). When I started using it I have installed Boot Camp because I often switching to Windows. I have also created not just Boot Camp partition but another partition for data. So in Windows 7 there was C: for system and D: for data. From my previous experiences I have used D: for my all data. Now I have upgraded Snow Leopard to Mountain Lion. Everything was fine, also Boot Camp is working. But I have different problem as many users here in discussions which didn't see Boot Camp or cannot boot Boot Camp Windows after Mountain Lion upgrade. My situation is that "D:" partition disappeared. I really don't know what to do and it is very important for me to have this data back. Please could you help me? Is there chance to have my data on D: partition back? I really don't know why I didn't make backup before but I thought that it will be just upgrade in Mac partition from Snow Leopard to Mointain Lion but I have this problem...


I have had 85 GB for Mac, 100 GB for Boot Camp (C:) and the rest 133 GB for my data partition in Windows - D: before. Now there is situation where Windows Disk Management show 217,77 MB for Boot Camp but Properties in Windows Explorer for C: shows 100 GB like before. But there is no D partition. It seems that data are there but I don't know where. (please see attached pictures)


I have used parameters in terminal regarding your instruction in previous posts.

Please help me how to see again "D:" in Boot Camp Windows. Thank you

Regards, Michal


Michal-MacBook-Pro:~ Michal$ sudo gpt -r -vv show disk0


gpt show: disk0: mediasize=320072933376; sectorsize=512; blocks=625142448

gpt show: disk0: Suspicious MBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 625142447

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 166766768 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

167176408 1269544 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

168445952 456695808 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

625141760 655

625142415 32 Sec GPT table

625142447 1 Sec GPT header


Michal-MacBook-Pro:~ Michal$ 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 - 166766768] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 167176408 - 1269544] Darwin Boot

*4: 07 1023 254 63 - 1023 254 63 [ 168445952 - 456695808] HPFS/QNX/AUX


Michal-MacBook-Pro:~ Michal$ diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *320.1 GB disk0

1: EFI 209.7 MB disk0s1

2: Apple_HFS Mac HD 85.4 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data BOOTCAMP 233.8 GB disk0s4


User uploaded file

User uploaded file

Dec 2, 2012 5:07 PM in response to Myshho

How did you originally create the two Windows partitions? Did you split Boot Camp into two from Windows or in Disk Utility?


If you had done it in Disk Utility, the GPT and MBR would have entries for two Microsoft Basic Data partitions. And the Mountain Lion installer should have simply refused to create a Recovery HD partition.


But I think you made the Windows data partition from Windows, which would only have updated the MBR, not the GPT. And OS X tends to honor the GPT as primary, which is a huge problem in cases where the MBR and GPT don't agree. There's some evidence that when OS X is upgraded, the MBR is being overwritten with the GPT partition layout, but since I haven't reproduced this myself I don't know exactly what does it or under what circumstances. But it's consistent with the problem you're having. The GPT partition scheme appears to have been used to replace the MBR, because what you're reporting to me the GPT and MBR contain the same information. And you have a Darwin Boot partition, which you shouldn't have if you already had four partitions in the GPT and MBR.


So I think you created the Windows data partition in Windows, which updated the MBR but not the GPT. The OS X installer sees the GPT has only three entries, adds one for Darwin Boot, assumes you still have the original sized Boot Camp partition and replaces the MBR.


So now your MBR reports the combination of Windows C: and D: which is why D: doesn't show up. The NTFS file system is still only 100GB, it has not be expanded. Basically it's a 100GB volume inside a 217GB partition.


There might be a way to use the total bytes "Capacity" in the Windows screen shot to figure out how to reconstruct an MBR for exactly the right number of sectors for C: and D: and get back D:. But I don't know how to do that, only guess how to do that. So if the data is really important you'll have to pay for data recovery from a data recovery service like Drive Savers. Maybe you show them this thread and this answer and they can give you a discount because it should be really easy for a data recovery service more familiar with NTFS than I am, to figure out the original MBR.


Basically this is Apple's mistake. They should not allow any partition modification of either MBR or GPT once a hybrid MBR has been created. They should only allow a user to change the partition map with a total reformat/reparition of the disk (start entirely from scratch). They even have a technote that says such disks should not be manipulated at risk of data loss, but sure enough Disk Utility manipulates such disks and routinely I see data loss, like yours, is the result.

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.