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 24, 2013 11:22 AM in response to Christopher Murphy

That turns out to be a tricky business, making sure one has a backup.


Winclone 3.7 kicks an error citing partition 5 as the cause. I'm negotiating with the publisher.


It amazes me how full of surprises can be the experience of trying to recover from creating an extra partition on a Bootcamp drive, whether willfully, as did the OP (original poster) or inadvertently, as did I when I failed to scrutinize the activity of Carbon Copy Cloner adequately.

Jan 24, 2013 11:36 AM in response to autnagrag

One method to backup that I find useful in cases like this, is a block copy. But you need a disk with at least as much free space on it, as the entire disk you're backing up. In your case, the disk to backup is 500GB, so you would need a 2nd drive with at least 500GB of free space. This backup method is inefficient because it includes free space and deleted files, literally every sector whether it's used or not, is backedup. But the advantage is, it's an exact snapshot, and easy to restore. Basically it's a sector copy, although the performance is faster if you specify a slightly larger block size (multiple sectors at a time). The command is dd.


You can use dd from/to a disk, partition, or file, in any combination. So you can turn a disk or partition into a file or vice versa. It's very much like Disk Utility pointed at a volume icon, and telling it to make a DMG of it. Except, this works with any file system. The catch is that the file system must be unmounted, because any mounted/active file system is constantly changing. So you can't make a sector backup of it while small bits are changing.


I can explain more how to do this if this is something you'd actually use, including how to find the mounted volume, unmount it, and how to copy the Windows partition to a file onto another drive. And briefly how to restore it should it be necessary.


But yeah, if the Winclone folks have a work around, that's easier because during their restore, they fix things automatically like the boot loader and BCD, which with a sector/block copy, you have to fix these things manually after a restore if they need fixing (by manually, you use Windows Startup Repair).

Jan 24, 2013 5:07 PM in response to Christopher Murphy

The source volume is now unmounted. It is now at dev/disk0s5. I have a place to put the output file (a JHFS+ volume with much more empty space than needed for the source).


I assume I want to tell dd what its source is – I can't figure that out from the man pages for dd. Perhaps you'll tell me how to navigate to the unmounted volume. Right now I have navigated to /dev and I can see the volume there.


I assume when I'm in the right place, I want to do something like

rightplace myuser$ dd of=path-to-output-file


Yes? Tell where/if I'm wrong, and how to navigate to the unmounted file so dd will accept it as the source, please.


Wow, do I appreciate your help!

Jan 24, 2013 5:42 PM in response to autnagrag

A more reliable command for finding mounts is either 'df' or 'mount'.


For a Windows partition at disk0s5 the command to copy it to a file is something like:


sudo dd if=/dev/rdisk0s5 of=/Volumes/externaldiskname/somefolder/Windows_backup.bin bs=256k


You can use .bin or .img, both are common, and .iso will work but it's not strictly correct (I think that's for CD/DVD's based on ISO 9660); but funny enough if you give it a .iso and double click on it in OS X, Disk Utility will open and mount it as a read only "DMG" like file. So you can read the contents.


So in the above command it's important to use sudo so the command has root privilage; that you use rdisk (with r) so you're using the raw block device; that you're pointing to an external disk with enough space; and the bs=256k means a block size of 256k at a time which will make this go way faster. You get no command prompt (it seems like it's hung) for the duration of the process, at the end there's a summary that's kinda important to make sure the records in and out are the same values.

Jan 24, 2013 7:15 PM in response to autnagrag

Yes. If you go back to your gpt -v -rr show output for this disk, it reports the Windows partition is 89004032 sectors, which is 45570064384 bytes. But dd was interrupted and only copied 25744375808 bytes, or 56%. The resulting file is next to useless. And it raises the question what this IO error is about. Down the rabbit hole... This is usually the result of a disk read error which means it encountered a bad sector.


In terminal, type

dmesg

and report the results. It might be long. You might also open Console and see if the system.log reports anything suspicious at the time this error was received.

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.