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

Jul 4, 2014 12:00 PM in response to Bx029297

If you have more than one disk, the second disk can be split to accommodate Bootcamp. This is my Mac mini with an SSD/HDD and a DIY Fusion Drive.


diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *256.1 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_CoreStorage 255.7 GB disk0s2

3: Apple_Boot Boot OS X 134.2 MB disk0s3

/dev/disk1

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *1.0 TB disk1

1: EFI EFI 209.7 MB disk1s1

2: Apple_CoreStorage 934.5 GB disk1s2

3: Apple_Boot Boot OS X 650.0 MB disk1s3

4: Microsoft Basic Data BOOTCAMP 64.9 GB disk1s4

/dev/disk2

#: TYPE NAME SIZE IDENTIFIER

0: Apple_HFS Fusion HD *1.2 TB disk2


With a single disk, it will not work, because of the MBR which allows only 4 partitions (the MBR contains EFI, OSX, Recovery partitions already when just OSX is running)


From Boot Camp 5.1: Frequently asked questions

Which application should I use to create a Windows partition and to install Windows?

Use Boot Camp Assistant (located in the Utilities folder) to create a Windows partition and to install Microsoft Windows. Boot Camp Assistant works with an Intel-based Mac that has a single hard disk partition or Fusion Drive. Boot Camp Assistant creates an additional partition for the Microsoft Windows operating system or allows you to install Microsoft Windows on another drive if you have more than one internal drive.

Jul 4, 2014 12:18 PM in response to Bx029297

1. Yes you still need partitions no matter what boot manager or boot loader you use because each OS has its own file system, and file systems need partitions.

2. Apple's current Windows support is the complicating factor in all of this. All Linux distros can be installed to GPT partitioned disks, just like OS X uses. No need for an MBR (it's humorously called a Protective MBR which is an MBR with a single entry to "protect" the GPT and all disk contents from being accidentally modified by tools that only understand the legacy MBR partition scheme). However, Windows on Macs right now use CSM-BIOS mode in Mac firmware that presents BIOS to Windows rather than EFI. Windows thinks it's on a BIOS computer, and therefore mandates the use of MBR for boot disks, rather than GPT. So that's why we have this hybrid MBR+GPT approach on Mac with Windows on it. You inherit the limitations of MBR, which is four primary partitions.

3. While not supported, and will almost certainly cause problems down the road if you ask Disk Utility to do a whole disk repair, or do a major OS upgrade that uses the Apple installer (e.g. from Mountain Lion to Mavericks); you can do exactly what you suggest by installing Windows last. So the GPT partitions in order are: EFI System, OS X, OS X Recovery, Linux boot, Linux root or LVM, Linux swap (if you're not using LVM), Windows. So that's 6 or 7 partitions, with Windows in the last partition. Not obvious is you can create a hybrid MBR using gdisk whereby the #1 MBR entry, type 0xEE which means it's a protective entry, encompassing the GPT, OS X, and Linux partitions. So MBR entry 1 is GPT entries 1 through 6 (plus the GPT itself). Windows partition tools and installer will see those 6 partitions as just one partition and it won't be inclined to modify either the partition entry or their contents. MBR entry 2 would be GPT entry 7, i.e. the one for Windows.


So even though it's not supported, it's safe in that nothing is left exposed/unprotected. If you wedge Windows in a middle partition, you're kinda stuck and run out of MBR slots to describe and protect the whole disk, what typically happens is anything looking at the MBR sees four entries describing the first four GPT partitions, and the remaining GPT partitions actually look like unallocated/free space and fair game, not protected. So that's why I like this idea of installing Windows last.


But the bottom line is, if you're going to do triple booting, you're really off the rails and you need to understand what tools you can and can't use, have good backups and recovery plans, and understand how to recreate the proper hybrid MBR in case you do inadvertently use a tool you shouldn't have and it breaks booting.


Another way to do this is like Loner T suggested, is do only OS X + Windows as Apple suggests on the internal disk. And on some other disk, GPT partition it and use that for Linux, which will boot off externals, unlike Windows which is pretty fussy with that.

Jul 4, 2014 12:32 PM in response to Bx029297

Yeah you can blow away Recovery HD to gain an extra MBR slot, but with a bit of knowledge, you can keep it and just create a non-standard hybrid MBR.


Understand that things are nice in Apple land mainly because of the *lack* of options. The Linux world has a dozen boot managers/loaders, at least one of which might be argued to be a baby operating system. On Macs there is one boot manager (built into the firmware) and one bootloader (boot.efi) and essentially no user interface and no configuration files. So it's not just being off rails you have a dozen rails of different sizes and thousands of opinions about each. So narrowing down the choices is a lot of work and source of confusion.


Since I use FileVault 2, I have to keep Recovery HD since it acts as the unencrypted boot volume. And so I'm reluctant to endorse deleting Recovery HD but yes it can be done and it makes it a bit simpler if you really have no need for it (it's the same as it was with Snow Leopard and older).


