On Difference between UUID and PARTUUID
You can get a few hints about the difference between
PARTUUID by specifying the
blkid -p /dev/sda1
or whatever device/partition you are looking at. You may have noticed that if there are multiple partitions on the same
UUID device, the
PARTUUID is mostly the same with the partition number appended.
UUID is guaranteed to be unique. As far as I know, collisions will not happen within the lifetime of the universe. However, you'll note that the
PARTUUID is much shorter. These are meant to be "locally" unique, and collisions most likely occur between all known
A UUID is simply a unique identifier. They are used for many different purposes. You can generate them using the
For further reading about UUIDs:
manpage for uuidgen
Some more UUID use examples
For newer GNU/Linux systems, you'll have a list of all the partitions and their UUIDs. A new UUID is generated for each new partition. So, if re-partition a given drive, all the blkid UUIDs for that drive will change.
Part of the reason UUIDs are used as identifiers of partitions and drives is to maintain identifiers even when drives are added or mounted in a different order. In a prior time, the
fstab would have identifiers such as
/dev/sda1 ... This had the disadvantage of possibly having
sda1 be a physically different drive or partition if somehow the mount order was changed.
PARTUUIDs are a component of GUID Partition Tables (GPT) which are a replacement for Master Boot Record (MBR) related disk partitioning.
For further reading see Linux.com - Using the New GUID Partition Table in Linux
The GPT GUIDs (Globally unique identifiers) and our familiar Linux UUIDs (Universally Unique Identifiers) are not the same thing, though they serve the same useful purpose: giving block devices unique names. Linux UUIDs are a function of filesystems, and are created when the filesystem is created. To see Linux UUIDs just fire up the blkid command
Note the Partition GUID code, and how it says "Microsoft basic data." Yeah, ole Microsoft always party-crashing, because this an EXT4 partition, so there is no way for Windows to read it, but will see it as an unformatted partition. You won't see this with current releases of gdisk, because until 2011 there were no Linux filesystem GUIDs. Now there are, so if you're not using an old Linux like mine (Mint 13) you'll see a proper Linux GUID instead (0FC63DAF-8483-4772-8E79-3D69D8477DE4).
The Partition unique GUID is what you'll use in fstab, like this:
PARTUUID=8C208C30-4E8F-4096-ACF9-858959BABBAA /data ext4 user,defaults 0 0