Update 1
This step will involve configuring Master Boot Record (MBR) of your physical internal drive. The MBR is stored on the first 512 bytes of this drive. This space is shared by boot code and the MBR partition table.
This step can not be preformed under OS X 10.11 (El Capitan) with System Integrity Protection (SIP) turn on. (This is the default setting.) If you are using OS X 10.11, you must disable SIP, complete this step, then restore SIP. See the link: How do I disable System Integrity Protection (SIP) AKA “rootless” on OS X 10.11, El Capitan?.
In a Terminal application window, enter the following commands. The first fdisk
command flags the Windows partition as the active partition. The second fdisk
command changes the Windows partition id to 7.
INPUT=$(printf "f 4\nq\ny")
sudo fdisk -e /dev/disk0 <<<"$INPUT" &>/dev/null
INPUT=$(printf "s 4\n7\nq\ny")
sudo fdisk -e /dev/disk0 <<<"$INPUT" &>/dev/null
You may need to restart your computer after completing this step.
Original Answer
The command fdisk
displays the contents of the Master Boot Record (MBR) partition table. This table can only contain 4 entries and is stored at address 0 of your disk. The command gpt
displays the contents of the GUID partition table (GPT). This table can contain 120 entries and starts at address 1 of your disk. (A backup GPT is also stored at the end of the disk.) Legacy systems use a MBR scheme while more modern computers use a GPT scheme. Normally, OS X uses a GPT scheme. When the GPT is employed, the MBR table still exists, but is now called a Protective Master Boot Record (PMBR) table. This PMBR table contains a single entry with ID of EE
. This fools any legacy applications, that only use a MBR scheme, into seeing the disk as occupied by a single partition.
Older Mac computers install Windows using the MBR scheme. It is my understanding this is also a requirement for Windows 7 installations. To accommodate both schemes simultaneously, Apple shrinks the EE
partition in the MBR table to end at the same location as the first partition in the GPT. Usually, the next three partitions in the GPT match the last three partitions in the MBR table.
Anyway, as far as I can tell, if you enter the command given below in a Terminal application windows, your partitions should be fixed.
sudo diskutil eraseVolume "Free Space" name /dev/disk0s4
While the above command should fix the partitioning, the 4th partition in the MBR partition table will not be marked as "active". So if you still can not boot to Windows, let me know and I will include steps to mark this partition as "active".
Best Answer
Thanks to David Anderson in the comment section.
I used that terminal command:
and it worked!
Thanks again!