And also I use Fedora, which has a totally unique way of supporting Linux on Macs. They don't use the Apple created EFI System partition. Instead they create a small 200MB HFS+ volume to use as an EFI System partition. This makes it possible to show Fedora as a boot menu option in System Preferences > Startup, as well as the option-key boot chime boot manager menu. I don't know any other Linux that does this.


If you're going to use Ubuntu, I'm not exactly sure how they support Macs with EFI booting, or how you switch between OS X and Ubuntu and Windows. I only use Ubuntu in a VM. By default they're going to use GRUB, so initially you'll have to contend with whatever they give you out of the box. I'm going to guess you'll want to use rEFInd eventually.

Jul 4, 2014 4:09 PM in response to Bx029297

As Christopher says, you will need to have a Hybrid MBR in either case for Windows to work. What you include in the MBR is where you have choices.


But the bottom line is, if you're going to do triple booting, you're really off the rails and you need to understand what tools you can and can't use, have good backups and recovery plans, and understand how to recreate the proper hybrid MBR in case you do inadvertently use a tool you shouldn't have and it breaks booting.

Jul 5, 2014 6:24 PM in response to Christopher Murphy

Christopher, i have now formatted my whole HDD, had a single one Mac OS x,

After running Bootcamp i managed to create 2 more partitions:


so partitions in disk utility looked like: - Mac Os X

- Linus Swap

- Ubuntu

- Bootcamp


whereas after typing in command " sudo gdisk /dev/disk0"

"p"

in order to know my partition number i had : 1 EFI System Partition

2 Apple_HFS_Untitiled_2

3 Recovery HD

4 LINUX swap

5 Ubuntu

6 Bootcamp


i then tried to install windows 7 but couldn't find out why when choosing which partition i wanted it on it said:


windows cannot be installed on this disk. The selected disk is of the GPT partition style.

Do i need to sort out the hybrid mbr first or is it a format problem?

Jul 6, 2014 4:50 AM in response to Loner T

The output is :

Disk: /dev/disk0geometry: 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 - 625142447] <Unknown ID>

2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused


And yes created the bootcamp partition with bootcamp assistant.

Then while bootcamp was partitioning hit the eject key and to eject the windows installation DVD and quit installation

Went to Disk Utility and created 2 more partitions LINUX SWAP and Ubuntu.


Am i meant to only use gdisk now and convert partition 6 from gpt to mbr or do i need to sort out the hybrid mbr first.


This is really confusing but i really need to understand..

Jul 6, 2014 5:27 AM in response to Bx029297

Bootcamp Assistant was prematurely terminated, hence the GPT side was created, but nothing on the MBR side points to it.


If you run sudo gpt -vv -r show /dev/disk0 you should see appropriate entries (you may want to post them here). The Hybrid MBR needs to exist before Windows can be installed. It will need to see a FAT partition (that is converted during installation to NTFS).


I would also suggest you create a separate thread (and post a reference here), this thread is no longer appropriate for this discussion.

Jul 6, 2014 8:18 AM in response to Bx029297

Create the hybrid MBR with gdisk, adding only the Windows partition. The end result would look something like this:


Command (? for help): r


Recovery/transformation command (? for help): p

Disk /dev/sdb: 167772160 sectors, 80.0 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 33141995-B6EE-4DC0-B43A-0FCD9BA64AA4

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 167772126

Partitions will be aligned on 2048-sector boundaries

Total free space is 2014 sectors (1007.0 KiB)


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

1 2048 411647 200.0 MiB EF00 EFI System

2 411648 61229055 29.0 GiB AF00 Apple HFS/HFS+

3 61229056 62560255 650.0 MiB AB00 Apple boot

4 62560256 63584255 500.0 MiB 8300 Linux filesystem

5 63584256 84555775 10.0 GiB 8E00 Linux LVM

6 84555776 167772126 39.7 GiB 0700 Microsoft basic data


Recovery/transformation command (? for help): o


Disk size is 167772160 sectors (80.0 GiB)

MBR disk identifier: 0x00000000

MBR partitions:


Number Boot Start Sector End Sector Status Code

1 1 84555775 primary 0xEE

2 * 84555776 167772126 primary 0x07

Jul 6, 2014 8:23 AM in response to Bx029297

You can't use any of Apple's GUI utilities on a disk that has more than 4 partitions. That includes Boot Camp Assistant. It will not create a hybrid MBR if the GPT contains 5 or more partitions. You have to use gdisk, or manually create the hybrid MBR using fdisk. If you're unwilling to give up GUI utilities then don't create 5+ partition disks (that's 3 visible partitions in Disk Utility, since two are hidden).

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.