0

For a GPT disk Microsoft DISKPART command

 list partition  

defines some partitions as Primary and similarly the Disk Management utility.
But the old primary/extended partitions of the MBR scheme is exactly what the GPT standard intends to go over.

For example the Windows partition, which in Microsoft jargon is defined as a Basic Data Partition (GUID EBD0A0A2-B9E5-4433-87C0-68B6B72699C7) is reported by DISKPART as Primary. Ironically, the Linux counterpart utility fdisk correctly reports it as Microsoft basic data

If converting the disk from basic to dynamic, BDPs are correctly reported with the type Dynamic Data.

I have looked for a reference to DISKPART terminology, with respect to list partition command, without luck. Also, in the current Microsoft GPT Implementation, there are no hints at this.

What exactly is this partition type? Is it just a friendly name for BDP partitions?

Edit

For someone it is unclear what I am asking. Sorry for that. Try with this:

Diskpart list part command labels some GPT partitions as Type: Primary. Since there is no definition of primary partitions in the GPT specs, can you kindly give:

  1. A definition of GPT primary partitions?
  2. An example of non-primary GPT partition?
7
  • Every GPT partition is equivalent to a MBR primary partition. I don’t think the terminology is confusing.
    – Daniel B
    Commented Aug 31, 2017 at 13:18
  • How do you get that partition? In my GPT HDD, it has ESP and MSR as system partitions.
    – Biswapriyo
    Commented Aug 31, 2017 at 13:18
  • @DanielB: Primary, extended with related logical partitions are all replaced by the new GUID partitions, so the choice is not so automatic. BTW, if every GUID=primary partition then the Type column become worthless. Perhaps only BCD=primary, but I haven't found an explicit reference, hence the post.
    – antonio
    Commented Aug 31, 2017 at 16:04
  • @Biswa: The default Win10 layout is System-MSR-Windows-Recovery, using diskpart type names: System-Reserved-Primary-Recovery, and this what I get with list part. I do not get what you mean by "as system partition". Informally they are all mandatory system partitions, formally (UEFI specs and MS) only ESP is.
    – antonio
    Commented Aug 31, 2017 at 16:22
  • 1
    I'm not an expert on diskpart specifically, but my suspicion is that it, like parted in Linux, simply applies the "primary" name to all GPT partitions. At the risk of tooting my own horn, if you want to really understand what's happening with your GPT disk, you should use my GPT fdisk (gdisk) tool, which was designed from the ground up for use on GPT disks. It shows you the GPT data structures without filtering them through an "MBR lens." (It does use shorthand type code notations, but you can see and use the true type code GUIDs if necessary.)
    – Rod Smith
    Commented Sep 1, 2017 at 1:17

3 Answers 3

1

Terminology can become confusing because some of it is more a matter of accepted practice than anything defined in formal standards documents and because people often mis-use terms. There are also differences in how people refer to things in different circles. For instance, Windows users often refer to partitions as "drives," whereas in Linux the term "drive" usually refers to a physical hard disk, and in macOS the term "volume" is often used for partitions. It's like the quip about British vs. American English: We're divided by our common language.

In any event, older partitioning tools that were designed for MBR and then adapted for GPT often apply the "primary" term to all GPT partitions. As you suggest, this is pointless at best and potentially confusing at worst, but the cause seems to be that the programs' data structures and/or user interfaces insist on having a "primary," "extended," or "logical" label to apply, and the one that's the closest fit for a GPT partition is "primary," so that's the one that's shown.

This is distinct from a partition's type code. Under MBR, this is a 1-byte value, often (but not always) presented in hexadecimal, such as 0x07 for NTFS (or HPFS) or 0x0c for FAT-32 LBA. Under GPT, the type code is a 16-byte GUID value, such as EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 for a Windows "basic data" partition (a normal FAT or NTFS partition) or C12A7328-F81F-11D2-BA4B-00A0C93EC93B for an EFI System Partition (ESP). These GPT type codes are awkward and difficult for humans to remember, so most tools either don't explicitly present them or present them by mapping them to a name or mnemonic code. These mappings tend to be unique for specific programs, though, so how Program A presents them is likely to be different from what Program B does. Note also that the mapping from MBR to GPT type codes is not 1:1. Sometimes there's a pretty clear mapping (such as MBR's 0x83, which is for Linux filesystems, which maps cleanly to 0FC63DAF-8483-4772-8E79-3D69D8477DE4 in GPT); but other times there may be no equivalent in one partition table scheme or the other (such as GPT's 21686148-6449-6E6F-744E-656564454649, which is for a BIOS Boot Partition, which has no MBR equivalent), or one code in one system may map to multiple codes in another (such as GPT's EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, or the Windows basic data partition, which maps to multiple MBR type codes).

