Mark Ulmer

Q: Win 8.1 Upgrade causes GPT/MBR Mismatch

I am responsible for 9 Mac minis (late 2012) in a computer training lab. I set them up last summer to dual boot Windows 8 Pro using Boot Camp. Recently, I tried upgrading one of the minis to Windows 8.1. The upgrade downloaded from the Microsoft Store and installed with no issues. Or, so I thought. Everything continued to work as before and I had no problem booting back and forth between the two operating systems. It wasn't until I attempted to make a disk image backup of the computer using Clonezilla that I discovered there was a problem. Clonezilla displayed the error message "This disk contains mismatched GPT and MBR partition" and would not do the backup. Thus began a lengthy journey of discovery about MBR, GPT, gdisk, etc.

 

So, here's what happened. The Windows 8.1 upgrade automatically (with no input whatsoever from me) resized the BOOTCAMP partition to be about 350MB smaller than it was previously. I have no idea why it did this and I haven't been able to find any report of this anywhere on the internet. Anyway, in resizing the partition, Win 8.1 of course modified the MBR partition table. However, it did not modify the corresponding partition information in the GPT partition table.

 

I was able to fix this using gdisk to delete the GPT BOOTCAMP partion info and recreate it using the correct first and last sector numbers from the MBR partition table. This procedure is described in detail in this forum and other places on the internet. So, I'm good to go. But, I'm posting this here because I haven't seen any report of this issue anywhere else. If you have upgraded a previously installed BOOTCAMP partition to Windows 8.1, I strongly urge you to get gdisk (download at http://sourceforge.net/projects/gptfdisk) and run the verify (v) command to verify whether you have this issue. You can also verify by running

sudo gpt -r -vv show disk0.

 

Mark Ulmer

Mac mini, OS X Mountain Lion (10.8.5)

Posted on Feb 11, 2014 12:41 PM

Close

Q: Win 8.1 Upgrade causes GPT/MBR Mismatch

  • All replies
  • Helpful answers

