Why Boot Camp failed, and how I fixed it

news
Aug 13, 20073 mins

After months of trying and failing to get Boot Camp running on a MacBook Pro, I finally put my shoulder to the task and determined that I would either make it run or report to you why it would not. I can now do both. The issue, in brief, was a damaged Parallels Desktop virtual hard drive file, bits of which I believe HFS+ (OS X’s filesystem) lost track of when power was lost or the system crashed while Parallels was running. Half-written changes to filesystem structures, and Parallels Desktop running on OS X creates two sets of filesystem structures to maintain, will do that. I was stymied by the fact that OS X’s filesystem diagnostics reported no problems.

I tracked my Boot Camp problem with the help of a treatise on Amit Singh’s (genuflect) osxbook.com site on the subject of HFS+ (OS X’s filesystem) fragmentation, and his hfsdebug utility. My Parallels Desktop virtual hard drive (.hdd) file was splintered into thousands of fragments (extents) across my disk. Macheads gloat that OS X defrags for us, but it does this only for files smaller than 20 MB. I don’t think I have any files that small. An Objective-C Universal Binary of “Hello World” is 86.4 megabytes. No it isn’t, but my point that OS X’s background defrag isn’t much help remains.

Once Singh’s hfsdebug pointed at the .hdd file, I tried to run Parallels Compressor on it to make a clean, condensed copy of the virtual drive. Compressor bailed. My heart sank. Yeah, it’s Windows XP, but it’s not like I had nothing on that virtual drive worth keeping. After trying Compressor, Parallels would not boot the virtual machine, and Finder couldn’t calculate the file’s size. Disk Utility still said the volume was fine, but I knew the .hdd file was a lost cause. I wiped it out, uninstalled Parallels Desktop (in case it held some erroneous state information) and rebooted.

Boot Camp Assistant ran to completion and set me up to install Vista Way Too Much Windows For You Ya Punk Edition on the first try, and this MacBook Pro now runs like it’s had a CPU upgrade. Filesystem checks now complete in seconds, where they used to take more than a minute. Boot time? What boot time? Whoosh.

The lesson here is decidedly not that Parallels Desktop or VMWare Fusion is problematic. I recommend that you preallocate virtual hard drive files instead of letting virtualization software grow them dynamically. If you must grow a large file dynamically, check to see whether the software has the option of setting the size of each new allocation of disk space. Make that number as large as you can stand, as that will limit the number of fragments created as the file grows.

I sidestepped future virtual hard drive issues completely by pointing Parallels Desktop at Vista in the Boot Camp partition. I hold my breath while Desktop boots Vista with its warning of data loss if there’s a power loss or reset (been there!), but as soon as the Vista login window pops up, it’s all good.