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

Jan 23, 2013 10:12 AM in response to Christopher Murphy

Hello!


I see how well you've helped these fine people and i hope you have experience and graciousness to help me 🙂

This problem has been racking my brain for the past few days now.

For context, on my old macbook i replaced the SuperDrive with another hard drive and decided to use that drive to install bootcamp.

I use the bootcamp utility to partition the full disk for my windows installation. on restart i realize the windows disk isn't capable of installing from an external dvd drive (go figure) and i didn't have a USB stick to boot the installation off of at the time. I had the clever idea to use Parallels to install windows using the Bootcamp partition as the disk instead of a virtual disk. once i got that set up i try to restart with alt/option but i couldn't see the windows drive. Through my research i found out that parallels doesnt' write teh MBR to the disk and instead saves it in a virtual file. I figure out how to write the virtual file using the "dd" command to replace the physical drive's MBR and Success! i was able to boot into windows and have been using it since.


a few days ago i got a new macbook and i figured i could move the drive to the new macbook with the same setup. unfortunately i get the "No Boot Device" error although i can still boot through parallels. the MBR hasn't changed and just to be sure i used "dd" to write the MBR again with parallels file without success.


(Apologies i don't know how to post the properly formatted code)

here is my diskutil list

User uploaded file

I am using FileVault on my Macintosh HD so maybe that's why it shows up in /disk2 when there are only 2 disks present.


here are the result of sudo gpt -r -vv show disk1


User uploaded file

and sudo fdisk /dev/disk1


User uploaded file


i don't know if it's worth noting that i sometimes see my second drive as /dev/disk0 rather then /dev/disk1 you see now

Jan 23, 2013 10:46 AM in response to maghikal

The /dev/diskX assignment varies between reboots, that's normal. In the above screen shots disk0s2 is the partition on which an encrypted Core Storage volume is located, and disk2 is the unlocked and mounted version of it (i.e. disk2 is a logical volume)


Try posting the results from:

sudo dd if=/dev/disk1 count=1 2>/dev/null | hexdump -C

Jan 23, 2013 12:30 PM in response to Christopher Murphy

Christopher,


I hope this hasnt become too tiresome for you as I have the same problem but didnt have the confidence to proceed without you walking me through it. I have an iMac that has an SSD as the main OS X boot volume, and a 1TB internal HDD that was being used for simple storage for OS X as SSD's are quite small. I had a 256GB bootcamp partition on the HDD with windows 8....all was well, then I got the bright idea to create a bootable backup of the SSD, so I downloaded Carbon Copy Cloner and created the bootable clone after creating a 120GB partition on the HDD for the clone.


I can boot into Mac OS X on the SSD and the bootable clone, but I can't boot into the bootcamp partition. I followed the first steps on the first page of this thread and here are the results:


User uploaded file

User uploaded file

I probably would have gone further except I didn't have 5 GPTs, whatever that is, I only had 3....maybe because the HDD isn't the OS X boot volume? Anyway, I appreciate any assistance you could give me. I suppose I could just wipe the bootcamp partition and start from scratch, but I wouldn't be able to put a bootcamp partition on an HDD with 2 partitions already would I? Starting from scratch is such a headache though.

Jan 23, 2013 1:39 PM in response to Christopher Murphy

My bootcamp installation of Windows is broken or at least mislocated. A program, probably Carbon Copy Cloner, objected to the fully functional drive, which had bootable partitions for MtnLion1, SnoLeopard, and WINDW732 (Win7 32bit), and offered to give it a Recovery HD slice. Foolishly, I agreed. Thus I ended up with the following:


Code:

$ diskutil list

/dev/disk1

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *500.1 GB disk1

1: EFI 209.7 MB disk1s1

2: Apple_HFS MtnLion1 412.3 GB disk1s2

3: Apple_Boot Recovery HD 784.2 MB disk1s3

4: Apple_HFS SnoLeopard 40.3 GB disk1s4

5: Microsoft Basic Data WINDW732 45.6 GB disk1s5


The Windows volume will still boot as a virtual machine using Virtual Box.


Startup Manager does not see the Windows volume. System Preferences>Startup Disk sees the Windows volume. Alas, when it is chosen as the startup disk the boot fails with a Win7 error message of “No bootable device --- insert boot disk and press any key.”


I think the volume might work again if I can restore it so it looks like this, so that Bootcamp installation will again be in slice 4 where it was very happy:


Code:

/dev/disk1

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *500.1 GB disk1

1: EFI 209.7 MB disk1s1

2: Apple_HFS MtnLion1 412.3 GB disk1s2

3: Apple_HFS SnoLeopard 40.3 GB disk1s3

4: Microsoft Basic Data WINDW732 45.6 GB disk1s4


I downloaded gdisk 0.8.6. I respect the command line. I’d like to use it to fix my drive, but I don’t want to damage it any further. If I understand this thread, I think for help I should list the output below.


user$ sudo gpt -r -vv show disk1

Password:

gpt show: disk1: mediasize=500107862016; sectorsize=512; blocks=976773168

gpt show: disk1: PMBR at sector 0

gpt show: disk1: Pri GPT at sector 1

gpt show: disk1: Sec GPT at sector 976773167

start size index contents

0 1 PMBR

1 1 Pri GPT header

2 32 Pri GPT table

34 6

40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

409640 805216648 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

805626288 1531680 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

807157968 78626792 4 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

885784760 1984328

887769088 89004032 5 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

976773120 15

976773135 32 Sec GPT table

976773167 1 Sec GPT header


I don't actually care if the Recovery HD partition gets removed, as long as I recover the ability to boot to Windows 7 via Bootcamp or pseudo-gdisk-almost-Bootcamp. I do not need to use FileVault2 on this drive.

Jan 23, 2013 2:55 PM in response to maghikal

OK re: the hexdump. This seems viable but does not contain the error you're getting, so it's not a problem with the MBR bootloader. It could be a BIOS error (Macs use a CSM-BIOS for booting Windows), or it could be an ntldr problem. So I don't see any way around this other than to find a Windows repair disk, or install disk and try using Startup Repair. I know that Windows doesn't like being moved around to different hardware in particular it flat out won't boot if the CPU families are different.

Jan 23, 2013 3:43 PM in response to Christopher Murphy

$ sudo fdisk /dev/disk1

Password:

Disk: /dev/disk1 geometry: 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 - 976773167] <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

Jan 23, 2013 6:00 PM in response to autnagrag

I'm not sure why you're getting the error you're getting at all because you don't even have a hybrid MBR on that disk, so that's why Windows won't boot. So you'll need to use gdisk to create a new hybrid MBR on disk1. Realize that every time you reboot, there is a change the physical disks swap designations between disk0 and disk1 so you have to check with diskutil list if you reboot, before making changes to the partition to make sure you're changing the correct disk.


Also, you should do an fdisk command on the other disk, disk0, to see if it has a hybrid MBR that's causing confusion.

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.