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

Sep 30, 2012 11:40 AM in response to Christopher Murphy

Christopher Murphy wrote:


Oops. I think you're right. Windows Backups just backs up user files, right? The idea isn't to restore to a blank partition but to a freshly installed/updated copy of Windows, right? If so I was definitely confusing it with something else. File copy/backup/restore is safe.


It's when the MBR is modified that things go wrong, because it makes it out of sync with the GPT, and typically causes the alternate GPT to get stepped on (corrupt), and the primary GPT is rendered invalid. A prime example of this is using Windows tools to resize a Windows volume. Not a good idea.

OK, that's what I thought. For the record I am suggesting reinstalling Windows and Applications (from fresh) and restoring data from the Windows backup.


I always view Windows on a Mac as heading for a breakage anyway 🙂

Sep 30, 2012 12:07 PM in response to Csound1

I always view Windows on a Mac as heading for a breakage anyway


I agree it's fragile. A big part of this is the hybrid MBR, and the fact Windows booting in CSM-BIOS mode only sees the MBR, and completely ignores the GPT thus exposing it to risk. It's why I personally do not use Boot Camp, instead I use a Virtual Machine for my foreign OS needs. It's vastly safer, and less complicated: setup, migration, removal, expansion, all are made much easier with a VM.

Sep 30, 2012 12:08 PM in response to Christopher Murphy

Christopher Murphy wrote:


I always view Windows on a Mac as heading for a breakage anyway


I agree it's fragile. A big part of this is the hybrid MBR, and the fact Windows booting in CSM-BIOS mode only sees the MBR, and completely ignores the GPT thus exposing it to risk. It's why I personally do not use Boot Camp, instead I use a Virtual Machine for my foreign OS needs. It's vastly safer, and less complicated: setup, migration, removal, expansion, all are made much easier with a VM.

We agree totally.

Oct 1, 2012 11:36 AM in response to pendo

The "old bootcamp partition" thus far isn't identifiable as a valid NTFS partition by Windows Startup Repair and Robocopy is a file copy program, therefore it depends on a valid working NTFS file system for it to do its job. If you don't have a backup for your Boot Camp user data, I think you're well past the time of kicking yourself. As merely the beginning of your punishment:


sudo dd if=/dev/diskXsY of=~/twosectors.bin bs=512 count=2

hexdump -C ~/twosectors.bin


The first command you need to replace XY with the correct values for disk and slice for the BootCamp volume you want to inspect. This command copies the first two sectors of that partition to a file "twosectors.bin" into your user home folder. The second comand displays the contents of that file. What I'm looking for is evidence that there's an NTFS header intact. If not, then yes you're better off just starting over and getting your data from back ups instead of attempting to recover this partition. If a header is found, then possibly different repair methods will work, but the first thing is to find out if the partition even contains a valid NTFS volume, then if it needs repairs and how much, then possibly to repair it. Only then would you be able to reliably extract information from it, or write new information to it such as fixing the bootloaders and BCD.

Oct 1, 2012 12:05 PM in response to Christopher Murphy

http://pastebin.com/7rrdjLKJ#



Repair utility did recognize the windows install and even stated it detected problems regarding boot. But after repair, I just get the flashing cursor.


Some new observations: My superdrive is external and I've noticed that sometimes I get the same behavior of the flashing cursor when selecting it as a boot source. Only sometimes though, as other times it works fine. Moving it to internal alleviates this phenomenon. Reasoning that a similar issue might be happening with the Seagate, I then tried to run the repair utility with the disk installed in the main bay. Still end up with the flashing cursor.


The unpredictability of usb connectivity in this instance really adds to the frustration.

Oct 1, 2012 12:18 PM in response to pendo

Boot off a Windows installer DVD and manually run chkdsk on the Windows/BootCamp partition. If you get reasonable error messages that indicate the volume is fixable, you can then do chkdsk /f which will fix the problems with the file system. If you get a lot of very strange errors, it may be so badly corrupted that a repair will actually make things worse, and you may be better off making a sector copy of the partition to another disk, just in case the repair goes bad.

Oct 1, 2012 4:42 PM in response to pendo

It's important to use chkdsk again with /f because the journal may say the file system is clean when it isn't. So give /f a shot and see what happens.


Next read this. You may have to click on the link to show more information. It's not exactly clear what order they want you to try this in, I would do the following three in order all at once, then try a reboot.


/FixMbr

/FixBoot

/RebuildBcd


If those don't work, then I'd try this:


bcdedit /export C:\BCD_Backup

c:

cd boot

attrib bcd -s -h -r

ren c:\boot\bcd bcd.old

bootrec /RebuildBcd

Oct 1, 2012 5:02 PM in response to Christopher Murphy

Okay this is different....I tried robocopy to a fresh install which didn't work entirely (several programs wouldn't start). I had made a backup before I tried robocopy and when I went to restore I noticed that the recovery console actually saw the old bootcamp even though I had it connected via USB. And recovery was reporting the boot issues again so I tried it and this time I get passed the flashing cursor!


But it still didn't boot all the way....the windows logo shows up and then after several seconds a blue screen flashes for a fraction of a second (cant even read it, but I assume its a memory dump?) then reboots.

Oct 1, 2012 7:32 PM in response to Christopher Murphy

Understood.


As soon as I seen the behavior had changed, I decided to try winclone again to see if it would complete. Currently it's about half way done.



Thanks again for your help. Your insight and expertise is far beyond what anyone has a right to expect in a public forum I think. It was a pleasure to talk with such a knowledgeable person on file systems (and I'm sure much more) as yourself.

Oct 1, 2012 10:22 PM in response to Scotch_Brawth

Hello, I also have this problem after installing Mountain Lion fron Snow Leopard having an XP Bootcamp partition.


Im unable to boot into bootcamp, or within Parallels using my Bootcamp partition. The partition is there and accessible. I would like to fix this without destroying data:


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

840100056 1269544 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

841369600 135403520 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

976773120 15

976773135 32 Sec GPT table

976773167 1 Sec GPT header



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 - 839690416] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 840100056 - 1269544] Darwin Boot

*4: 07 1023 254 63 - 1023 254 63 [ 841369600 - 135403520] HPFS/QNX/AUX



Please let me know if a fix is possible.

Oct 1, 2012 10:36 PM in response to Luis Fabara

There doesn't appear to be anything wrong with the MBR or GPT. This sounds like a bootloader problem. I'd try Windows Startup Repair. If that doesn't work, I'd first boot from the Windows installer DVD and run a chkdsk, then a chkdsk /f to make sure the file system is clean. Then use bootrec.exe and issue


/FixMbr

/FixBoot

/RebuildBcd


I am kinda curious BEFORE you do all of this what's going on in that MBR bootloader code region. This will copy and display it for copy/paste to the forum.


dd if=/dev/disk0 of=~/mbr.bin bs=512 count=1

hexdump -C ~/mbr.bin


When everything is working again you can toss ~/mbr.bin which is in your home folder.

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.