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

Mar 6, 2014 12:26 PM in response to hkpanda

Please post a new thread with output from


diskutil list


sudo fdisk /dev/disk<n> (<n> is your Bootcamp disk, which is shown by the diskutil command).


sudo gpt -r -vv show disk<n> (try rdisk<n> if disk<n> does not work).


and post a reference to that thread here.


When you try to boot windows, do you see a blinking cursor in the top left corner?

Mar 6, 2014 12:56 PM in response to Loner T

Loner T wrote:


Christopher Murphy wrote:


As for EFI install, you can do this:

mkdir /Volumes/EFI

sudo mount -t msdos /dev/disk0s1 /Volumes/EFI

ls -l /Volumes/EFI/EFI/


That will mount the EFI System partition, and list the contents of its EFI folder. If you have a legacy BIOS install of Windows, then the only result is a directory called APPLE. If there's one for MICROSOFT then you have an EFI install of Windows 8.

Number88 and Christopher... Good to know this. Thanks. 😎


Noted for future reference.


Either these commands, or the boot camp fixes seem to have left the EFI partition (or at least the volume created for it) available to disk utility. Disk Utility is now showing "disk0s1" as a ~300mb partition before Macintosh HD.


Does someone know a command to re-hide this?

Mar 6, 2014 1:00 PM in response to jamie.shaw

jamie.shaw wrote:


Either these commands, or the boot camp fixes seem to have left the EFI partition (or at least the volume created for it) available to disk utility. Disk Utility is now showing "disk0s1" as a ~300mb partition before Macintosh HD.


Does someone know a command to re-hide this?


Make sure you are not sitting in /Volumes/EFI directory in any terminal window and then


sudo diskutil unmount /Volumes/EFI

Mar 6, 2014 1:15 PM in response to Loner T

Loner T wrote:


jamie.shaw wrote:


Either these commands, or the boot camp fixes seem to have left the EFI partition (or at least the volume created for it) available to disk utility. Disk Utility is now showing "disk0s1" as a ~300mb partition before Macintosh HD.


Does someone know a command to re-hide this?


Make sure you are not sitting in /Volumes/EFI directory in any terminal window and then


sudo diskutil unmount /Volumes/EFI


Hmm – not a permenant solution.


Interestingly, after fixing my MBR through Window's recovery, one of my GPT partition's now has a name and an index: the previous 716800 partition is now "MBR part 7" with an index of 1. I'm guessing this is the "disk0s1" that keeps getting mounted on boot into OS X.


Any ideas how I can remove this as an indexed partition (and stop it being mounted on boot?)

Mar 6, 2014 1:19 PM in response to Christopher Murphy

Christopher et al


Would the solution to creating another Mac partition (after successfully boot camping so I already have a Mac and Windows partition) change if I am only using Mavericks and W8.1?


Here's where I asked the question originally

https://discussions.apple.com/thread/5693875?tstart=0


Ideally, I would like 3 partitions - Mac OS, Mac files and Windows.

Mar 6, 2014 2:01 PM in response to jamie.shaw

jamie.shaw wrote:


Loner T wrote:


jamie.shaw wrote:


Either these commands, or the boot camp fixes seem to have left the EFI partition (or at least the volume created for it) available to disk utility. Disk Utility is now showing "disk0s1" as a ~300mb partition before Macintosh HD.


Does someone know a command to re-hide this?


Make sure you are not sitting in /Volumes/EFI directory in any terminal window and then


sudo diskutil unmount /Volumes/EFI


Hmm – not a permenant solution.


Interestingly, after fixing my MBR through Window's recovery, one of my GPT partition's now has a name and an index: the previous 716800 partition is now "MBR part 7" with an index of 1. I'm guessing this is the "disk0s1" that keeps getting mounted on boot into OS X.


Any ideas how I can remove this as an indexed partition (and stop it being mounted on boot?)


Forgot to post my outputs:


fdisk looks fine.

Disk: /dev/disk0 geometry: 60821/255/63 [977105060 sectors]

Signature: 0xAA55

Starting Ending

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

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

