4

Trying to match partitions seen from Windows with those seen from Linux is mostly not that complicated, but isn’t always straightforward. In trying to do this I’ve found there are a lot of things that I don’t quite understand. Let me know if I’ve got any of this wrong.

GPT (GUID Partition Table) implies that each partition has a unique identifier, which in Linux jargon seems to be the PARTUUID. This doesn’t seem to be used much for mounting disks and programs like disks and gparted usually list the UUID which is part of the file system on the partition, whereas the PARTUUID is stored in the partition table. Both UUIDs and PARTUUIDs are listed by blkid.

Linux can still also use the traditional physical layout descriptors (/sda1 etc) or labels as identifiers.

Windows (or at least diskpart) divides disks into volumes containing partitions and seems to number disks and volumes starting at 0, but partitions starting at 1. The order seems to be equivalent to physical when Windows is installed, but chronological after that, i.e. if you add partitions they will be numbered as added.

Windows also assigns UUIDs to partitions, but I can’t see that they relate to any of the identifiers available in Linux.

I know I covered this ground some years ago and thought I’d found a way of getting PARTUUID in Windows, but if it’s possible, I can’t find out how.

Is there a way of doing this or unambiguously identifying a partition?

Moilleadóir
  • 186
  • 8

1 Answers1

3

There is a third party tool called GPT fdisk which can printout the unique partition UUID (GUID) stored in the GPT for a specified entry. The current Windows version can be download from SourceForge.

The syntax is shown below. Note that the command needs to be run as Administrator.

sgdisk32 --info=<partnum> <drivenum>: | find "unique GUID"

Where <partnum> is the partition number and <drivenum> is the drive number. For example, enter the following for partition 3 on drive 0.

sgdisk32 --info=3 0: | find "unique GUID"

Example output:

Partition unique GUID: FCAE2A64-87EA-4919-A4C3-83CAFEDEB060

GPT fdisk is included with many Linux installations. The equivalent Linux syntax for the above example is given below, where the drive is assumed to SATA connected.

sudo sgdisk --info=3 /dev/sda | grep "unique GUID"