Summary

If your Mac / BootCamp Windows doesn't boot anymore and you must recover files from it's hard drive, don't use Disk Utility. Instead, get an Ubuntu USB stick with TestDisk on it and an external HDD to copy your files to.

Situation

My wife uses her MacBook Pro (late 2013) entirely as a Windows machine and never boots into OSX. She had very little of 123Gb actually available for her files due to both systems taking most of the free space.

I tried to solve this by downsizing the Mac partition through the Disk Utility. After several attempts to downsize the partition and doing "Repair Disk" operation, I tried to boot and OSX wouldn't boot. Windows boot option was not available anymore.

Failed attempts

Disk Utility is useless if your partitions are not in perfectly valid shape. It throws all kind of errors and even when it makes some images, they usually don't contain your files. I've spent a few hours trying to get it to work and regret it. Still, here are a few tricks that helped there:

  • Format your external HDD in exFAT or some other system supporting >4Gb files, since Disk Utility dumps giant image as a single file.
  • Use Internet Recovery (Option + Command + R) if your laptop supports it to take the image of the main partition. It might not allow to do that from normal recovery (Command + R)

Final solution

  1. Create an Ubuntu USB stick

  2. Boot your laptop into USB Ubuntu holding Option during startup

  3. Get TestDisk into Ubuntu e.g. through Internet download or through a second USB stick

  4. Ubuntu couldn't use WiFi, probably due to driver issues, but Ethernet USB adapter worked

  5. Run TestDisk, which is an awesome free tool that allows to copy files from damaged partitions to an external USB drive

TestDisk peculiarities

It's not an easy tool, but has good instructions as the bottom. If you don't understand a particular step, just Google the message to get help. Here's the approx. route I used:

  1. [No Log]
  2. Pick the disk you're interested in, usually internal SSD
  3. [EFI GPT] - that was default for me
  4. Picking partition - don't fear the "the following partition can't be recovered" message, you can't recover the partition but you can get the files from it.
  5. Then it listed all the files on Windows partition that was damaged. I selected all files on C:\ which was about 70Gb and sent them over to /media/ubuntu/abc which was my external drive.
  6. Copying files took a few hours - did this overnight and can't tell how many exactly - and there were no errors.

Installing fresh Windows copy without BootCamp

Making the Windows install USB stick

I was lucky to have Windows 10 on that Mac and I just used this tool to make a USB installation stick.

Reusing old Windows product key

It's good to copy the entire Windows disk since then you can use ProduKey to get your old Windows product key for a fresh installation - just point it to your old C:\Windows folder on your USB drive.

Installing Windows from USB stick

This is trivial if you have copied all your files from your Mac. Just boot into USB stick holding Option after turning on the computer.

Only catch the is that I had to remove ALL partitions from my Mac before Windows could start the installation - even the weird little EFI partition.

And of course, the old catch - if your computer rebooted back into the start of Windows installation after you've already done it, just remove the installation USB stick and reboot - at that point, your default bootable partition already has all the required Windows files.

Activating Windows over the phone

I didn't have to do this dance this time, but generally if you're using a previously used Windows product key, it might not allow Internet activation. In this case, calling the automated phone activation system does the trick. Calling over Google Hangouts is good for that since US calls are usually free there.

Installing drivers

You'd notice that a lot of things e.g. trackpad right click and WiFi don't work out of the box on Mac with a fresh Windows installation.

To solve this, download and install BootCamp from https://support.apple.com/downloads/boot-camp - just pick the right binary based on your laptop model.