1: 07 1023 254 63 - 1023 254 63 [ 976388096 - 716800] HPFS/QNX/AUX

2: AF 25 127 15 - 1023 254 63 [ 409640 - 876953152] HFS+

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

*4: 07 1023 254 63 - 1023 254 63 [ 878632960 - 97755136] HPFS/QNX/AUX


GPT shows new "MBR" at sector 976388096.

gpt show: disk0: mediasize=500277790720; sectorsize=512; blocks=977105060

gpt show: disk0: MBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 977105059

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

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

878632328 632

878632960 97755136 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

976388096 716800 1 MBR part 7

977104896 131

977105027 32 Sec GPT table

977105059 1 Sec GPT header


Would this be safe to delete maybe? It's still registering the MBR at sector 0.

(Ideally, if I can just "unindex" it and hide it from disk utility and unmounting on boot, that's fine by me. It's mounting as a NTFS volume [disk0s1])


/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: FDisk_partition_scheme *500.3 GB disk0

1: Windows_NTFS 367.0 MB disk0s1

2: Apple_HFS Macintosh HD 449.0 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Windows_NTFS Windows HD 50.1 GB disk0s4


UPDATE: Additionally, I've noticed that "Macintosh HD" is no longer available under "Startup Disk" - it is on the actual bootloader, just not the prefpane :/

Mar 6, 2014 4:05 PM in response to jamie.shaw

jamie.shaw, I'm not sure exactly what has happened but your fdisk output is not correct nor does it agree with your gpt show output.

If you look carefully your fdisk output shows a partition type 07 for the first partition - this is incorrect.

It should be a type EF for the EFI partition. It is correct on your gpt output though.


You need that EFI partition to be intact otherwise your Mac will be unable to process firmware updates.


In view of this I would suggest that you create a new hybrid MBR, answering Y to setting the EFI partition as first in the MBR.

Obviously your other partitions need to be included too and the Windows partition needs to be marked bootable.


This may or may not affect booting Windows - we'll just have to see.


I have no idea what MBR partition 7 is. What was that partition previously? Can't remember.


EDIT Ah, I see it was free space if I'm not mistaken.

Mar 7, 2014 12:54 AM in response to Number88

Number88 wrote:


jamie.shaw, I'm not sure exactly what has happened but your fdisk output is not correct nor does it agree with your gpt show output.

If you look carefully your fdisk output shows a partition type 07 for the first partition - this is incorrect.

It should be a type EF for the EFI partition. It is correct on your gpt output though.


You need that EFI partition to be intact otherwise your Mac will be unable to process firmware updates.


In view of this I would suggest that you create a new hybrid MBR, answering Y to setting the EFI partition as first in the MBR.

Obviously your other partitions need to be included too and the Windows partition needs to be marked bootable.


This may or may not affect booting Windows - we'll just have to see.


I have no idea what MBR partition 7 is. What was that partition previously? Can't remember.


EDIT Ah, I see it was free space if I'm not mistaken.


Right – all sorted... I think.


It looks like the bootrec.exe /FixMbr or Windows 8 Auto Recovery created this. I don't know how or why, but it made the entire disk into an MBR partition table.


To resolve, I created a new Hybrid MBR from the GPT in gdisk. This did break Windows 8's boot config again. However, instead of the automated recovery (incase it ended in the same result), I used the manual bootrec.exe /RebuildBcd.


And to confirm:
• Mac HD, Recovery HD and Windows are all bootable and appear in the "alt" boot manager.

• Mac HD and Windows are both available in the Startup Disk prefpane.

• That secondary MBR has now been removed, and no longer is mounted as disk0s1 on boot.

• Disk Utility verifies the Mac HD and whole disk as good.


For reference, and security, below are the outputs of the various commands used over the issue. Would someone be awesome and give it a quick glance over and ensure everything looks fine?


/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *500.3 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 449.0 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data Windows HD 50.1 GB disk0s4


Disk: /dev/disk0 geometry: 60821/255/63 [977105060 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 - 876953152] HFS+

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

