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

a. I guess I can install rEFIt after I repartition the disk.

b. Okay, I'll use rEFInd instead.

c. Alright, I'll install GRUB2 to the disk.

d. But I'm not reinstalling Mac OS X. I'm just moving around the partitions.

e. What do you mean by "fixed size"? I don't remember you mentioning that before.

f. Okay, I'll just follow along with gdisk.


First of all, does Ubuntu's UEFI installer support the Mac EFI? Second, how would I start the UEFI installer? Third, are there any advantages to installing in UEFI mode instead of BIOS mode?

Nov 22, 2012 3:29 PM in response to Marionumber1

d. if I see the result from 'gdisk -l /dev/disk0' i'll be able to comment further on this

e. Recovery HD, swap, BIOS Boot all have specific sizes they should be, whereas the Ubuntu partition can be anything you want so long as it meets the minimum requirement; but it sounds like you intend to create all of these partitions in advance somehow with data on the disk? I don't see how that's going to work unless you have another disk handy to move whole partitions to, then redo the partitioning on the original disk, then restore the volumes from the 2nd disk.


First of all, does Ubuntu's UEFI installer support the Mac EFI?

I don't know. The only distribution that I know explicitly supports Apple's non-standard EFI implementation is Fedora 17 and newer.


Second, how would I start the UEFI installer?

I don't know how Ubuntu does it, or if they have a single installer image that does both UEFI and BIOS, which is how it works with Fedora. If the computer boots the installer image in UEFI mode, then the installer will install UEFI bootable system. If the computer boots CSM-BIOS mode, you will have a BIOS bootable system installed.


For Fedora, when option-key booting the install media, you get two options: Fedora (which is the EFI boot option) and Windows (which is the BIOS boot option). Since the hardware support isn't the same, it's possible one will work well and the other won't.


Third, are there any advantages to installing in UEFI mode instead of BIOS mode?


