Bug 1021263

Summary: parted should create GPT Linux filesystem partitions with Linux-specific GUID type code
Product: [Fedora] Fedora Reporter: Chris Murphy <bugzilla>
Component: partedAssignee: Brian Lane <bcl>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: bcl, bugzilla, rodsmith, the.ridikulus.rat
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 795206 Environment:
Last Closed: 2013-10-22 00:02:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 795206    
Bug Blocks:    

Description Chris Murphy 2013-10-20 20:40:12 UTC
+++ This bug was initially created as a clone of Bug #795206 +++

Version of component:
parted-3.1-13.fc20.x86_64


Description of problem:

(portion of original description)
When creating GPT partitions for Linux filesystems, libparted uses the Microsoft Basic Data partition type code GUID (EBD0A0A2-B9E5-4433-87C0-68B6B72699C7). This is fine as far as Linux is concerned, since Linux ignores partition type codes for the most part; but the result is that the Windows file manager shows Linux filesystem partitions as being unformatted but accessible disks. Attempting to access such partitions results in a prompt to format them. (See attached screen shot.) This behavior is potentially dangerous; a simple user error can easily result in trashing the Linux installation.

Note that libparted creates partitions with appropriate Linux-specific type codes when creating swap, LVM, or Linux RAID partitions. It also creates Linux-specific type codes on MBR ("msdos") disks; it's ONLY Linux filesystems on GPT disks that are affected.

Additional note:

Rod Smith's patch was pushed by upstream over one year ago:
http://lists.alioth.debian.org/pipermail/parted-devel/2012-September/004237.html

Page 107 of the UEFI spec, Version 2.3.1, Errata C June 27, 2012 says in part:

"The PartitionTypeGUID field identifies the contents of the partition. This GUID is similar to the OS Type field in the MBR. Each filesystem must publish its unique GUID"

"OS vendors need to generate their own Partition Type GUIDs to identify their partition types."

parted'd behavior, and by extension the Fedora and RHEL installers, and tools that rely on parted, are directly contrary to the UEFI spec, which parted ostensibly follows by voluntarily agreeing to support the GPT partition scheme.

When the partition type GUID currently used by parted is seen by Windows 7/8, the partitions are visible in the UI, and when the user clicks on them is invited to format them. When the partition type GUID is set to the linux GUID, the partitions aren't visible at all in the Windows UI.

Comment 1 Brian Lane 2013-10-22 00:02:53 UTC
This is in rawhide. I decided not to add it to F20 because I didn't want to introduce such a large change after the freeze. It will be in F21.