Tried triple boot on MBP, broke Windows

I have a MBP with OS X 10.11 (El Capitan) and Windows 8.1 (via Bootcamp). I now wanted to add Ubuntu to the pack and therefore created a new partition using Disk Utility in OS X. From that moment on, Windows 8 would no longer boot - I get boot error 0xc000000e and none of the recovery tools from a Win8 USB drive work.

I proceeded to install Ubuntu and noticed that I cannot boot it, since the partition does not show up when I press the 'Alt'-Key during startup. Resetting EFI's boot order via an Ubuntu USB stick works, but as soon as I start OS X, it seems to overwrite the boot order and I again cannot boot Ubuntu. I informed myself about boot managers and I would like to install rEFInd to fix the boot order issue.

How should I proceed? Try to fix Windows first and then install rEFInd or the other way around? And how can I fix Windows? I have already tried the procedure described here and it did not work - Windows still doesn't boot.

I use FileVault 2, have disabled El Capitan's 'System Integrity Protection' feature and have gdisk installed. I would be happy to provide you with readouts from my partition table on request.


Solution 1:

First, there's a big uncertainty about your Windows boot mode. Through Windows 7, most Windows dual-boot installations used Boot Camp -- that is to say, Windows booted in BIOS/CSM/legacy mode whereas OS X booted in EFI/UEFI mode. This setup requires a hybrid MBR, which is flaky and dangerous. Since Windows 8, though, the ability of Windows to boot in native EFI/UEFI mode on Macs has improved substantially. Thus, you may have such an installation and not even realize it. Before you do anything more, you should figure out which boot mode you've got. The best way to determine this is to examine your EFI System Partition (ESP), which is a FAT partition -- usually /dev/disk0s1 on Macs. (You may need to mount it with mkdir /Volumes/ESP followed by sudo mount -t msdos /dev/disk0s1 /Volumes/ESP.) Look for a directory tree called EFI/Microsoft on that partition (that is, /Volumes/ESP/EFI/Microsoft if you mount it as I've specified), and especially for a file called EFI/Microsoft/Boot/bootmgfw.efi. If that file is present, it's strong evidence of an EFI-mode install of Windows. If it's absent, then you've probably got a BIOS-mode install of Windows.

If you've got an EFI-mode Windows install, I recommend you remove your hybrid MBR in favor of a conventional protective MBR and try to get all of your OSes booting in EFI mode. You can do the first task with gdisk in any of your OSes -- type x to get to the experts' menu, then n to create a new protective MBR, and finally w to save that change to disk. Most Mac users employ the discontinued rEFIt or its supported fork rEFInd to manage the boot selection task. With System Integrity Protection disabled, you should be able to install rEFInd from OS X by running its install.sh script. You may want to edit refind.conf to uncomment scanfor and remove hdbios from the list of options -- this will keep rEFInd from presenting BIOS-mode boot options, which would not work on this setup. (Note: I'm both the author of gdisk and the maintainer of rEFInd.)

If you've got a BIOS/CSM/legacy install of Windows, you'll need to keep the hybrid MBR installed, or create a new one. The procedure you referenced created a fresh hybrid MBR, but it's unclear precisely what partitions you included in it. You must include your Windows boot partition and any partition you intend to share across OSes. I've seen some claims that Windows is fussy about its partition number, so you may need to fiddle with that detail when you re-create your hybrid MBR. rEFInd is useful for managing multi-boot setups on such configurations, too; but in this case you should not remove hdbios from the scanfor line in refind.conf.

If you think you've got a BIOS-mode Windows setup but can't get it to boot, you might consider converting it to an EFI-mode boot. See this blog post for one procedure to do this. This example is based on a PC, and much of what's specified is already done in your case. You'd need to remove the hybrid MBR, as noted earlier, rather than convert from MBR to GPT. Mostly you'd need to do the things on the second half or so of the second page of the procedure. Note that I've never done this on a Mac, and I don't know of a site that gives Mac-specific instructions for this (although such a site might exist), so if you try it you may be a trail-blazer.