2
  • Thank you. What makes me nut is they do not give any explanation of the term primary type in diskpart man. For sure it is used to label the Basic Data Partition (EBD0A0A2-B9E5-4433-87C0-68B6B72699C7), but no one seems to know if this is the only possible case.
    – antonio
    Commented Aug 31, 2017 at 20:07
  • 1
    @antonio you can "try it and see" by using set id= in diskpart; or even just check any disk with a linux installation
    – Tom Yan
    Commented Aug 31, 2017 at 23:39
0

You are simply making a wrong analogy. Partitions in MBR partition table has partition types as well, but they are not primary/extended/logical but these:

https://en.m.wikipedia.org/wiki/Partition_type#List_of_partition_IDs

It's just in MBR partition table the type is in the form of a single-byte ID (sometimes called code) while in GPT the type is in the form of a GUID.

The field is filled with "primary" is just because there's no point to create another term for partition in GPT. You may argue that Microsoft could have left the field blank but well, that's not their style I suppose, for they probably fear that users would panic when they see such field left blank.

5
  • IMHO, GUID partitions replacing the primary/extended/logical is not an analogy but rather a fact and it is relevant to the point of naming the GPT scheme itself. However, my point is not discussing marketing choices, only understanding what a GPT primary partition is, as it is not defined anywhere. You do not explain why some 'field is filled with "primary"' and some are not. Can you kindly add an edit for this?
    – antonio
    Commented Aug 31, 2017 at 16:39
  • @antonio Your question is almost invalid, coz to some extent there is no such thing as GPT primary partition because with GPT has only one way of having partition entries. As for what exactly Type: Primary refers to in diskpart for a GPT disk, my guess is any non-special (in Windows eye) GUID. I have yet to confirm though (but really I wouldn't bother to check; I mean, why?)
    – Tom Yan
    Commented Aug 31, 2017 at 17:20
  • @antonio Not even Microsoft itself gives much of a damn in things like this. I've recently read something like this in an MCSA Exam Ref from Microsoft Press: Windows versions prior to 2008 use the correct terminology in the Disk Management snap-in. The menus enable you to create partitions on basic disks and volumes on dynamic disks. Windows Server 2012 R2 uses the term volume for both disk types and enables you to create any of the available volume types, whether the disk is basic or dynamic. So basically they are saying "yeah it's not correct but we don't care"
    – Tom Yan
    Commented Aug 31, 2017 at 17:30
  • @antonio I think it's even possible that diskpart would have logic like this for the Type field: Say an MBR disk; if it is a primary partition with type code ef, display system; if it is a primary partition with any other type code, display primary; if it is a logical partition, display logical.
    – Tom Yan
    Commented Aug 31, 2017 at 17:48
  • Just to clarify: when I ask to explain to me the "definition of GPT primary partitions", I write this precisely because Diskpart uses the term for GPT disks, while to me is a kind of nonsensical one. As regard what you further write, the idea of using 'Primary' as a residual term, when there is nothing better, is a reasonable explanation, but still quite weird on MS behalf, because they themselves coined a specific (and therefore better) term: "Basic Data Partition". Now Linux fdisk, parted etc. use the MS jargon and they do not.
    – antonio
    Commented Aug 31, 2017 at 19:19
0

So far as the GPT primary partition goes here it is:

Imagine a partition table. It's not like MBR and GPT are different in all ways and don't have any similarities whatsoever. They are still tables. I actually prefer to call the MBR partition scheme the MSDOS partition scheme (like the GParted developers) but it's a matter of preference.

As for the difference between MSDOS and GPT they simply have different data structures. They still have primary partitions; MSDOS does not allow more than four primary partitions and +2TB-sized disks because of the way it is structured. GPT allows these though. Theoretically it can have an almost unlimited (at least for our uses) number of partitions (it's limited to 128 on Windows, which is still way more than what the average user may use). GPT primary partitions have almost the same structure as a MSDOS primary partition; however in GPTs they are referred to by GUIDs; MSDOS uses single-byte hexadecimal partition type codes like \Ox83 (Linux) to refer to its partitions.

It's just a matter of what is considered primary and what is considered extended/logical. Theoretically GPT can have extended and logical partitions, if it were to be defined. Extended partitions are simply containers, and are not necessarily partitions. Logical partitions have different structures so that they will be able to fit on the MSDOS partition scheme.

You must log in to answer this question.

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