12

In Ubuntu 14.04 there is only one UUID for each partition.

For example my sudo blkid shows

/dev/sda1: UUID="b2be9c80-8413-4fdb-a562-6ca072385c02" TYPE="ext4" 
/dev/sda2: UUID="ccd2f497-5d8f-48c7-9102-c339c2689ff8" TYPE="swap" 
/dev/sdb4: UUID="eb34f285-4a78-494c-9950-a2095b1740ce" TYPE="ext4"

But in Ubuntu 15.04 in blkid and /etc/fstab there is also PARTUUID like this

/dev/sda5: LABEL="volume1" UUID="bb69c64d-5c45-4bab-90e1-ba46e5afd6b2" TYPE="ext4" PARTUUID="094b7241-4895-4051-90ab-439252b4e3f4"

What is it for?

3
  • It also shows up for FAT32/ntfs based partitions. /dev/sdc1: LABEL="MUSIC_9" UUID="5A5B-2F15" TYPE="vfat" PARTUUID="7602dd12-01" The UUID is actually the FAT32 serial number. I changed my serial number, and the PARTUUID did not change.
    – Kevin
    Oct 30, 2015 at 19:56
  • I wonder why my Ubuntu 16.04 /etc/fstab only shows the UUID and there is no PartUUID like there was in your Ubuntu 15.10? Does your current Ubuntu still have a PartUUID? Apr 27, 2018 at 23:18
  • I never mentioned that my /etc/fstab showed PARTUUID.
    – Pilot6
    Apr 28, 2018 at 16:27

1 Answer 1

9

I don't know what it is for, but it is a GPT feature. Since the G in GPT stands for GUID (Globally Unique Identifier), the PARTUUIDs might be the GUID of the corresponding GPT partition. The UUID, on the other hand, is from the filesystem.

The PARTUUID should remain unchanged if you format the partition to a different filesystem, as long as you don't modify the partition itself. I tested it on Arch Linux on a spare pen drive:

$ sudo blkid /dev/sdd1
/dev/sdd1: UUID="1e867d95-dd7f-4c97-aa3f-7ee4490744bc" TYPE="ext4" PARTUUID="a96b7ca5-f7f8-40c9-a35c-6d995787ab2f"
$ sudo mkfs -t ext4 /dev/sdd1
mke2fs 1.42.12 (29-Aug-2014)
/dev/sdd1 contains a ext4 file system
    created on Fri Jul 10 20:51:19 2015
Proceed anyway? (y,n) y
Creating filesystem with 1954167 4k blocks and 488640 inodes
Filesystem UUID: 6c3393bf-aba1-4854-9815-f62818facfda
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done 

$ sudo blkid /dev/sdd1       
/dev/sdd1: UUID="6c3393bf-aba1-4854-9815-f62818facfda" TYPE="ext4" PARTUUID="a96b7ca5-f7f8-40c9-a35c-6d995787ab2f"
$ sudo mkfs -t ntfs -Q /dev/sdd1
Cluster size has been automatically set to 4096 bytes.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.
$ sudo blkid /dev/sdd1          
/dev/sdd1: UUID="2905A16E2CDB44E8" TYPE="ntfs" PARTUUID="a96b7ca5-f7f8-40c9-a35c-6d995787ab2f"
8
  • But what is the point of having two UUIDs for a partition?
    – Pilot6
    Jul 9, 2015 at 18:07
  • 2
    @Pilot6, because the designers of GPT thought it a good idea to have a UUID to identify a partition, but this was a feature that was important enough to the linux community that they already had implemented it years earlier within linux filesystems ( which was the only way you could do it on a DOS partition table ).
    – psusi
    Jul 9, 2015 at 18:12
  • 2
    @Pilot6 UUIDs are not for a partition, but for a filesystem.
    – muru
    Jul 9, 2015 at 18:16
  • 1
    @Pilot6 assuming that by format you mean run some mkfs command on it, yes, I think it should.
    – muru
    Jul 9, 2015 at 18:19
  • 1
    @Pilot6 FWIW, I ran mkfs a couple of times on a GPT partition from an Arch Linux box. The PARTUUID remained unchanged.
    – muru
    Jul 10, 2015 at 16:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .