Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm just reading up on GUID partition tables, and messing around with gdisk, I see these two titles.

What is the difference between them?

I am referring to the following (emphasis mine) shown when running gdisk:

GPT fdisk (gdisk) version 0.8.7

Type device filename, or press to exit: /dev/sda
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): i
Partition number (1-7): 4

Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)

Partition unique GUID: 85E66D2F-3709-4060-938E-FFE836433CC9
First sector: 2844672 (at 1.4 GiB)
Last sector: 651208703 (at 310.5 GiB) Partition size: 648364032 sectors (309.2 GiB) Attribute flags: 0000000000000000 Partition name: 'Basic data partition'

Command (? for help):

share|improve this question
    
Could you include the relevant sections of whatever it is you are reading? As well as the actual source of the information. –  terdon Mar 24 at 15:54
    
I've included more information, and made bold the parts in question. –  Zaemz Mar 24 at 15:56

2 Answers 2

up vote 6 down vote accepted

The partition unique GUID is generated at the time that the partition is created. It uniquely identifies the partition at least inside the disk and probably among all the disks you own (because it's unbelievably rare for GUIDs to collide).

A partition GUID code (by which I believe you mean a partition type GUID), on the other hand, is a known, fixed GUID. It identifies the type of data inside that partition. For example, if you had a partition that contained an ordinary GNU/Linux filesystem, you would assign it a partition type GUID of 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (defined as "GNU/Linux filesystem data"). If that partition was used as your /home, you would give it a GUID of 933AC7E1-2EB4-4F13-B844-0E14E2AEF915 (defined as "GNU/Linux /home"). If that partition was encrypted with, say, LUKS, you would give it a GUID of CA7D7CCB-63ED-4C53-861C-1742536059CC (defined as "LUKS partition"). And so on and so forth.

tl;dr: the partition unique GUID identifies that exact partition. The partition GUID code identifies the type of data inside that particular partition.

share|improve this answer

The "Partition GUID Code" is also called the "Partition type GUID". Every partition type has a GUID instead of the 1 byte code that MBR used (list of known partition types on Wikipedia).

The partition unique GUID is the (as the name implies) a GUID identifying that partition. A new GUID is created every time you create a partition.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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