Page 1 Next
  • by turbostar,

    turbostar turbostar Feb 11, 2014 9:41 PM in response to Mark Ulmer
    Level 4 (2,925 points)
    Feb 11, 2014 9:41 PM in response to Mark Ulmer

    Or get the 8.1 ISO and do a clean install on one machine then use winclone on the remaining 8 machines, not sure which method is faster

  • by sakman74,

    sakman74 sakman74 Feb 11, 2014 10:27 PM in response to Mark Ulmer
    Level 3 (748 points)
    Mac OS X
    Feb 11, 2014 10:27 PM in response to Mark Ulmer

    i mostly use clonezilla in the windows world. since i bought a mbp and plan on doing dual boot, i plan to use clonezilla to backup my system. but my backups have been mostly disk images, not specific partitions. I too plan to install windows 8 then upgrade to 8.1 via the microsoft store.

    not sure if i'll experience an issue using clonezilla yet, because i've not yet done a backup of a disk setup with more than one OS.

    Are you making a backup of the entire disk with the MBR, or just specific partitions ? this depends on what backup method you choose in clonezilla.

  • by turbostar,

    turbostar turbostar Feb 11, 2014 10:39 PM in response to sakman74
    Level 4 (2,925 points)
    Feb 11, 2014 10:39 PM in response to sakman74

    If cz lets you take the entire disk (both partitions) that seems by far the fastest, as winclone only captures the boot camp partition, which tends to be the harder one to manage for me

  • by sakman74,

    sakman74 sakman74 Feb 11, 2014 11:06 PM in response to turbostar
    Level 3 (748 points)
    Mac OS X
    Feb 11, 2014 11:06 PM in response to turbostar

    clonezilla will allow you to backup individual partitions or the entire disk, with any MBR data that's present. i'm a big fan of clonezilla, been using it for years. whenever i did wind up in a bind with my windows install, i would restore the disk from a backup and be back up and running in less than a 1/2 hr. backups for about 40GB of data only took around 10-15 mins. hands down the best free backup/restore tool out there.

  • by Mark Ulmer,

    Mark Ulmer Mark Ulmer Feb 12, 2014 6:02 AM in response to sakman74
    Level 1 (0 points)
    Feb 12, 2014 6:02 AM in response to sakman74

    I'm using Clonezilla to make an image of the entire disk (all partitions). I like it because I can use one tool to back up both operating systems at the same time. Also, it only copies sectors that are in use, unlike some disk imagers that make a bit-for-bit copy of everything including unused space. So, it's fast.

     

    If you do install Win 8 and then upgrade to 8.1 from the store, make sure you check after the 8.1 upgrade completes to make sure it hasn't resized your BOOTCAMP partition.

  • by BobTheFisherman,

    BobTheFisherman BobTheFisherman Feb 12, 2014 7:10 AM in response to Mark Ulmer
    Level 6 (15,741 points)
    Feb 12, 2014 7:10 AM in response to Mark Ulmer

    Windows 8.1 is not yet supported by Boot Camp. So I would hold off on upgrading your other computers.

  • by sakman74,

    sakman74 sakman74 Feb 12, 2014 7:23 AM in response to BobTheFisherman
    Level 3 (748 points)
    Mac OS X
    Feb 12, 2014 7:23 AM in response to BobTheFisherman

    Bob,

    for my case (different from the OP's), I will hold off on installing 8 on my mbp. Just because I don't want to risk the Windows 8.1 installer tinkering with Partition resizing and MBR disparities.

    So now it's a waiting game for me, not ideal though because I am hanging onto my HP laptop until I've completed the Windows transition on my mbp sucessfully.

     

    Mark,

    Thanks for the advise. The best option for me (although not ideal at the moment) is to wait it out for Bootcamp driver support, then I can install 8.1 straightaway rather than do it in 2 steps (8 --> 8.1). good thing I peeked at this discussion, I would have otherwise done the installation beginning with 8.

    Clonezilla is quite powerful and I like it's speed and versitility. It also lets you restore partitions to larger partitions in the event of upgrading the drive/storage. Don't think it works with full disk images though ....

  • by sakman74,

    sakman74 sakman74 Feb 14, 2014 8:24 AM in response to Mark Ulmer
    Level 3 (748 points)
    Mac OS X
    Feb 14, 2014 8:24 AM in response to Mark Ulmer

    So I wound up going in the same direction as the OP for getting windows 8.1 on my machine. My dilemma was that at the time I went to buy Windows, Boot Camp didn't support 8.1, so I wound up with Windows 8.

    I thought I could install 8.1 clean if I downloaded the ISO but it wouldn't work with a Windows 8 Product key.

    Anyway, I installed 8, then upgraded to 8.1 and everything seems fine. I can boot into either OS. But I should check to see if the MBR is proper according to the Partition size.

  • by turbostar,

    turbostar turbostar Feb 14, 2014 8:34 AM in response to sakman74
    Level 4 (2,925 points)
    Feb 14, 2014 8:34 AM in response to sakman74

    You can clean install 8.1, google that very phrase requires using an activation key that is different than your specific product key

  • by Mark Ulmer,

    Mark Ulmer Mark Ulmer Feb 14, 2014 9:45 AM in response to sakman74
    Level 1 (0 points)
    Feb 14, 2014 9:45 AM in response to sakman74

    sakman74, I would definitely recommend checking whether you have the mismatch issue. Hopefully not. But, if you do, it's a disaster waiting to happen, even if everything seems to be OK right now.

  • by sakman74,

    sakman74 sakman74 Feb 14, 2014 10:21 AM in response to Mark Ulmer
    Level 3 (748 points)
    Mac OS X
    Feb 14, 2014 10:21 AM in response to Mark Ulmer

    Mark, why do you say that ? If the machine boots up fine into either OS, then I don't see an issue. I will do a clonezilla soon, before then I'll check the integrity of the MBR. If I spot the same problem I'll post back my findings ...

  • by Mark Ulmer,

    Mark Ulmer Mark Ulmer Feb 14, 2014 2:35 PM in response to sakman74
    Level 1 (0 points)
    Feb 14, 2014 2:35 PM in response to sakman74

    Well, for one thing, Clonezilla won't work. That's what first clued me in that I had a problem. For another, if you ever attempt to upgrade OS X (to Mavericks, for instance), you will likely lose your BOOTCAMP partition. There are many reports of Mavericks upgrade problems when any partition changes have been made.

  • by sakman74,

    sakman74 sakman74 Feb 15, 2014 8:56 AM in response to Mark Ulmer
    Level 3 (748 points)
    Mac OS X
    Feb 15, 2014 8:56 AM in response to Mark Ulmer

    so performing the steps in the OP would fix this, correct ? ill take care of it today in case an OS 10 updates comes out soon ...

  • by Mark Ulmer,

    Mark Ulmer Mark Ulmer Feb 15, 2014 1:15 PM in response to sakman74
    Level 1 (0 points)
    Feb 15, 2014 1:15 PM in response to sakman74

    Yes. First, download gdisk (URL in the OP) and run the installer package. Then run gdisk from a terminal window and run the v (verify command). If verify indicates no problems, then you're good to go and can just type "q" to quit. However, if it shows something like this, then you have the problem:

     

    sudo gdisk /dev/disk0

    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!

     

    Next, display the MBR partition table and make note of the start and end sectors for your BOOTCAMP partition. This should be partition 4 unless you've added additional partition(s), which is not officially supported by Boot Camp. It should show something like this:

     

    Command (? for help): r

    Recovery/transformation command (? for help): o

     

    Disk size is 1953525168 sectors (931.5 GiB)

    MBR disk identifier: 0x7C170CB2

    MBR partitions:

     

    Number  Boot  Start Sector   End Sector   Status      Code

       1                     1       409639   primary     0xEE

       2                409640    975693095   primary     0xAF

       3             975693096    976962631   primary     0xAB

       4      *      976963584   1952806911   primary     0x07

      

    Next, display the GPT partition table information. Compare the start and end sectors for partition 4 to the MBR partition 4 start and end sectors. Most likely the start sectors will match, but the end sectors will be different.

     

    Recovery/transformation command (? for help): m

    Command (? for help): p

     

    Number  Start (sector)    End (sector)  Size       Code  Name

       1              40          409639   200.0 MiB   EF00  EFI System Partition

       2          409640       975693095   465.1 GiB   AF00  Customer

       3       975693096       976962631   619.9 MiB   AB00  Recovery HD

       4       976963584      1953523711   465.7 GiB   0700  BOOTCAMP

     

    Next, delete the GPT partition 4. (Note: this does not delete the actual partition from disk. It only deletes gdisk's in-memory representation of the GPT).

     

    Command (? for help): d

    Partition number (1-4): 4

     

    Now, create a new partition 4 using the start and end sector values from the MBR partition 4.

     

    Command (? for help): n

    Partition number (4-128, default 4): 4

    First sector (34-1953525134, default = 976962632) or {+-}size{KMGTP}: 976963584

    Last sector (976963584-1953525134, default = 1953525134) or {+-}size{KMGTP}: 1952806911

    Current type is 'Apple HFS/HFS+'

    Hex code or GUID (L to show codes, Enter = AF00): 0700

    Changed type of partition to 'Microsoft basic data'

     

    Now, change the name of the new partition 4 to BOOTCAMP:

     

    Command (? for help): c

    Partition number (1-4): 4

    Enter name: BOOTCAMP

     

    Run the verify command. It should report no problems. If it still reports a problem, quit (q command) and start over.

     

    Command (? for help): v

     

    If everything checks out, write new partition table to disk and exit.

     

    Command (? for help): w

     

    Reboot and test your dual boot setup to verify all is working correctly.

Page 1 Next