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

Aug 3, 2012 5:04 PM in response to Christopher Murphy

Hello Christopher - Thank you very much. I had a similar issue from the end of last year with Lion upgrade. Following the issues, the windows install disk (on trying to fix startup repairs on windows bootcamp booting) changed the whole partition to MBR, including that of the mac side!. However, everything worked as they were, but nothing more in terms of software update or like was possible.


Calls to applecare were of no use, all google search and research and attempts did not help. By chance, I stumbled on this, and your responses to the thread https://discussions.apple.com/thread/4151736?start=15&tstart=0


With absolutely no background in programming or computer tech, I read and re-read your potential solutions and their context you so aptly described. Your contextual approach to solving a problem gave me the courage to attempt something similar on my computer. Mainly due to your providing the context and rationale for your potential fix, I was able to come up with a suitable solution for my needs today without any knowledge of programming or tech. The computer works okay on both sides now. Early times, but I wanted to thank you first before using it. Hopefully it will stay the same.


One clarification re. MBR hex code - In my three attempts, the mac never gave the 07 code as default. It came up with AF or EF as default (and had * to indicate boot capability). Both times, windows bootcamp did not work without start up repairs which meant another MBR whole partition!. Finally, I manually input 07 as code in my third attempt, and things worked.


One outstanding issue - Similar to "taylor136's" issue on the other thread, I have a free space of some 170gb which is not seen after recovery HD. I tried to extend the size on disk utility and click apply. It applies but then reverts to the original way. Tried your commands as described in that thread to resize, again to no avail. Nothing seems to work on that front. Appreciate any other thoughts to reclaim that for windows if possible.


I guess that is the least of my worries at this stage. Really wanted to get this MBR to GUID partition sorted and have windows and mac operating as they should. I achieved them both, so I am happy for the moment. Thank you again, and you have a great weekend.

Aug 3, 2012 10:13 PM in response to Christopher Murphy

Sorry - The main purpose behind my last note was to thank you for your efforts, and also to Scotch for raising the issue.


The only question I have is regards caiming back the free space in the hard drive that is not recognised by mac or windows (as in this attached case below). In that instance, you had made a passing remark in the thread that you can recover that lost space and add it for mac or windows usage per one's wish. My missing space is around 170gb which can come in handy for me.


https://discussions.apple.com/thread/4151736?start=15&tstart=0


So, in an ideal world, I was hoping there is a way to do that. Having said that, where things are now with everything working in my machine, I am more than happy. Hope that clarifies, thanks.

Aug 3, 2012 10:43 PM in response to Christopher Murphy

Thanks, I tried those commands from your earlier post. Unfortunately, the current and maximum are same. I am not in front of my computer now, but the diskutil list command showed 4 discs.


1. EFI

2. Mac

3. Recovery

4. Bootcamp.


It was very similar to what taylor136's looked like and experienced!... I can show the exact details shortly if that will help.

Aug 4, 2012 7:09 AM in response to Christopher Murphy

Hi - here is what this command shows:


gpt show: disk0: mediasize=500107862016; sectorsize=512; blocks=976773168

gpt show: disk0: Suspicious MBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 976773167

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

352625760 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

353895296 329426048

683321344 293451776 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

976773120 15

976773135 32 Sec GPT table

976773167 1 Sec GPT header



Looks like the free space is between disk 3 and 4? Does it provide any clues?

Aug 4, 2012 2:36 PM in response to gmtri

I've never figured out why in some cases the resizevolume command won't use Free Space after the Recovery HD partition, and other times it will.


Your options are:


EASIEST

Use gdisk to delete the Recovery HD entirely. Then resize disk0s2. Then use gdisk to reorder partitions, create a new hybrid MBR inserting partition 3 (Windows) into MBR, marked bootable, and write out the partitions. You lose Recover HD features, including restore OS feature, and FileVault 2.


EASY

Make the Free Space either a separate JHFS+ or NTFS volume.

Use something like gdisk to make a new partition out of the Free Space, using an appropriate partition type code for either NTFS or JHFS+, whichever you've decided to create. This new partition will be indexed as partition 5, even though it will be located between partitions 3 and 4. Gdisk has an option to reindex so that they're in chronological order again, which I would do. Windows will go from partition #4 to partition #5 when you do that. Next, use gdisk to make a new hybrid MBR, and my suggestion is to only add Windows (partition 5), and mark it bootable. After rebooting, you can use Disk Utility to "erase" (i.e. format) it JHFS+/X or you can reboot to Windows and format it as NTFS.


NOT QUITE AS EASY

Absorb free space into the existing Windows volume.

Use Gparted to move/resize the NTFS volume forward so it starts where the free space begins, and absorbs all of this free space. So this means giving it to Windows. Once you do this, you'll no longer have a hybrid MBR, and you'll need to go to gdisk to add partition 4 (Windows) to the MBR, and flag it bootable.


