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 3, 2014 9:59 AM in response to Christopher Murphy

HI Christopher

If you could just advise i'd be very greatful

this is my problem:


i've got a macbook pro version 10.7.5 with bootcamp installed (windows 7) quite a few years ago.

I decided and tried to install Ubuntu (Linux) (unsuccessful operation).


I added two more partitions (Linux and Linux swap) to Mac os X and Bootcamp so four in total

Unfortunately after installing rEFIt which is a boot loader needed to choose between the different OS i could't boot anything and had to reinstall Mac OS x..


Anyway, now although i can still see the four partitions that i had created in disk utility i cannot boot windows 7 anymore. (apperas as a folder "Bootcamp Windows" in startup disk , next to " max os x 10.7.5 HDD.


What is the problem, do i need to reinstall windows 7 or bootcamp assistant or anything else?


this is what i got from '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 161807472 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

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

163486648 1096

163487744 147910656 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

311398400 2048

311400448 827392 5 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

312227840 312913920 6 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

625141760 655

625142415 32 Sec GPT table

625142447 1 Sec GPT header


'sudo fdisk /dev/disk0':


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 - 409639] <Unknown ID>

2: AF 1023 254 63 - 1023 254 63 [ 409640 - 161807472] HFS+

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

4: 0B 1023 254 63 - 1023 254 63 [ 163487744 - 147910656] Win95 FAT-32


Anyone's help would be greatly appreciated

thanks

Jul 3, 2014 10:27 AM in response to Bx029297

You can use these

sudo fdisk -e /dev/disk0

setpid 4

07

flag 4

write

The following configuration is supported.

sudo fdisk /dev/rdisk0

Password:

Disk: /dev/rdisk0 geometry: 121643/255/63 [1954210120 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 - 1452530904] HFS+

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

*4: 07 1023 254 63 - 1023 254 63 [1454211072 - 499998720] HPFS/QNX/AUX


sudo gpt -vv -r show /dev/disk0

gpt show: /dev/disk0: mediasize=1000555581440; sectorsize=512; blocks=1954210120

gpt show: /dev/disk0: Suspicious MBR at sector 0

gpt show: /dev/disk0: Pri GPT at sector 1

gpt show: /dev/disk0: Sec GPT at sector 1954210119

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

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

1454210080 992

1454211072 499998720 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

1954209792 295

1954210087 32 Sec GPT table

1954210119 1 Sec GPT header

Jul 3, 2014 11:37 AM in response to Bx029297

If you look a the result from the gpt command, you have six partitions. Disk Utility hides EFI System partition, and Recovery HD partitions. I advise you use a VM rather than multibooting. Otherwise you're simply going to have to familiarize yourself with some fairly esoteric partitioning and bootloader knowledge in order to make them all work on baremetal, and understand what kinds of things you can and can't do in various Linux, Apple, and Windows utilities so that you don't cause data loss.


rEFIt is no longer maintained you shouldn't use it. Use rEFInd instead, which is a fork of rEFIt and is actively maintained by Rod Smith who is also the author of GPT fdisk (a.k.a. gdisk). You'll want to read the instructions on how to configure it to use the linux EFI STUB bootloader, that way you don't have to deal with GRUB. rEFInd is a boot manager, strictly speaking it's not a bootloader. It dynamically finds the Windows and OS X bootloaders, and with minimal one time configuration it can locate linux kernels (including new ones when you do software updates) and use the built-in EFI STUB bootloader that's in the kernel itself.


The six partition arrangement you have can be made to work, but there is no correct way to make a hybrid MBR. Apple's tools will not create, and will actively remove (which is why I say don't use Disk Utility for anything) hybrid MBRs anytime there's a GPT with 5 or more entries. For example if you try to repair a disk (vs a volume) in Disk Utility, it does a check of the partition maps and will in effect cause data loss on a disk laid out as yours is, so you either need to plan on not doing whole disk repairs, only volume repairs (I've resorted to only using fsck_hfs from command line in single user mode, I trust Disk Utility so little), or familiarize yourself with how to reconstruct a hybrid MBR on a regular basis. The GPT is safe in OS X and Linux, it's the MBR that's at risk and you can always make a new one of those, since it's a subset of the GPT (that is, it can only contain 4 entries, the GPT can contain 128+). Whereas in Windows booted in CSM-BIOS mode (the mode use when using Boot Camp) the reverse is true, the GPT is ignored and at risk, while the MBR is honored. This is why the MBR and GPT can become out of sync. So especially you don't want to make modifications in Windows because its changes are only reflected in the MBR, not the GPT.


This is why I say a VM is easier. You don't have to deal with any of these issues.

Jul 3, 2014 11:44 AM in response to Bx029297

*sigh* all you had to do was search this page for jonny and you'd have found the instructions rather than bugging Loner T. I know this stuff is obscure, esoteric, tedious, but it makes things worse on a handful of volunteers when people ask to be spoon fed like this.


Also when hijacking a thread, it's gauche to ask totally unrelated basic questions like how to backup Windows, that's suited for another thread. I suggest if you have anymore questions that you start your own thread and post the URL here. This one is 90 pages of clutter and when more than 1 person hijacks it with their problem, it's hard to keep track of all the responses, who's talking to who and what reply, etc.

Jul 3, 2014 12:10 PM in response to Bx029297

this is what i have got:


fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory

Enter 'help' for information

fdisk: 1> setpid 4

Starting Ending

#: id cyl hd sec - cyl hd sec [ start - size]

------------------------------------------------------------------------

4: 0B 1023 254 63 - 1023 254 63 [ 163487744 - 147910656] Win95 FAT-32

Partition id ('0' to disable) [0 - FF]: [B] (? for help) 07

fdisk:*1> flag 4

Partition 4 marked active.

fdisk:*1> write

Device could not be accessed exclusively.

A reboot will be needed for changes to take effect. OK? [n]


do i need to type anything else or reboot manually?

Jul 3, 2014 12:16 PM in response to Bx029297

post.user_wrote.label:


A reboot will be needed for changes to take effect. OK? [n]


do i need to type anything else or reboot manually?

As long as you type "y" to this question.


Please re-boot and hold the ALT/Option key during power up to see if Windows partition shows up correctly and can bring up Windows when selected.

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.