GNOME Bugzilla – Bug 742101
hex value of partition type not shown
Last modified: 2015-12-29 10:20:42 UTC
I am copying and pasting the bug report from Fedora in verbatim. https://bugzilla.redhat.com/show_bug.cgi?id=1066194 Description of problem: "Information" of a partition does not show the hex partition ID Version-Release number of selected component (if applicable): 0.16.1 How reproducible: always Steps to Reproduce: 1. right click on partition 2. click on "Information" menu item 3. only text translation is displayed Actual results: File System: FAT16 Expected results: File System: 0700-FAT16 Additional info: GPT is 4 hex digits MSDOS is only 2 hex digits
FWIW the 4-hex-digit codes for GPT partitions are gdisk-specific. You'll notice that if you ever used fdisk for GPT: https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs The 2-hex-digit code is in spec though: https://en.wikipedia.org/wiki/Partition_type#List_of_partition_IDs In any case none of these has anything to do with "filesystem", they are only identification of "partition" type (corresponds to "Name" under "Partition" on the same popup).
As Tom points out 4-hex-digit codes for GPT partitions are gdisk specific and GPT actually uses a set of known GUIDs to specify the type of the partition. From the gdisk manual page: > Some boot loaders for BIOS-based systems make use of a BIOS Boot > Partition (gdisk internal code 0xEF02), > ... > Display a summary of partition types. GPT uses a GUID to identify > partition types for particular OSes and purposes. For ease of data > entry, gdisk compresses these into two-byte (four-digit hexadecimal) > values that are related to their equivalent MBR codes. Specifically, > the MBR code is multiplied by hexadecimal 0x0100. For instance, the > code for Linux swap space in MBR is 0x82, and it’s 0x8200 in gdisk. A > one-to-one correspondence is impossible, though. Most notably, the > codes for all varieties of FAT and NTFS partition correspond to a > single GPT code (entered as 0x0700 in sgdisk). ... Also quoting my update from the source bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1066194#c12 > Mike Fleetwood 2015-01-02 15:08:01 EST > > I have looked at libparted, the library GParted uses to manipulate > partitions. Libparted does not expose the types of partitions. It > forces programs to merely specify the type of the file system to be > stored in the partition and chooses the appropriate type based on > that. This explains why GParted works the way it does. > > Without (1) writing code to read the partition tables directly or > (2) run commands such fdisk and gdisk to report the partition types I > don't see how GParted can get the partition types to report them. > > ... > > At the moment it is too much effort to add the partition type into the > Information dialog to justify the work. Therefore closing this bug as won't fix. Mike