diskutil and GUIDs

Chris Murphy <lists-zXQU9YWDTqjmlV4oE/1sFAC/[email protected]> Tue, 22 Nov 2011 19:14:11 -0700
Newsgroups gmane.comp.macosx.admin
Message-ID <[email protected]>
Does anyone know of a tool to report the unique partition GUID for a partition?

The diskutil info command is apparently not cutting it. For non-Mac OS filesystems it does not report a GUID at all, and for hfs+ partitions the "Volume UUID" does not match the unique partition GUID in the GPT for that partition.



Example 1:

diskutil info disk0s2		[a jhfs+ partition]

returns a bunch of info including a "Volume UUID". But this UUID does not match the GUID in the GPT at offset 16 for that partition, whereas the GUID at offset 0 does correctly report the GUID as hfs+ partition type. (I am aware the first three blocks of both GUIDs are byte-swapped when stored in the GPT itself, so that's not the problem.)

Example 2:

diskutil info disk0sX		[where X is the partition for any non-Mac OS filesystem]

returns somewhat less info including no "Volume UUID" at all. But even if it did, apparently it wouldn't match the unique partition GUID in the GPT.

Chris Murphy