People view Winclone as a cloning and backup/restore utility, but one key function that Winclone does is make sure Windows boots on your Mac. This may sound straight forward, but it gets complicated pretty quickly depending on the version of Windows and the Mac hardware.
Windows can boot two different ways: EFI and what I call ‘legacy’. Legacy is based on a master boot record and is the way that Windows booted until EFI booting was introduced. EFI booting was supported on Windows Servers first, and Windows 7 had some limited support, but it was not until Windows 8 was EFI booting fully supported on Mac hardware.
When you first boot your Mac, and hold down the option key, then firmware on the Mac scans the available drives and needs to determine if Windows should be booted via EFI or via legacy booting. New Macs (generally around 2014) stopped supporting legacy booting and only supported EFI booting. It is easy to tell this hardware, since it Apple has a kbase that shows that those models support Windows 8 and later.
Assuming the hardware supports both EFI and legacy booting, the Mac hardware first looks to see if any of the attached drives have a hybrid Master Boot Record (MBR). A hybrid MBR is unique to the Mac since it takes a standard guard MBR provide by GPT disk and populates the first 4 partitions with partition information from the first 4 GPT partitions. The Windows partition is “flagged”, or marked as the Windows bootable partition. The MBR takes up first 512 bytes of the drive, of which 446 are the boot strap code and the remaining bytes are taken up by the MBR partition table. If this setup is detected, the legacy boot mode is selected.
Legacy Boot Mode
During legacy boot mode, Windows starts by booting from the boot strap code in the MBR. This small piece of code is responsible for reading the MBR partition table, finding the flagged partition and passing off control to the Volume Boot Record (VBR). The VBR is the first 16 sectors (or 8k) of the Windows partition. The VBR is the second stage of Windows booting, and is responsible for finding the BCD (normally located /Windows/Boot folder). The BCD is a configuration file that gives boot options on how the system is booted. This is normally related to Windows and not the Mac hardware, but the BCD does contain references to the partition that is being booted from.
If the MBR partition table is not a hybrid MBR partition table, but is a standard guard MBR, and the Mac supports EFI booting, the Mac firmware starts EFI booting.
EFI Booting Windows
Every GPT disk has a special partition, called EFI, that is located as the first partition. It is 200MB and contains file files needed to boot Windows in EFI mode. Specifically, it contains an EFI folder, and inside the EFI folder is Boot and a Microsoft folder. The Boot folder contains the code similar to the Volume Boot Record that starts the Windows boot process. The file inside the Boot folder is called bootx64.efi. The bootx64.efi looks in the EFI/Microsoft/Boot folder for boot options, including boot screen, language localization of the initial boot process, and the BCD. The BCD is important because it not only provides boot options, but specifies the partition(s) that contain Windows. The BCD can be set to automatically start booting a specific Windows partition, which is normal for booting Windows on a Boot Camp partition.
If Windows is having trouble booting on your Mac, there are some key indicators that let you know what mode Windows is booting in.
- If you see plain text that says “Invalid Partition table” or “error loading operating system” or “missing operating system” on a black screen, the Mac is booting in legacy mode.
- If you do not see a blank black screen with a cursor prior to an error message in a GUI interface (like blue screen of death), you are in EFI mode.
- Only newer Macs support EFI booting of Windows, and older Macs may only support legacy. Macs between 2012 and 2014 generally supported both. This is important because Windows 7 should be legacy booted, and if your newer Mac does not support legacy booting, Windows 7 will not boot.