为什么不同命令的 uuid 和 ptuuid 不同

为什么不同命令的 uuid 和 ptuuid 不同

我在 Arch Linux 系统上得到了 3 个命令blkid的以下结果lsblksfdisk

$ lsblk --json -p -b -o+PTUUID,UUID /dev/sda1
{
   "blockdevices": [
      {
         "name": "/dev/sda1",
         "maj:min": "8:1",
         "rm": false,
         "size": 535822336,
         "ro": false,
         "type": "part",
         "mountpoints": [
             null
         ],
         "ptuuid": "772eba14-e67c-40d8-8ddd-2317d5a4156d",
         "uuid": "6BCD-C870"
      }
   ]
}
$ blkid /dev/sda1
/dev/sda1: 
UUID="6BCD-C870" 
BLOCK_SIZE="512" 
TYPE="vfat" 
PARTLABEL="primary" 
PARTUUID="47948fda-bd1d-4dee-9d9a-ab0da02b08b2"
sfdisk --json /dev/sda
{
   "partitiontable": {
      "label": "gpt",
      "id": "772EBA14-E67C-40D8-8DDD-2317D5A4156D",
      "device": "/dev/sda",
      "unit": "sectors",
      "firstlba": 34,
      "lastlba": 937701342,
      "sectorsize": 512,
      "partitions": [
         {
            "node": "/dev/sda1",
            "start": 2048,
            "size": 1046528,
            "type": "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7",
            "uuid": "47948FDA-BD1D-4DEE-9D9A-AB0DA02B08B2",
            "name": "primary"
         }
      ]
   }
}

我主要对上面的输出的UUID和感兴趣PTUUID,命令之间似乎不匹配。

         PTUUID                                   UUID
lsblk    772eba14-e67c-40d8-8ddd-2317d5a4156d     6BCD-C870
blkid    47948fda-bd1d-4dee-9d9a-ab0da02b08b2     6BCD-C870
sfdisk                                            47948FDA-BD1D-4DEE-9D9A-AB0DA02B08B2

有人可以解释一下为什么它们不同,并且哪个可以信任(如果有的话)?

相关内容