1

I have an external HDD which appear to have both MBR and GPT. The result is that Windows reads different partitions than Ubuntu and OS X. The GPT seems correct to me (I can access and use the disk fine in Ubuntu and OS X), while the MBR has an old partition table. Is there a way to remove the MBR/fix this issue without wiping the drive?

Output from fdisk -l:

Disk /dev/sdb: 3,7 TiB, 4000787029504 bytes, 7814037167 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
Disklabel type: gpt
Disk identifier: 6D14A59C-0E35-4D79-AFC2-DEC63ACAA2E2

Device          Start        End    Sectors  Size Type
/dev/sdb1        2048 6176047103 6176045056  2,9T Microsoft basic data
/dev/sdb3  6176047104 7813774983 1637727880  781G Apple HFS/HFS+

From OS X diskutil list

/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *4.0 TB     disk2
   1:       Microsoft Basic Data maxntfs                3.2 TB     disk2s1
   2:                  Apple_HFS TMm                     838.5 GB   disk2s3

Screenshots from Windows 10 disk management (as links, too low rep for images):

screen1 screen2

  • 1
    I guess Linux utility gdisk could handle this, at the moment I cannot tell for sure though. Its author Rod Smith is with us on Super User. It seems he's quite active here, helping fellow users. Your situation seems to fit what he described here: "It's possible for the GPT and MBR partition sets to contradict each other". – Kamil Maciorowski Jul 12 '17 at 18:53
  • 1
    Thanks for the link @KamilMaciorowski, I learned something new and was not aware of the gdisk utility. The marked answer, using gdisk, solved the issue. – rhkarls Jul 13 '17 at 10:28
3

gdisk (“GPT fdisk”) has a one-step(-ish) option to create a protective MBR.

$ gdisk /dev/sdb
x
n
w

This will:

  1. Launch gdisk
  2. Enter expert mode
  3. “create a new protective MBR”
  4. write table to disk and exit”

It may even detect the problem and offer to fix it right away. You currently have a so-called Hybrid MBR, though it’s out of sync.

  • Creating the protective MBR worked, I can access the partitions in Windows now! Thanks a ton! – rhkarls Jul 13 '17 at 10:26
  • 1
    FWIW, the OS X Disk Management tool creates a hybrid MBR when you create a FAT partition on a disk. (There are other ways to create hybrid MBRs, too.) The hybrid MBR can then get out of sync in various ways, which is quite dangerous. Although hybrid MBRs are useful in some limited situations, they've been overused by various tools and online procedures. It's best to avoid them whenever possible. – Rod Smith Jul 13 '17 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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