Full ACPI and AHCI support is available when booting UEFI, so you get faster SSD performance (apparently it's not as noticeable with HDD), and you get significantly better battery life.


For all of these complexities it's why I don't natively boot either Windows or Linux on Apple hardware, I only natively boot OS X, and then I use a VM for Windows and Linux.

Nov 22, 2012 4:05 PM in response to Christopher Murphy

d. I'll get the results of 'gdisk -l /dev/disk0' later, when I boot into Mac OS X.

e. I was planning to shrink the Mac OS X partition (which I don't use as much) by the required amount for the Recovery HD, BIOS Boot Partition, and swap partition. Then I would create my partitions in the free space.


2. After trying out the Ubuntu 12.04 CD, it looks like holding down the Option key gives you an option to boot Windows or EFI Boot. However, I didn't try it out yet.

3. Well, since I have an HDD instead of an SSD, the drive performance won't be very noticable. Battery life isn't that much of a concern for me, unless its significantly better than it is in BIOS Mode (by that I mean at least 1 hour better).

Nov 22, 2012 4:20 PM in response to Marionumber1

e. shrinking HFS+ causes free space to appear after the resized partition, not in front where you need it, so you'll need to relocate OS X and Recovery HD if your'e going to go with this layout; also I can't tell you if the next version of OS X will know what to do this this layout.


2. EFI Boot is the one to choose; the Windows option is hard named for anything that boots with the CSM-BIOS even if it's not Windows.


3. On a MBP 4,1 the difference is double (roughly 2 hours vs 4 hours), I find the CSM-BIOS unusuable on laptops for serious use, and honestly the only purpose for native booting these OS's if for games. The performance is quite good in a VM, and you don't have any of the partition challenges discussed.

Nov 22, 2012 4:50 PM in response to Christopher Murphy

e. I know that the free space appears after the resized partition, but I'm going to relocate the Mac OS X partition so I can make the BIOS Boot Partition, Ubuntu partition, and swap partition.


2. I know that EFI Boot launches Ubuntu in UEFI mode, I just didn't test it to see if it worked. I will test it tomorrow.


3. I'm using a Macbook Pro 8,2. Is there any significant difference on that system? I do need to use CSM-BIOS to natively boot Windows 7 for gaming, but if Ubuntu's UEFI mode works fine on my Mac, I see no reason why I shouldn't use it. If I install Ubuntu in UEFI mode, will GRUB2 be installed to the EFI System Partition?


You also suggest using a VM. Since I wouldn't be playing any games in Ubuntu, I could look into that option. My computer is pretty powerful (Intel Quad Core i7 and 4 GB of RAM), so I guess a VM would run smoothly. However, I still would want to know how to add the Ubuntu partition, in case I do want to go through with triple booting my Macbook Pro.

Nov 24, 2012 8:45 AM in response to Christopher Murphy

I was unable to boot into Win 7 on my MacBook Air. Having followed Christopher Murphy's instructions exactly, my problem was solved. Hooray for Chris!! But having fixed one problem, another one popped up. I am now unable to see nor access my HFS+ Mac side from the Windows side, whereas before I could access my files seamlessly (using MacDrive). Windows says that the partition is GPT protected (healthy).


Chris, how can I recover my access to the Mac partition from windows? This is what it looks like:


Disk: /dev/disk0geometry: 30515/255/63 [490234752 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 - 371005688] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 371415328 - 1269536] Darwin Boot

4: 0C 1023 254 63 - 1023 254 63 [ 372686848 - 9852928] Win95 FAT32L


#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *251.0 GB disk0

1: EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 190.0 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data WIN FILES 5.0 GB disk0s4

5: Microsoft Basic Data Windows 7 55.1 GB disk0s5




To get 100 points, I have a third partition (called Win Files) which I created with Mac's Disk Utility. I want to be able to access it from the Windows side... no need to have it be a boot drive. Can you help me with that too? An answer today would be most appreciated.


Regards.

Nov 24, 2012 10:09 AM in response to MacConv

You can't do what you want to do safely, so to make it work you'll have to take a risk that one day your Recovery HD will become corrupt and unusable. The reason is MBR can only contain four entries, and one must be used for the EE entry and one must be used for the bootable Windows entry. This only leaves two entries, and in between them is Recovery HD. So while you can add Mac OS X and WIN FILES entries, you no longer have room to protect Recovery HD. Those sectors will effectively be Free Space in the MBR, so anything that honors the MBR will see the Recovery HD as free space and can do anything to it it wants.


Using gdisk you need to make a new hybrid MBR and add partitions 2 4 5 marking 5 as bootable.


BTW saying that an answer today would be appreciated I find rather rude.

Nov 24, 2012 2:17 PM in response to Christopher Murphy

Hi Christopher,


Thanks very much for your advice. It was right on. I'm sorry you took offense to my requesting an urgent answer, if possible! I just wanted you to know that it was a mission critical issue for me so thanks again for your timely help. I am always grateful to people like yourself who have the knowledge and are willing to put in the time to help out community members facing technical problems.


This solved my question - 10 points

Nov 26, 2012 12:31 AM in response to Christopher Murphy

hi,


sorry to bother you but i have a similar proble to the op 😟


I use to have bootcamp to dual boot windows 8 and osx lion. BUT I wanted to triple boot all that along with windows 7. I stupidly used the disk utility to split my macintosh hd into 2 partitions and now i lost my bootcamp (when i press "alt" and bootcamp menu appears, the windows 8 icon not there).


anyways i tried following your steps but my results are different to the op.User uploaded file


for the commands, these are my results:


for "sudo gpt -r -vv show disk0"


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

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

517102496 68562016

585664512 391108608 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

976773120 15

976773135 32 Sec GPT table

976773167 1 Sec GPT header


for "sudo fdisk /dev/disk0"


Disk: /dev/disk0geometry: 60801/255/63 [976773168 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 - 515423320] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 515832960 - 1269536] Darwin Boot

4: 0C 1023 254 63 - 1023 254 63 [ 585664512 - 391108608] Win95 FAT32L


i was wondering if you could help me. Thank you 😀

Nov 26, 2012 11:42 PM in response to Christopher Murphy

ok thank you for your reply.


Unfortunately Im only use to windows, so I have no idea how to do what you said. Could you please give me a bit more detailed answers. THanks alot 😀.


i've been doing some research and it seems that if i insert a windows 8 disk into my macbook pro, and then select repair system in the boot menu, this would solve everything. Should I do this? I don't want to screw my macbook up more 😟

