[dm-crypt] LUKS GPT GUID

Rod Smith rodsmith at rodsbooks.com
Sun Jan 26 17:02:36 CET 2014


On 01/26/2014 05:17 AM, Pali Rohár wrote:

> CCing Roderick W. Smith, who maintaing gdisk utility. Roderick, who
> and how assinged GPT GUIDs which you added to gdisk program? What do
> you know about GPT GUID for LUKS?

There is no central authority or registry for GPT type code GUIDs. The 
closest thing to that is probably the Wikipedia page on GPT. A 
properly-constructed GUID should be unique -- at least, the statistical 
probability of a collision is EXTREMELY small. Thus, anybody who wants 
to can generate a GUID for a new partition type, and in fact there's 
been a fair amount of that going on over the past few years. Many 
computer manufacturers have manufacturer-specific GUIDs for ESP-like 
partitions, for instance. As OSes adopt GPT, they also tend to add new 
codes for their own use. In the Linux world, it's really up to the 
parted developers and me to implement such codes, since it's libparted 
and gdisk that set them. If somebody else needs a new code, they'll need 
to submit patches or propose a change to me and/or the libparted 
developers. (The latter is more important, really, since most Linux 
installation tools rely on libparted.)

I don't know who generated most of the Linux GPT GUIDs, but I generated 
the one for Linux filesystem data 
(0FC63DAF-8483-4772-8E79-3D69D8477DE4). See the following mailing list 
thread to get an idea of how I and the libparted developers discussed 
the issue and decided to implement it:

http://lists.gnu.org/archive/html/bug-parted/2011-06/msg00026.html

The Linux /home partition type code was created by the Freedesktop.org 
developers (see 
http://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html), 
but I wasn't privy to whatever discussions led to its creation. I added 
it to gdisk when I heard about it, but I haven't heard of libparted 
patches to support it, so I don't know if it's really going anywhere.

In terms of gdisk, I began with the list of codes from Wikipedia's GPT 
page at the time I wrote gdisk. The list on Wikipedia has expanded over 
time, and I've tried to keep up. I've also added codes to gdisk from 
other sources, such as when I run into a new code "in the wild" or in 
source code for another project. (In most such cases, I've also added 
the code to the Wikipedia page, if it's not already there.) The gdisk 
parttypes.cc source code file holds all the codes that gdisk supports, 
and some of those have comments with URLs to the pages that describe the 
type code. You can therefore check that source code page and/or the 
Wikipedia page if you have questions about specific type codes. Doing a 
Web search on the code can also be informative.

As far as LUKS goes, I don't know of a Linux GPT GUID for it. If you 
think it's important to implement such a code, feel free to post to the 
parted mailing list. I don't think it's really important, though; Linux 
ignores partition type codes for most purposes, and so long as a 
partition is flagged with one of the existing Linux-specific type codes, 
other OSes should ignore it.

-- 
Rod Smith
rodsmith at rodsbooks.com
http://www.rodsbooks.com


More information about the dm-crypt mailing list