Upgrade to Yosemite failed - MBR and GPT don't match? Upgrading to Yosemite so I can install the newest version of xCode.
Shortly after starting I get this error:



I've tried going into Disk Utility and repairing permissions, but even though it says it's repairing things, when I run it again the same errors show up.

Not sure what to do here.

Edit: Disk Manager



Edit 2: GPT and FDisk:



Edit 3: in response to n1000  

Command (? for help): v

Warning! Mismatched GPT and MBR partition! MBR partition 4, of type 0x07,
has no corresponding GPT partition! You may continue, but this condition
might cause data loss in the future!

Identified 1 problems!

Command (? for help): ?
b   back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): r

Recovery/transformation command (? for help): ?
b   use backup GPT header (rebuilding main)
c   load backup partition table from disk (rebuilding main)
d   use main GPT header (rebuilding backup)
e   load main partition table from disk (rebuilding backup)
f   load MBR and build fresh GPT from it
g   convert GPT into MBR and exit
h   make hybrid MBR
i   show detailed information on a partition
l   load partition data from a backup file
m   return to main menu
o   print protective MBR data
p   print the partition table
q   quit without saving changes
t   transform BSD disklabel partition
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu
This post explains the procedure. Now is probably a good time to make a backup. Then proceed at your own risk...


Get gdisk
In Terminal: sudo gdisk /dev/disk0
Press v to verify your MBR
Press r and then o to list the MBR partition table
Press m and then p to display the GPT partition table information
Compare the numbers for partition 4 from the MBR and GPT tables. The start numbers should match, but the end numbers will probably be off.
Press d to delete the GPT partition 4 (Bootcamp). "Note: this does not delete the actual partition from disk. It only deletes gdisk's in-memory representation of the GPT."
Press n to create a new partition 4 (Bootcamp) using the start and end sector values from the MBR partition 4
Change the name of the new partition 4 to BOOTCAMP
Press v to verify
If no errors occurred: press w to write the new partition table
If errors occurred: press q and try again
Reboot


The important part is step 7 where you sync your GPT and MBR. Note that some of the commands (e.g. disk0, partition 4) may be different in your case. Please adapt them accordingly.