A Parallels and Boot Camp Computer Adventure

The short version of this story is that Parallels somehow screwed with my iMac to such an extent that I had to delete and rebuild the Fusion drive. A blow-by-blow account follows:

I installed Parallels on my Mac, with the intention of booting my Windows installation in both a Parallels VM and natively. Wouldn’t that be convenient?

However, even though Parallels states that Microsoft “should” allow this, it doesn’t. Windows detects the VM as different hardware, and you can’t have the same installation of Windows active for both purposes. Also, despite the fact that Parallels is a hypervisor (meaning it’s not running on an emulated CPU), graphics performance is noticeably worse in Parallels vs. booting natively. So, I uninstalled Parallels.

I then booted into Windows, to make sure that its activation wasn’t screwed up. It wasn’t. Windows started to install an update of some kind, and it hung, and the computer rebooted itself into OS X.

It may be that it is this failed update that screwed everything up and Parallels had nothing to do with it. It may also be that Parallels contributed to this failed update–for example, if the update was only applicable to the Parallels “hardware” and installing it in Boot Camp is what broke things.

Trying to boot into Windows then got me stuck in the famous “Automatic Repair” loop, which is as far as I can tell not able to repair anything in any circumstance. Because the Windows install didn’t have anything important, I eventually went back into OS X, deleted the Boot Camp partition using Boot Camp Assistant, and tried to reinstall Windows.

It installed correctly, but rebooting, it got stuck in the same loop. This time, using the Windows recovery tools, I reinstalled Windows. I also used the Windows command line and followed various steps that are supposed to fix boot problems in Windows. (The Windows recovery tools were able to see the Windows install, just not boot off of it.) But the end result of all this was, once again, an automatic repair loop.

I then deleted the Boot Camp partition again. Rebooting the computer while holding “option” then revealed something bizarre. I was presented with an option to boot into Windows, even though according to Disk Utility both in OS X proper and OS X recovery, there was no Boot Camp partition at all. Selecting that option brought me to a Windows error screen (but the startup recovery tools were not longer present).

I began to suspect what the problem was: While the logical Fusion drive itself was unaware of Windows, Disk Utility and Boot Camp Assistant were unable to see that one of the physical disks themselves still had remants of Windows, and this remnant was screwing up any subsequent installation of Windows. A Fusion drive, you will recall, is typically an SSD and a hard drive that the computer treats as a single disk in software–it’s not a hard drive with an SSD cache, but a full-on SSD and a full-on hard drive. A Boot Camp partition is put just on the hard drive.

I believe that somewhere in the sequence of booting Windows in Parallels and then natively, something got screwy with the boot records. Boot Camp is already very complicated due to things I prefer not to have to know about like EFI, GUID vs. MBR partition tables, and so on. Adding a Fusion drive and then booting a Boot Camp partition within a VM was too much for the system to handle.

I therefore booted onto a USB drive with Gparted and deleted/nuked everything on both the SSD and the hard drive.

After verifying that every last trace of Windows was gone, I booted into OS X’s Internet Recovery (which is a great feature) and used the terminal program “diskutil” to recreate the Fusion drive. (If you don’t do this first, and you attempt to install OS X, OS X will just see you as having two independent drives.) You first have to create a logical volume group (which is the Fusion drive itself), then an HFS+ volume within that group. (Here is a reddit post that explains how to do this; be very careful with this stuff.)

I was then able to reinstall OS X, and Windows using Boot Camp Assistant, and now everything works correctly.

In retrospect, since I believe OS X was entirely on the SSD and the Windows remants were entirely on the hard drive, I may have been able to break the Fusion drive apart, nuke the hard drive, then rebuild the Fusion drive without having to wipe out OS X. I may also have been able to fix things from within Windows recovery using “diskpart,” but reading the documentation on diskpart just left me confused.

Conclusion: Don’t try to use Parallels to run a boot camp partition in a VM, particularly if you have a Fusion drive. And if things get particularly screwed up your only alternative may be to rebuild your Fusion drive from scratch.