0

I was under the impression that Windows just required the drive it boots from to be MBR when booting in BIOS mode, hence the hybrid MBR setup created by Bootcamp on my Macbook Air 2012 (this model doesn't officially support UEFI). This would explain why Windows treats the system drive as MBR.

As it turns out, even USB drives with pure GPT are detected as MBR, and that surprises me. Surely booting in legacy mode doesn't prevent the OS from reading and detecting the GPT? But that's what it looks like.

I'm positive that the drive has a protective MBR since I just generated one with gdisk before booting back into Windows.

Strangely enough, even though both Windows' own partition manager as well as EaseUS Partition Master tells me the drives are MBR (although, EaseUS tell me they don't support or test on Bootcamp), they all detect and list the actual GPT partitions. I can also use the partitions normally in Explorer. If they truly treated the drives as MBR, they'd have hit the protective MBR and only shown me one large partition. I find it a bit confusing and contradictory.

Could someone explain what's going on?


Update

So, I originally had the external drives A (hybrid MBR) and B (MBR). I converted these to pure GPT withgdisk by generating a protective MBR, and by just doing an immediate write, respectively. This was done in Ubuntu. Windows still treated them both as MBR though, which led to this question.

I've now checked with gdisk on Windows and could confirm that drive A had reverted to having a hybrid MBR, and drive B now also had a hybrid MBR.

I once again generated a new protective MBR with gdisk in Ubuntu for the drives, booted into Windows and could confirm that the change had now stuck.

The only explanation I have for this is that I changed the partition names on the drives with Gparted after the first conversion to GPT. Since Gparted showed the "Name" column -- which only exists for GPT drives -- for drive B, I took that as a sure sign that Gparted had actually read the new GPT partition table from the drive. After all, drive B was pure MBR before the conversion so there is no other way Gparted can tell that it's now GPT.

For some reason, Gparted must have overwritten the protective MBR with a cached version of the disk's old MBR, which kind of doesn't make sense since, clearly, Gparted was aware that it was a GPT drive.

If Gparted was the source of the hybrid MBRs, then it was a mistake on my part to assume that editing a GPT exclusive field ("Name") would not impact the protective MBR.

0

Booting Windows using a hybrid MBR does not preclude using GPT only external drives.

Windows will show a hybrid MBR as MBR and a GPT only as GPT whether it is a system, internal or external drive. The protective MBR (type EE) is not the distinguising feature (GPT always has this) but rather the presense of hybrid MBR.

a conventional GPT disk contains a protective MBR with a single partition, of type 0xEE (EFI GPT), defined. This partition spans the entire size of the disk or 2 TiB, whichever is smaller. The intent is to keep GPT-unaware OSes and utilities from trying to modify the disk. A hybrid MBR is a variant on the normal protective MBR.

A hybrid MBR contains a type-0xEE partition, but it also contains up to three additional primary partitions, which point to the same space that's marked out by up to three GPT partitions.

See rodsbooks for more details.

For example, this is a bootcamp install. Using gdisk in Windows you can see both the MBR and GPT partition tables by using the r, o, p options.

For example, here I have 5 GPT partitions the first 4 matching in MBR and the last ignored.

PS C:\> .\gdisk64.exe \\.\physicaldrive0
GPT fdisk (gdisk) version 1.0.3

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): p
Disk \\.\physicaldrive0: 250069680 sectors, 119.2 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 569B72DC-B014-4DD3-B28A-A95CA047CBEE
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 250069646
Partitions will be aligned on 8-sector boundaries
Total free space is 263550 sectors (128.7 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System
   2          409640       172376718   82.0 GiB    0700  MacWindows
   3       172378112       180766719   4.0 GiB     2700  Recovery
   4       180766720       222709759   20.0 GiB    8300  Linux
   5       222709760       249807495   12.9 GiB    AF00  macOS

Recovery/transformation command (? for help): o

Disk size is 250069680 sectors (119.2 GiB)
MBR disk identifier: 0xEBD711AE
MBR partitions:

Number  Boot  Start Sector   End Sector   Status      Code
   1                     1       409639   primary     0xEE
   2      *         409640    172376718   primary     0x07
   3             172378112    180766719   primary     0x27
   4             180766720    222709759   primary     0x83

Recovery/transformation command (? for help):q

As you can see it is booting from partition 2, which is marked active under the MBR partition table.

So lets format a USB using GPT :

PS C:\> diskpart

Microsoft DiskPart version 10.0.17763.1

Copyright (C) Microsoft Corporation.
On computer: MACWINDOWS

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          119 GB      0 B
* Disk 1    Online         1927 MB      0 B 

As you can see disk 1 is not GPT.

DISKPART> select disk 1

Disk 1 is now the selected disk. 

DISKPART> clean

DiskPart succeeded in cleaning the disk.

DISKPART> convert gpt

DiskPart successfully converted the selected disk to GPT format.

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> format quick fs=ntfs

  100 percent completed

DiskPart successfully formatted the volume.

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          119 GB      0 B
* Disk 1    Online         1927 MB      0 B        *

And now it is formatted as GPT and seen by Windows as GPT - there is a * under the GPT heading. Then to check again this disk with gdisk :

PS C:\> .\gdisk64.exe \\.\physicaldrive1
GPT fdisk (gdisk) version 1.0.3

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): o

