How to change GUIDs on a cloned drive?

OK, after doing more research and experimentation, I’ve found that gdisk x f does change the disk identifier GUID. Specifically, the “Disk identifier GUID” reported by gdisk /dev/sda always matches the “PTUUID” reported by blkid /dev/sda, and running gdisk x f changes that value. Once changed, it allows a cloned drive to be distinguished by UEFI (see Understanding UEFI boot drives, and how UEFI chooses which drive to boot from ), and that’s helpful.

But, gdisk does NOT seem to change partition UUIDs, but perhaps that’s because there each partition actually has multiple UUIDs. For instance:

devuser@product:~> lsblk -f /dev/sda
NAME   FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                           
├─sda1 vfat   FAT32       DF1E-A37D                                           
├─sda2 btrfs              de596190-79c1-467a-8998-d00f0d630740   46.5G    11% /mnt/tmp
└─sda3 swap   1           17a16f0d-b6fd-4c89-ac04-b4f0e8324ccd                
devuser@product:~> sudo gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): i
Partition number (1-3): 1
Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI system partition)
Partition unique GUID: 2CDD1892-D9DC-411F-BBBB-3FFD02B23688
First sector: 2048 (at 1024.0 KiB)
Last sector: 1050623 (at 513.0 MiB)
Partition size: 1048576 sectors (512.0 MiB)
Attribute flags: 0000000000000000
Partition name: ''

Command (? for help): i
Partition number (1-3): 2
Partition GUID code: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem)
Partition unique GUID: F1261C1A-6061-42C8-86FA-CE866F9D92C8
First sector: 1050624 (at 513.0 MiB)
Last sector: 113035263 (at 53.9 GiB)
Partition size: 111984640 sectors (53.4 GiB)
Attribute flags: 0000000000000000
Partition name: ''

Command (? for help): i
Partition number (1-3): 3
Partition GUID code: 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F (Linux swap)
Partition unique GUID: B5116F65-74FF-4A00-BF20-2E3546722B55
First sector: 113035264 (at 53.9 GiB)
Last sector: 117231374 (at 55.9 GiB)
Partition size: 4196111 sectors (2.0 GiB)
Attribute flags: 0000000000000000
Partition name: ''

Command (? for help): x

Expert command (? for help): f

Expert command (? for help): i
Partition number (1-3): 1
Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI system partition)
Partition unique GUID: CF93EB29-270C-48E9-873A-7DBD5021CBE5
First sector: 2048 (at 1024.0 KiB)
Last sector: 1050623 (at 513.0 MiB)
Partition size: 1048576 sectors (512.0 MiB)
Attribute flags: 0000000000000000
Partition name: ''

Expert command (? for help): i
Partition number (1-3): 2
Partition GUID code: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem)
Partition unique GUID: E3D912FF-1191-4266-939D-8CC0E192B966
First sector: 1050624 (at 513.0 MiB)
Last sector: 113035263 (at 53.9 GiB)
Partition size: 111984640 sectors (53.4 GiB)
Attribute flags: 0000000000000000
Partition name: ''

Expert command (? for help): i
Partition number (1-3): 3
Partition GUID code: 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F (Linux swap)
Partition unique GUID: A98682F2-AD0C-47D8-8447-882CAE0050CC
First sector: 113035264 (at 53.9 GiB)
Last sector: 117231374 (at 55.9 GiB)
Partition size: 4196111 sectors (2.0 GiB)
Attribute flags: 0000000000000000
Partition name: ''

Expert command (? for help): q
devuser@product:~> lsblk -f /dev/sda
NAME   FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                           
├─sda1 vfat   FAT32       DF1E-A37D                                           
├─sda2 btrfs              de596190-79c1-467a-8998-d00f0d630740   46.5G    11% /mnt/tmp
└─sda3 swap   1           17a16f0d-b6fd-4c89-ac04-b4f0e8324ccd
devuser@product:~> 

So, gdisk x f changes what it calls “Partition unique GUID”, but it doesn’t change what it calls “Partition GUID code”, and doesn’t change the UUID reported by lsblk (and used by fstab and grub.cfg).

Is this the difference between a “filesystem UUID” and a “partition UUID”? If so, then perhaps I want to change the “filesystem UUID” of the partitions? And I’ll need another tool.

From linux - How to change filesystem UUID (2 same UUID)? - Unix & Linux Stack Exchange, that tool would be file system specific. For the btrfs partition, perhaps I need to use `btrfstune -U [UUID] /dev/sda2? (And, since I probably don’t need to mount the EFI or swap partitions, maybe that’s enough.)