*4: 07 1023 254 63 - 1023 254 63 [ 878632960 - 97755136] HPFS/QNX/AUX


gpt show: disk0: mediasize=500277790720; sectorsize=512; blocks=977105060

gpt show: disk0: Suspicious MBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 977105059

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

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

878632328 632

878632960 97755136 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

976388096 716931

977105027 32 Sec GPT table

977105059 1 Sec GPT header

Mar 13, 2014 9:44 AM in response to Christopher Murphy

HI Christopher,


I have MacOSX Lion and Windows 7 Boot Camp on my MacBook. Recently, i created a partition of the Disk of FAT32 using DiskUtiltiy App from the MACINTOSH HD. After this i no more abl to see the Windows Option in the Boot Menu. Then i DELETED that partition from Disk Utility. Still i could not see my BOOTCAMP. Again recreated that partition with HFS. Then i tried gdisk and done some changes. Now it shows windows Option. But when i click it says "Missing Operating System"


How can i recover this back. Please help.

Please see the results of basic commands


diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *120.0 GB disk0

1: EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 57.0 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data 37.2 GB disk0s4

5: Apple_HFS Untitled 3 23.6 GB disk0s5


Here the report got from refit




*** Report for internal hard disk ***



Current GPT partition table:

# Start LBA End LBA Type

1 40 409639 EFI System (FAT)

2 409640 111765471 Mac OS X HFS+

3 111765472 113035007 Mac OS X Boot

4 115437568 188041215 Basic Data

5 188041216 234179463 Mac OS X HFS+



Current MBR partition table:

# A Start LBA End LBA Type

1 1 115437567 ee EFI Protective

2 * 115437568 188041215 07 NTFS/HPFS



MBR contents:

Boot Code: Unknown, but bootable



Partition at LBA 40:

Boot Code: None (Non-system disk message)

File System: FAT32

Listed in GPT as partition 1, type EFI System (FAT)



Partition at LBA 409640:

Boot Code: None

File System: HFS Extended (HFS+)

Listed in GPT as partition 2, type Mac OS X HFS+



Partition at LBA 111765472:

Boot Code: None

File System: HFS Extended (HFS+)

Listed in GPT as partition 3, type Mac OS X Boot



Partition at LBA 115437568:

Boot Code: None

File System: Unknown

Listed in GPT as partition 4, type Basic Data

Listed in MBR as partition 2, type 07 NTFS/HPFS, active



Partition at LBA 188041216:

Boot Code: None

File System: HFS Extended (HFS+)

Listed in GPT as partition 5, type Mac OS X HFS+

Mar 13, 2014 9:55 AM in response to Nirmal.Web

Nirmal.Web wrote:


Then i tried gdisk and done some changes. Now it shows windows Option. But when i click it says "Missing Operating System"

Can you post the output of sudo fdisk /dev/disk0 (use rdisk0, if necessary)?


The Missing OS may require a Windows repair including bootrec.exe. A fifth partition on a Bootcamp disk causes problems, as does resizing/adding/deleting partitions on such a disk.

Mar 18, 2014 11:16 PM in response to Scotch_Brawth

So I think the instructions by Christopher Murphy worked for me. Here's what I did:


New MBP 13" (MBP11,1, 10.9.2)


1: Used BCA to partition and load Windows 7 x64 onto a 120GB Bootcamp partition

2: Used Drive Utility to partition remaining ~380GB into two Mac OS partitions, 225GB and 155GB.

3: Used gdisk with Mr. Murphy's instructions to set the bootable flag on the Bootcamp partition

4: Installed Mavericks on second Mac OS partition using recovery partition. Long download followed. THis created a second recovery partition and made the Bootcamp partition #6

5: Used a modified version of Mr. Murphy's instructions, substituting '6' for the partition number in step 3 to add partiton 6 to the MBR

6: reboot


So far so good. There are now 5 bootable partitions in the option-reboot window: the two Mavericks partitions, the two recovery partitions, and the Bootcamp partition.


Any reason this shouldn't keep working, as long as I don't use Disk Utility to change partitions?


Thanks again to Mr. Murphy!

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.