Disk size is 3948543 sectors (1.9 GiB)
MBR disk identifier: 0x00000000
MBR partitions:

Number  Boot  Start Sector   End Sector   Status      Code
   1                     1      3948542   primary     0xEE

Recovery/transformation command (? for help): p
Disk \\.\physicaldrive1: 3948543 sectors, 1.9 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): C78677AE-1DC1-49AA-BCC1-26DE8F72BCF6
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 3948509
Partitions will be aligned on 128-sector boundaries
Total free space is 188 sectors (94.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1             128         3948415   1.9 GiB     0700  Basic data partition

So this is fine - there is protective member from start to end of the disk. But what if we make a hybrid member? In gdisk use option 'h'

Recovery/transformation command (? for help): h

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 1
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): n

Creating entry for GPT partition #1 (MBR partition #1)
Enter an MBR hex code (default 07):
Set the bootable flag? (Y/N): n

Unused partition space(s) found. Use one to protect more partitions? (Y/N): n

Recovery/transformation command (? for help): p
Disk \\.\physicaldrive1: 3948543 sectors, 1.9 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): C78677AE-1DC1-49AA-BCC1-26DE8F72BCF6
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 3948509
Partitions will be aligned on 128-sector boundaries
Total free space is 188 sectors (94.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1             128         3948415   1.9 GiB     0700  Basic data partition

Recovery/transformation command (? for help): o

Disk size is 3948543 sectors (1.9 GiB)
MBR disk identifier: 0x4C7FBBF6
MBR partitions:

Number  Boot  Start Sector   End Sector   Status      Code
   1                   128      3948415   primary     0x07
   2                     1          127   primary     0xEE

Recovery/transformation command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to \\.\physicaldrive1.
Disk synchronization succeeded! The computer should now use the new
partition table.
The operation has completed successfully.
PS C:\>     

Now if we recheck in Windows, beacause it has hybrid MBR it is no longer seen as GPT even though there is still a protective MBR there - no notice the * has gone :

DISKPART> rescan

Please wait while DiskPart scans your configuration...

DiskPart has finished scanning your configuration.

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          119 GB      0 B
* Disk 1    Online         1927 MB      0 B

So you can see it isn't the presense of a protective MBR (type EE) that makes Windows see a drive as GPT it is the absense of a hybrid MBR.

  • I might be too tired at the moment, but I couldn't find an explanation in your answer for the contradiction between what I describe in my question and your assertion that "Windows will show a hybrid MBR as MBR and a GPT only as GPT". Did you read the question thoroughly? – Sirap Oct 31 '18 at 4:41
  • Can you update the question to show what gdisk shows for options 'r, o, p'. If there is only one EE partition covering the whole disk then it is GPT. Please show also DISKPART 'lisk disk'. If this is showing disk status wrong I can delete this answer - it it is how it works on my 2006 mbp and how it should work but there could be a bug. – lx07 Oct 31 '18 at 8:29
  • Thanks. I investigated with gdisk on Windows as you suggested and updated the question. TL;DR It looks as if my drives had been converted to hybrid MBRs (by unknown means) after my conversion to pure GPT. – Sirap Oct 31 '18 at 16:40

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.