Windows partition not bootable after moving to GPT disk

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.

Answer

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.

Attribution
Source : Link , Question Author : Mona the Monad , Answer Author : Rod Smith

Leave a Comment