[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need for a unique Linux GPT GUID type code (PATCH included)

From: Rod Smith
Subject: Need for a unique Linux GPT GUID type code (PATCH included)
Date: Thu, 23 Jun 2011 00:38:10 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110514 Lightning/1.0b3pre Thunderbird/3.1.10


I've recently discovered that when Windows reads a GPT disk with Linux partitions on it, those partitions are given drive letters and show up as unformatted. This situation can happen with removable disks or when Linux and Windows dual-boot on a UEFI-based computer. Because UEFI is becoming more common, this situation is also becoming more common. This strikes me as a disaster waiting to happen; sooner or later, somebody is going to trash a Linux installation by opting to format a Linux partition in Windows.

This problem occurs because Linux partitioning tools (libparted and my own GPT fdisk) give Linux partitions the same partition type code GUID used by Windows for its filesystem partitions (EBD0A0A2-B9E5-4433-87C0-68B6B72699C7). Linux has its own GUID type codes for other partition types, such as RAID, LVM, and swap space.

Thus, it seems to me that Linux needs its own partition type code GUID for filesystem partitions on GPT disks, much as it has its own MBR partition type code for filesystems (0x83 on MBR). I'd like to implement such a change in my own program, but I don't want to do this unilaterally. Assuming there's no unusual protocol for creating partition type code GUIDs, I suggest the following be used:


That's just a partition-unique GUID for a partition I created on a test disk using GNU Parted 3.0.

Alternatively, we could use the existing "Linux reserved" partition type code (8DA63339-0007-60C0-C436-083AC8230908); however, I don't know who came up with that code or if it was intended for some specific purpose or even a general non-filesystem purpose. Lacking that knowledge, my inclination is to steer clear of that GUID.

Of course, if somebody more needs to be involved in this, I'm happy to contact whoever it might be. AFAIK, the kernel doesn't use partition type codes, although some distributions' installers might.

At the risk of jumping the gun, I'm attaching a patch to implement my suggestion in libparted. (I hope the attachment gets through; but Thunderbird is rewrapping it if I insert it inline.)

Rod Smith

Attachment: patch.diff
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]