Nov 27, 2012 9:55 AM in response to Charaity

The bulk of this thread has to do with using gdisk to create new hybrid MBRs. A more useful basic summary of hybrid MBRs is found here including the documentation for creating a new hybrid MBR. Windows startup repair might fix some other problem, but I don't know if partition type code 0C is considered valid or not. For sure that partition isn't marked as bootable right now.


Eventually you're going to have to either learn a lot more than you probably want to about disaster recovery on a multiboot system, or you're going to have to erase the hard drive and start totally from scratch, restoring your data from backups. But if you're going to triple boot you need to know something about these things anyway because there is no supported way to do this on Apple hardware. You'l have to hack your own hybrid MBR because the provided tools will not do this for you, in fact they will attempt to erase your hybrid MBR once you have more than 4 partitions in the GPT.


OS X by default needs three partitions. Each Windows needs 1. That's 5. There aren't enough entries in the MBR to give everything a unique MBR entry. You could consolidate the GPT, EFI System, OS X, and Recovery HD into the MBR's 0xEE entry, and then you'll have room for Windows 7 and Windows 8 in the MBR. But you will not be able to mount the OS X volume from within either Windows.

Nov 27, 2012 8:25 PM in response to Christopher Murphy

Ok cool.


So I have decided that its too much of a hassle for windows 7 and 8 long with osx lion.

Now i just want my laptop back to the way it was before. (lion and win 8 only)


So I tried to repair the mbr table thingy.

i typed in "sudo gdisk /dev/disk0" to go into interactive mode but its giving me an error:


"sudo: gdisk: command not found"


I dont know what to do from here. i was planning on having a defaullt mbr (like apple).


By what exactly did I do worng? I dont get how splitting my macintosh HD by creating another partition from that, deleted my acess to windows =/

Nov 27, 2012 8:40 PM in response to Charaity

1. Suggest you try to recover the free space before you do anything else. Post the results of this command.

diskutil resizevolume limits


2. GPT fdisk is found here.


3. By what exactly did I do worng? I dont get how splitting my macintosh HD by creating another partition from that, deleted my acess to windows =/


Like I said, MBR only allows four entries. Three are used for OS X. There is only one left for one instance of Windows. By adding a fifth partition, Apple's tools remove the hybrid MBR in favor of a protective MBR, which removes access to Windows. That they let you add a fifth partition, actually that they let users modify a "Boot Camped" disk at all, is a violation of their own Technote which says such disks are no longer valid GPT disks and should not be manipulated at all. So in my opinion it's an Apple bug, and I have filed a bug report on it.


Preferable would be for Disk Utility to refuse to do anything to a disk that has been "Boot Camped" and the only way to revert with GUI tools is if Boot Camp Assistant is run again, and the Boot Camp/Windows partition is deleted first. At least this would be willful, intentional removal of Windows, rather than inadvertent removal. It would also prevent a host of other problems that I think are the source for some of the more obscure problems people have where they lose a single Windows volume in the course of upgrading OS X.


Anyway, a word of warning for all Boot Camp users is that it's even MORE important for you to regularly back up important files from both environments, especially before making any modifications to either the OS version or the disk layout.

Nov 27, 2012 11:08 PM in response to Christopher Murphy

"diskutil resizevolume limits"


Usage: diskutil resizeVolume MountPoint|DiskIdentifier|DeviceNode size

[part1Format part1Name part1Size part2Format part2Name part2Size

part3Format part3Name part3Size ...]



Non-destructively resize a disk. You may increase or decrease its size.



When decreasing size, you may optionally specify new partitions to create

to fill the newly-freed space. Specify these new partitions as in the

diskutil partitionDisk command. Ownership of the affected disk is required.



Valid sizes are floating-point numbers with a suffix of B(ytes), S(512-byte-

blocks), K(ilobytes), M(egabytes), G(igabytes), T(erabytes), P(etabytes),

or (%)percentage of the total size of the whole disk.



A size of "limits" will print the valid range for the current conditions of

the file system and room to grow up to an immovable object (next partition).



A size of "R" for the target partition will resize it to the maximum

possible; "R" cannot be used for the size of new partition triples, if any.



resizeVolume is only supported on a Journaled HFS+ file system.

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.