UUID vs GUID, efibootmgr, gdisk, partitions, filesystems
See also Post 2 below.
(Very quick note on GUIDs vs UUIDs)
Often you want to know which disk it is, so you can track down what's going on.
Your GRUB configuration files show UUIDs
efibootmgr shows GUIDs
gdisk shows GUIDs.
This shows GUIDs: ls -l /dev/disk/by-partuuid
This shows UUIDs: ls -l /dev/disk/by-uuid
blkid shows UUIDs (though some versions of blkid also show GUIDs)
As you mess with things, often you need to know which disk is being used for what, and maybe all you have to go on is a long string of hyphenated numbers.
Just to be clear about this, the output of sudo efibootmgr -v shows some hard drive partitions with their GUIDs.
Think this way:
GUID --> GPT only --> partition,
and
UUID --> filesystem;
or the distinction offered by SteveRiley:
/dev/disk/by-partuuid shows the UUID assigned to the partition when it was created by a partitioning tool.
/dev/disk/by-uuid shows the UUID assigned to the file system when it was formatted.
Note gdisk: To use gdisk to find GUIDs:
sudo gdisk /dev/sdx
command: i
partition number (1-n): [enter the partition you want to know about]
Then, you get some output, like:
Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI system partition)
Partition unique GUID: CFC63277-3E31-4939-BDE9-DB4429F4FA77
Final Note: From Rod Smith, at
https://askubuntu.com/questions/4727...partition-guid
You're confusing filesystem UUIDs with partition GUIDs.
The former are stored within the filesystems and can be used in Linux's /etc/fstab file or by the mount command via the UUID= parameter.
(Despite the "UUID" name, they aren't always true UUIDs. FAT doesn't use UUIDs, for instance, so for FAT, the serial number is used instead of a UUID.)
These UUIDs should be unique for any given filesystem, although cloned filesystems might have duplicated UUIDs.
Partition GUIDs, by contrast, are available only on GPT disks. There are actually two GUIDs associated with a partition:
A type code GUID, which is what the C12A7328-F81F-11D2-BA4B-00A0C93EC93B figure is. That particular GUID identifies an EFI System Partition (ESP). This is equivalent to the one-byte partition type codes of an MBR disk.
A partition's unique GUID, which, like a filesystem UUID, should be unique to any particular partition. The EFI uses this GUID internally, and some versions of Linux utilities enable you to use it much like a filesystem UUID, but using the PARTUUID= label rather than UUID=.
See also Post 2 below.
(Very quick note on GUIDs vs UUIDs)
Often you want to know which disk it is, so you can track down what's going on.
Your GRUB configuration files show UUIDs
efibootmgr shows GUIDs
gdisk shows GUIDs.
This shows GUIDs: ls -l /dev/disk/by-partuuid
This shows UUIDs: ls -l /dev/disk/by-uuid
blkid shows UUIDs (though some versions of blkid also show GUIDs)
As you mess with things, often you need to know which disk is being used for what, and maybe all you have to go on is a long string of hyphenated numbers.
Just to be clear about this, the output of sudo efibootmgr -v shows some hard drive partitions with their GUIDs.
Think this way:
GUID --> GPT only --> partition,
and
UUID --> filesystem;
or the distinction offered by SteveRiley:
/dev/disk/by-partuuid shows the UUID assigned to the partition when it was created by a partitioning tool.
/dev/disk/by-uuid shows the UUID assigned to the file system when it was formatted.
Note gdisk: To use gdisk to find GUIDs:
sudo gdisk /dev/sdx
command: i
partition number (1-n): [enter the partition you want to know about]
Then, you get some output, like:
Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI system partition)
Partition unique GUID: CFC63277-3E31-4939-BDE9-DB4429F4FA77
Final Note: From Rod Smith, at
https://askubuntu.com/questions/4727...partition-guid
You're confusing filesystem UUIDs with partition GUIDs.
The former are stored within the filesystems and can be used in Linux's /etc/fstab file or by the mount command via the UUID= parameter.
(Despite the "UUID" name, they aren't always true UUIDs. FAT doesn't use UUIDs, for instance, so for FAT, the serial number is used instead of a UUID.)
These UUIDs should be unique for any given filesystem, although cloned filesystems might have duplicated UUIDs.
Partition GUIDs, by contrast, are available only on GPT disks. There are actually two GUIDs associated with a partition:
A type code GUID, which is what the C12A7328-F81F-11D2-BA4B-00A0C93EC93B figure is. That particular GUID identifies an EFI System Partition (ESP). This is equivalent to the one-byte partition type codes of an MBR disk.
A partition's unique GUID, which, like a filesystem UUID, should be unique to any particular partition. The EFI uses this GUID internally, and some versions of Linux utilities enable you to use it much like a filesystem UUID, but using the PARTUUID= label rather than UUID=.
Comment