MOST DIFFICULT

Absorb free space into the existing Mac OS volume.

Use gdisk to add a new partition of identical size that of Recovery HD. In your specific case, you'd make the starting sector 682051808, and length 1269536, and the partition type is Apple Boot. That way it's butted up against the Windows volume, and the end of Free Space. This is on YOUR disk, on any one else's disk the numbers would be different (subtract 1269536 from the start sector for the Windows partition). Then use dd to sector copy the Recovery HD partition to this new partition. Then use gdisk to delete the original Recovery HD partition.


Now you'll have continguous free space right after Mac OS's partition and the resize command should work.


Once this is all done you will need to use gdisk again to resort the partition index so they're in order, and create a new hybrid MBR with Windows partition 4 inserted into the MBR, marked as bootable.


I'm vaguely familiar with iPartition. I don't know if it can do all or some of these things. But it's not free. gdisk is free, you can find it at sourceforge. And dd is included in Mac OS X. I have done all four of these numerous times on two Macbook Pros and it's worked flawlessly, but needless to say it's a bit to chew off.


And this is why I don't use Boot Camp myself. I do all of my non-Mac OS stuff in VM's. Native booting (dual, triple, quad) booting fairly a PITA.

Aug 4, 2012 3:02 PM in response to Christopher Murphy

Wow - never realised how difficult bootcamp can be. Unfortunately, I did not know that at the beginning. Could have saved a lot of headache - guess, a learning now!


On the options you describe, I prefer the "easy" option. If I have the space for windows, that's fine as long as all the of the mac features are not lost.


Thinking about this a little further - if I understand this correctly, a root cause of all this issue is that windows don't see the correct partition for booting purpose when anything is done to the partitions on the disk. What if prior to doing any changes to partition, we attempt a change of partition reference in the windows boot file. In other words, in my case,


1. change the partition reference to #5 in the windows boot file (possible ??).

2. Shut down and boot into Mac

3. Use disk utility to add a new partition instead of the free space (which is seen as grey area currently in the partition tab).

4. Format the new partition as mac or windows capable (possible?)

5. Apply changes, and reboot.

6. See if windows boots up, and check all ok??


I get a sense your "easy" option does something similar, obviously in a much better way. I just wanted to put my thoughts out there, and see if it made sense at all, purely for my own understanding and learning. Appreciate your thoughts on this very much.


Now, assuming I am prepared to follow the "easy" option, what do I need to do please? I'd go with NTFS format or something that windows and mac can access (fat32 if possible?) Thanks.

Aug 4, 2012 3:37 PM in response to gmtri

Your particular problem I can't explain. I don't know why you have 170GB of Free Space. It looks like you resized a second time after installing Windows, possibly thinking you were going to give that space to Windows.


The generic problem is that Boot Camp (specifically the CSM-BIOS used to support Windows) effectively depends on the use of two partition schemes, MBR and GPT, called hybrid MBR. You in effect have two partition maps on the disk when using Boot Camp, and this is inherently fragile and prone to confusion because there is no agreed upon standard for creating them and avoiding ambiguity.


I am not going to recommend your number listed recipe because I don't understand it, and haven't tested it even if I can piece it together, and I also have no interest in testing it. In particular I don't trust Disk Utility to add partitions to an existing GPT, other users have already experienced Disk Utility obliterating the hybrid MBR making Windows unbootable, when adding partitions. So you'd have to use gdisk anyway to fix that, so you might as well use gdisk from the outset.


Window's bootloader is fussy, and sometimes it will and sometimes it won't reboot after a partition change. I don't know why. But startup repair always fixed it.


FAT32 is what you need to have read/write access in Mac OS and Windows. Or you need to get (buy, I think) one of the NTFS products from Tuxera or Paragon.


So what you need to do is:

1. install gdisk

2. use gdisk to add a new partition, possibly its defaults will find and use the free space automatically, if not you'll have to give it a start sector, and then accept the default size; and give it a partition type code of 0700.

3. use gdisk to reorder the partition numbers.

4. use gdisk to create a new hybrid mbr, you'll need to add partition 4 (what will be the new FAT32 volume) and partition 5 (existing Windows partition), and mark 5 as bootable.

5. write out the new partitions from gdisk (which also automatically quits gdisk).


6. boot windows or mac os, and make sure you choose the correct partition to erase (format) as FAT32. Be really careful with this so that you don't nuke the Windows partition.


Done.

Aug 4, 2012 4:11 PM in response to Christopher Murphy

Thanks - that makes sense. I have the gdisk already from your earlier advice, so good to go. What commands to use? Having thought about it, I'd like to stick with NTFS as movie media files would be better with that, from what I understand. Also, I may invest in one of the NTFS products later if all goes well too here.


Re. the free space, I have no idea, something to do with the disk utility partition interface from what I can recall.


Thanks again...

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.