0

I had originally installed Windows 10 on an external hard drive (MBR) as a single partition (boot and system on the same partition) so I could use rEFInd to boot into it from my MacBook. Because I didn't want to carry an extra external hard drive with me whenever I needed to use Windows 10, I used GParted to move (well, copy) the whole Windows partition verbatim to some empty space in the internal GPT disk within my MacBook. I already had a feeling that it wouldn't be so simple, because it's no longer bootable. Upon selecting it from rEFInd, I am confronted with something like "No bootable device found". I am aware that there normally shouldn't be just one partition for Windows (ESP, MSR, etc), but I'm not sure how to migrate my single-partition Windows partition from my external MBR hard disk to my internal GPT hard disk. Is there something in the Windows boot files that needs to be modified in order to boot? Do I screw with EFI? Should I reinstall Windows (I want to avoid doing this)?

Edit: I plan to have many OSes installed into the internal hard disk, and will probably be moving them around, resizing them, etc., so I'd also want to know how Windows would react to its containing partition being moved around on occasion on a GPT disk.

3
  • Should I reinstall Windows - Yes; You should
    – Ramhound
    Commented May 30, 2017 at 22:02
  • You shouldn't move the Windows partition unless you know what your doing and know how to manually modify the bcd to point to the new location
    – Ramhound
    Commented May 30, 2017 at 23:04
  • Might there be any way to do that? Commented May 31, 2017 at 2:25

2 Answers 2

1

Background:

Intel-based Macs use Extensible Firmware Interface (EFI) firmware, which is a replacement for the older Basic Input/Output System (BIOS) firmware used on most PCs from the 1980s until about 2011. In the past, Windows has booted on Macs by using the Compatibility Support Module (CSM). The CSM is an optional EFI feature that enables older BIOS-mode boot loaders to run, thus providing backward compatibility to EFI-based computers. Booting via the CSM is often called legacy-mode booting, or something similar.

On Macs, the CSM is activated when the computer detects an MBR disk. (This includes a GPT disk with a hybrid MBR; more on that shortly.) Note that an active CSM does not necessarily mean that the computer will boot in BIOS/CSM/legacy mode, just that it might boot in that way.

Thus, when you copied your Windows installation from the MBR external disk to the GPT internal disk, you essentially disabled the CSM. (This assumes that the GPT disk does not have a hybrid MBR, and that the external disk was unplugged.) Just as important, though, Windows itself refuses to boot from GPT disks in BIOS mode, and your Windows installation lacks an EFI boot loader.

Possible Solutions:

Offhand, three possible solutions spring to mind:

  • Re-install Windows -- This is the most straightforward solution to describe, and it's the one that's most likely to work without problems. OTOH, if you've invested a lot of time installing software, etc., you might not like this solution. If you go this route, I strongly recommend doing a native EFI-mode installation, not one that uses a hybrid MBR and BIOS/CSM/legacy-mode booting.
  • Install an EFI-mode boot loader for Windows -- This is possible, but the procedure is a bit tedious. See this page for one explanation of how to do it. That page, though, is written for people who want to convert existing Windows 7 installations from BIOS-mode to EFI-mode booting on UEFI-based PCs. By copying your installation from an MBR to a GPT disk, you've effectively already done the MBR-to-GPT conversion, so you can skip that part.
  • Create a hybrid MBR and install the BIOS-mode Windows boot loader -- You can use my GPT fdisk (gdisk), gptsync (which comes with rEFIt and rEFInd), or perhaps some other tools, to create a hybrid MBR on your internal disk. This will activate the CSM when you boot; but you'll still need to install the Windows boot loader to the disk using Windows tools. I'm not a Windows expert, so I can't say precisely how to do this. Note that hybrid MBRs are ugly and dangerous! I've seen many reports from people who've trashed their installations because of mistakes they've made in handling hybrid MBRs. If you understand them, the risks go down; but I still recommend avoiding hybrid MBRs whenever possible.

I'd recommend these options in roughly the order in which I list them; however, your own needs, which of course I don't know, may override my recommendation on this issue. Using a hybrid MBR, though, is no longer a good option, IMHO. Windows 7 and earlier was next to impossible to boot in EFI mode on Macs, but AFAIK Windows 10 boots on (almost?) all Macs in EFI mode without problems, so there is likely no good reason to use a hybrid MBR to boot it. I mention this option for completeness and on the off chance that you have some compelling reason to use this approach.

6
  • Pertaining to installing an EFI boot loader, since I already have an existing EFI system partition at the beginning of the disk (boot, esp), would it be safe or terribly dangerous idea to (0) put the Windows EFI boot files in the existing ESP alongside what came with the Mac, or (1) create a second EFI system partition on which to place the boot files? Commented Jun 3, 2017 at 18:01
  • The ESP is meant to be shared between OSes, so putting the Windows boot files on the existing ESP is perfectly appropriate. In fact, the last time I checked (in the Windows 7 era), the Windows installer becomes confused by disks with multiple ESPs, so it's probably safer to use just one. That said, as the ESP is a critical shared partition, I recommend keeping a backup of it so that you can restore it should something go badly wrong.
    – Rod Smith
    Commented Jun 4, 2017 at 0:48
  • Since I am using an internal disk, even if I were to backup the ESP, if something had somehow gone wrong with it, how would I go about restoring it? Also, since Windows installations usually require more than just the main partition, do I need to allocate any space for other things like the MSR? Commented Jun 4, 2017 at 20:00
  • Also, I'm a little stuck at repairing the Windows boot files. "Letting the disk do its thing" failed, so I attempted a manual repair using diskpart to find the EFI partition and bootrec to repair it. That didn't work, either, because it could only see two partitions, neither of which being the EFI partition. Commented Jun 4, 2017 at 21:29
  • If the ESP is completely trashed, you'll need to use an emergency disk to restore it, so you'd either store your backup on an external disk or use an emergency disk that can read wherever you've stored the backup. (The ESP is quite small, so even a small modern USB flash drive should hold most ESPs.) The Windows installer will create whatever partitions it needs, and procedures for converting from BIOS-mode to EFI-mode booting describe creating the necessary partitions.
    – Rod Smith
    Commented Jun 5, 2017 at 14:16
0

Your question doesn't have anything to do with GPT vs MBR, those are just different ways to initialize the disk. GPT is the newer way but it's only supported by newer versions of Windows.

If you want to dual boot Windows and OS X on the same machine, you need to use Bootcamp from within OS X. Running Bootcamp will let you resize the internal drive, and then you can boot from it into the Windows setup (from USB stick) and install Windows on that partition. Once you do that, you need to install Bootcamp for Windows (drivers and utilities) and that will let you boot back into OS X. Once you have Windows setup, you can boot back into OS X and then setup a third party boot loader that will give you a nice menu option to choose what OS to boot in when the computer starts.

My advice to you is read more about using Bootcamp.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .