12

My goal is to access NTFS partitions on a 6TB external HDD in Windows 11 that already has a valid GPT created in Linux. The problem is Windows 11 mounts the drive using MBR.

both Windows Disk Management and the utility I'm using called Disk Genius sees the HDD as MBR

disk genius

I attempted to convert the MBR to GPT and it looks like it's trying to create a whole new GPT as Disk Genius reports no space to create GPT:

enter image description here

Before I go any further, can I simply make Windows 11 read and use the existing GPT that Linux created?

I've read a lot of articles on converting MBR to GPT and realize this is not what I want to do - I just want to use what already exists. I don't need to create a new GPT.

For completeness, here is what the GPT looks like in Linux (the 120GB partition I want to use in Windows 11 is /dev/sdc14):

# fdisk -l /dev/sdc
Disk /dev/sdc: 5.46 TiB, 6001175126016 bytes, 11721045168 sectors
Disk model: USB 3.0 Destop H
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 4FBB78E0-201B-4A5B-A745-C0E797DF98D9

Device           Start         End    Sectors   Size Type
/dev/sdc1         2048     2099199    2097152     1G EFI System
/dev/sdc2      2099200    63326207   61227008  29.2G Linux filesystem
/dev/sdc3    105269248   149309439   44040192    21G Linux filesystem
/dev/sdc4    168183808   210126847   41943040    20G Linux filesystem
/dev/sdc5     63326208   105269247   41943040    20G Linux filesystem
/dev/sdc6    449202176   465979391   16777216     8G Microsoft basic data
/dev/sdc7    465979392  5860855807 5394876416   2.5T Linux filesystem
/dev/sdc8   5860855808  5860857855       2048     1M Microsoft basic data
/dev/sdc9   5860858456  5938983447   78124992  37.3G Apple APFS
/dev/sdc10  5939245592  9767921663 3828676072   1.8T Apple HFS/HFS+
/dev/sdc11  9768183808 10002558807  234375000 111.8G Apple APFS
/dev/sdc12 10002558808 10393183807  390625000 186.3G Apple APFS
/dev/sdc13 10393184256 11064272895  671088640   320G Linux filesystem
/dev/sdc14 11064272896 11315931135  251658240   120G Microsoft basic data

here is the MBR of the same disk:

# fdisk -t dos -l /dev/sdc
Disk /dev/sdc: 5.46 TiB, 6001175126016 bytes, 11721045168 sectors
Disk model: USB 3.0 Destop H
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x8a9e2113

Device     Boot     Start       End  Sectors  Size Id Type
/dev/sdc1               1   2099199  2099199    1G ee GPT
/dev/sdc2  *      2099200  63326207 61227008 29.2G 83 Linux
/dev/sdc3       105269248 149309439 44040192   21G 83 Linux
/dev/sdc4       168183808 210126847 41943040   20G da Non-FS data

Partition 1 does not start on physical sector boundary.
2
  • Has the disk always been external? What does a Linux fdisk -t dos -l show for this disk – does it agree with Disk Genius or does it show a proper Id: ee GPT-protective partition? Commented Jul 11 at 16:15
  • the disk has always been external. I added MBR output to my question and see the GPT partition. I no longer need to boot off this disk using EFI - can we simply nuke the MBR and preserve the GPT partition? I assume UEFI booting will work just fine off GPT? (and even if I can't, I'm happy to use this HDD as a data disk for both Windows and Linux) Commented Jul 11 at 17:04

1 Answer 1

20

Every GPT disk also has an MBR partition table, for compatibility reasons, although normally the MBR of such a disk is supposed to have only a single "GPT protective" partition (type code 0xEE) that covers the entire disk – or as much of the disk as a MBR can cover, anyway – and just tells old software that the disk is non-empty; a modern OS would ignore it and only look at the GPT.

But your disk seems to have "hybrid" partitioning where both partition tables have valid (and conflicting) information – quite strangely, the protective partition is present but has been shrunk to add stuff alongside it – so it's very possible that both Windows and Disk Genius prioritize the MBR over the GPT in such situations.

(Upon a closer look, it seems that the MBR is an old copy of the GPT with only the first four partitions present, and the strange protective partition stands in for the EFI system partition. Either somebody got the partition type wrong – an ESP would be type 0xEF, not 0xEE – or deliberately wanted to disguise the ESP so that the firmware would ignore it?)

Converting this MBR to GPT would be the opposite of what you want, since it would replace your valid GPT partitions with useless ones converted from the outdated MBR, so it's fortunate that it did not succeed. (Although you could recover them by hand from the list in your post.)

Instead, since the MBR currently has useless information, you should replace it with a standard "protective" MBR. The easiest way to do this is with the gdisk (aka "gptfdisk") tool from Linux:

  1. gdisk /dev/sdc;
  2. Main menu: x to enter the "Expert" menu;
  3. Expert menu: (optional) o to take a look at the current MBR;
  4. Expert menu: n to generate a new protective MBR;
  5. Expert menu: (optional) o to take a look at the newly generated MBR;
  6. Expert menu: (optional) p to make sure the GPT hasn't gone anywhere;
  7. Expert menu: w to write the new partition tables to disk.

(This could be achieved with fdisk, but would take more steps and need more care.)

The end result should look exactly like this – i.e. only one partition that is as large as possible:

# fdisk -t dos -l
Device     Boot Start        End    Sectors Size Id Type
/dev/sdc1           1 4294967295 4294967295   2T ee GPT
#
6
  • 2
    wow this worked and so simple! (I had to reboot into Ubuntu Server to get access to gdisk, prev distro based on busybox would require me to do it the long way) Gave Disk Genius the boot and Windows Disk Management sees the NTFS partition and manages it perfectly. Time to offload a ton of apps - thanks again! 🙏 Commented Jul 11 at 17:48
  • 1
    ps. had a sfdisk -d and sgdisk --backup and cloned the disk last night - I've been down the wrong road (eg. not backing up before muddling w partitions too many times to lose unnecessary stress over lol)) Commented Jul 11 at 17:56
  • just a heads up I went to image partitions using Clonezilla and it complained about mismatched GPT & MBR on this drive. it recommended I nuke the MBR using sudo dd if=/dev/zero of=/dev/sdx bs=512 count=1 - promptly did it and now it is able to continue. Commented Jul 23 at 18:51
  • thought I was home free - after reading an entire partition and creating an image file, one of the last steps of Clonezilla is to check the integrity of the partition table and it gets a RETVAL=1 when it goes to read the partition table and errs out saying Failed to save the partition table for this disk: sdb I run gdisk and it says it found a “corrupt MBR” and will write a new protective MBR on save - I’ve used Clonezilla on this drive before - how can we get the partition table back to a consistent state where everyone is happy? I’m willing to ditch Windows reading this drive now. Commented Jul 23 at 19:00
  • had gdisk write a new MBR, rebooted & drive appears to be fine - even Clonezilla is happy again w the new MBR. any ideas on what might have happened given we used gdisk to write a new protective MBR last time? Commented Jul 23 at 19:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .