Windows detects GPT disk as MBR in EFI boot

This disk is OCZ VERTEX 128GB SSD. It is formatted as GPT from OSX. The disk layout is,

/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *128.0 GB   disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                 Apple_RAID                         63.8 GB    disk1s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk1s3
   4:       Microsoft Basic Data ssdwin                  63.9 GB    disk1s4

I'm trying to install windows7 in the "ssdwin" partition but when i EFI Boot windows 7 64bit USB installer, it says,

Windows cannot be installed to this disk. The selected disk has a mbr partition table, On EFI system window can only be installed to GPT disks.

But my disk is GPT disk. any idea how i can recover from this ?


Did you happen to use Apple's Disk Utility to create a FAT filesystem in that to-be-Windows partition? If so, you converted the disk from a legal GPT disk into a hybrid MBR disk, which OS X sees as GPT and Windows sees as MBR. The solution in this case is to clear the hybrid MBR data. A number of utilities can do this. I'll describe how to do it with my own GPT fdisk (gdisk) utility:

  1. Download GPT fdisk from its Sourceforge page and install it. (Versions are available for Linux, OS X, and Windows. I'll assume you'll do this from OS X.) Alternatively, you could run it from a Linux emergency disc like Parted Magic.
  2. Launch gdisk on your disk by typing sudo gdisk /dev/disk1 in a Terminal window. (Change the device identifier if it's not as you presented earlier or if you use another OS for the job.)
  3. Type p to view the partition table to verify you're working on the correct disk. If not, type q to quit without saving your changes and try again with another device.
  4. Type x to enter the experts' menu.
  5. Type n to create a fresh protective MBR. Note that gdisk won't confirm a change; it'll just show you a new experts' prompt.
  6. Type w to save your changes. You'll be asked to confirm this action. Do so.

With any luck this will fix the problem. If it doesn't, though, you can use gdisk's v option (on any menu) to have gdisk look for partition table problems. It can fix some minor problems automatically, but other times you'll need to make explicit changes. See the GPT fdisk documentation on GPT repairs for details.


El Capitan Addendum:

Apple's OS X 10.11 ("El Capitan") includes a new feature, known as "rootless" or "System Integrity Protection," which makes it difficult or impossible to run certain types of utilities, including GPT fdisk. To be sure, this new feature is intended to improve security by making it harder for malware to take control of the computer or for users to accidentally damage their own systems; but it also causes problems if you really need to use GPT fdisk or other third-party tools. If Apple's own tools permit removing a hybrid MBR, I don't know how it's done with them, so AFAIK this task really does require bypassing this new security feature.

There are several ways to work around this problem, such as:

  • Use a non-OS X OS, such as an Ubuntu installer booted into its "try before installing" mode.
  • Hold down Command+R as you boot your Mac to launch the Recovery environment, in which this feature is disabled. In theory, you should be able to run gdisk in this environment, although you might need to adjust the PATH environment variable. (I've not tried this approach, so there may be hurdles I've not considered.)
  • Boot to the Recovery environment, open a Terminal window, type csrutil disable, and reboot into your regular environment. This action disables the rootless system. You can re-enable it by performing these steps but pass enable rather than disable to csrutil.

For more on the subject of the rootless environment, see this page.