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 8, 2012 3:08 AM in response to Christopher Murphy

Hallo Chris,


I followed the instructions in this topic and was able to select the Bootcamp partition again in the bootmanager but I am experiencing problems during booting in windows. After running the Windows 8 advanced startup manager and choose the refresh option it brings up the following message.


The drive where Windows is installed is locked. Unlock the drive and try again.


Can you help me with this problem. Is it possible I made a mistake somewhere during the process ?


System setup:


MacBookPro mid 2011 OSX 10.8.2 (12C60)

3 partitions Mac OS, Bootcamp (running windows8) and 10 GB Fat32 partition.

Nov 8, 2012 3:44 AM in response to Christopher Murphy

some extra info, I don't know if you need it but this might be helpfull.


sudo gpt -r -vv show disk0 gave the following result:

User uploaded file

sudo fdsk /dev/disk0 gave the following:


User uploaded file


trying to restore or repair the bootcamp partition by prompt gave the following message:


X:\>chkdsk /f

The type of the file system is NTSF.

Cannot lock current drice.

Windows cannot run disk checking on this volume because it is write protected


X:\>

Nov 13, 2012 1:09 PM in response to Christopher Murphy

I'm running Mac OS X Lion and Windows 7 x64. I installed Windows 7 a few weeks ago, and it's working great. All the Bootcamp drivers are working, and I moved all of my Windows data from my old PC to my Bootcamp installation. However, I also want to install Ubuntu.



I need to create a new partition to install Ubuntu, which I'm going to do by shrinking my Mac OS X partition and creating a partition in Disk Utility. But as I saw in this thread, this breaks the hybrid MBR. I know that I can use gdisk to recreate the hybrid MBR, but first I have a few questions.



First, I want my Windows 7, Mac OS X Lion, and Ubuntu partitions to be in the hybrid MBR. My expected GPT disk layout is as follows:


disk0s1: EFI System Partition

disk0s2: Mac OS X Lion

disk0s3: Lion Recovery Partition

disk0s4: Windows 7

disk0s5: Ubuntu


And my expected MBR layout is this:


1. EFI Protective Partition

2. Windows 7

3. Mac OS X Lion

4. Ubuntu


What command will I need to run in gdisk to accomplish this?


Second, where will GRUB2 be installed? I heard somewhere that GRUB2 installs its code in the EFI Protective Partition. If I install GRUB2 on the boot sector of the Ubuntu partition, will its code be installed in the EFI Protective Partition as well?


Third, in case this goes wrong, is there a way to clone my entire hard drive and restore it if something goes wrong?

Nov 13, 2012 10:51 PM in response to Marionumber1

I want my Windows 7, Mac OS X Lion, and Ubuntu partitions to be in the hybrid MBR.


This leaves important areas of the disk unprotected.


What command will I need to run in gdisk to accomplish this?


The layout is not ideal. You should have Windows 7 last so that all you add to the MBR is the Windows partition, since that's the only OS that needs MBR.


Second, where will GRUB2 be installed?


In two pieces, first 440 bytes of LBA 0, which will squish the Microsoft BIOS bootloader currently there. The second is core.img and needs to go into its own partition.


I heard somewhere that GRUB2 installs its code in the EFI Protective Partition.


It will not do this because when booting Windows 7 on Apple hardware via Boot Camp, it uses a BIOS-CSM which means GRUB2 core.img needs to go on a BIOS Boot partition.


If I install GRUB2 on the boot sector of the Ubuntu partition, will its code be installed in the EFI Protective Partition as well?


No. And there is no boot sector for Ubuntu's partition using ext[234] because that boot sector is too small (512 bytes) to accept GRUB2's core.img which is usually around 26KB. On MBR disks that normally goes in the MBR gap, but there isn't such a thing on a Mac because the GPT starts where the MBR gap normally is.

Nov 14, 2012 2:43 PM in response to Scotch_Brawth

Hello Christopher,


Thank you for the great service you are doing for all of us with this problem.


I hope mine is a simple question. I added a Snow Leopard Boot partition to what had previously been a 2 partition physical drive. Of course, I then lost access to my Bootcamp drive. I really don't need that Snow Leopard Boot to be on this same physical drive: I have all four expansion drive bays on my mid 2010 Mac Pro filled with 2 TB drives, so can partition one of those and delete the Snow Leopard Boot partition off of the drive with Boot Camp. That will leave just two (visible) partitions on the original main physical boot drive--a Mountain Lion Boot partition and the Boot Camp partition. Should this work to restore my accessability to Boot Camp? Should all of my data still be intact?


Thanks in advance! (I won't touch anything until I hear back here.)


Tom Carlson

Nov 14, 2012 11:43 PM in response to Marionumber1

There is no particularly safe way to do what you want without rearranging the partitions - by safe I mean, ensuring that only OS X and Windows are exposed in the MBR, and everything else is in the 0xEE protective partition of the MBR. However functionally the hybrid MBR you proposed will work.


You do not need to make a FAT32 partition for GRUB, you make a 1MB "BIOS Boot" partition, gdisk type code for this is EF02. It does not need to be formatted, grub-install will automatically find this partition and write core.img to it.

Nov 18, 2012 11:48 AM in response to Christopher Murphy

So my expected GPT disk layout is this?


disk0s1: EFI System Partition

disk0s2: Mac OS X Lion

disk0s3: Lion Recovery Partition

disk0s4: Windows 7

disk0s5: BIOS Boot Partition

disk0s6: Ubuntu

disk0s7: Swap


And my expected MBR layout is this?


1. EFI Protective Partition

2. Windows 7


My only other question is what will happen if I do put both the Windows and Mac OS X partitions in the MBR?

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.