You have probably got this sorted out, but just in case you haven’t, you can easily change by randomizing the disk and partition UUIDs with sudo sgdisk -G <your-disk> while booted from a live iso and where <your-disk> is unmounted.
This will not change your partition type UUIDs just the unique UUIDs.
Problems solved.. I nuked the partitions on my old disk.. Rebooted without any issues… I then reinstalled the kernel-core and ran grub2-config to update everything and things are back on track. Well I learned something new from my mistake and at least will know what to do next time I clone a disk and leave the previous one in there, at least go in gparted and change the UUIDs.
It changes the disk and partition unique GUIDs, which in my experience are the same as the UUIDs we’re referring to.
Here’s the section from the sgdisk man page:
-G, --randomize-guids
Randomize the disk's GUID and all partitions' unique GUIDs (but not their partition type code GUIDs). This func‐
tion may be used after cloning a disk in order to render all GUIDs once again unique.
Partitions that are mounted in the filesystem retain their GUIDs.
I use disk and partition cloning as my backup method. When I do the former, I have to do this randomization thing so that I can mount partitions to recover files.
I do believe that there would be further work to do with /etc/fstab and the UEFI bootloader to coordinate the changes.
So /etc/fstab matches the UUID item from blkid. That’s the filesystem UUID.
Now, blkid also shows a PARTUUID - that’s the partition UUID and is different from the UUID. /etc/fstab (at least the way that the user here has it, and that Fedora sets it up by default) doesn’t use that ID. (The EFI boot manager entries do use that partition UUID as we saw upthread.)
From the docs of sgdisk, it seems clear that it changes the partition UUID. But does it definitely also change the filesystem UUID?
It changes both the disk and partition GUID/UUIDs. Isn’t the partition UUID is what’s being shown in both of your commands.
Correction: The UEFI bootloader would refer to the partition UUID for the EFI partition. I do not believe that either the sgdisk command or the UEFI bootloader know anything about filesystems. I could be wrong on that.
I had this all sorted out at one time because I ran into it when I tried to recover backed up files from a LUKS encrypted disk. Clearly, my memory is not all that reliabile!
It’s possible to use PARTUUID instead of UUID in /etc/fstab entries, in which case using sgdisk -G should indeed take care of this “ambiguous mount” problem. In fact, that’s the way I have it set up on my Debian-based Raspberry Pi system.
Like you, I’ve continued to look at some of the man pages for some of the related commands, like lsblk, and I’m beginning to think that the FS UUIDs are a UDEV-derived/generated identifier. I could be wrong on that one too, though.
The other conclusions I’ve come to is that: (1) It makes sense that sgdisk would only change the disk and partition GUIDs as that command doesn’t know anything about filesystems only the disks themselves; (2) The reason that all of this works for my purposes is that I do the mounts ad hoc; they don’t live across reboots, and there’s no need for, say, an fstab entry for a filesystem.
As I understand it, the UUID is stored on the disk (in the filesystem metadata, I guess), but udev reads it and uses it to create pseudo-devices, and that udev mechanism is the way that many parts of the system “know” about the IDs.
These identifiers are generated by filesystem utilities (e.g. mkfs.*) when the device gets formatted and are designed so that collisions are unlikely. All GNU/Linux filesystems (including swap and LUKS headers of raw encrypted devices) support UUID. FAT, exFAT and NTFS filesystems do not support UUID, but are still listed in /dev/disk/by-uuid/ with a shorter UID (unique identifier)
(Regarding FAT, I believe the filesystem doesn’t strictly speaking have a UUID, but it does have a serial number which behaves similarly, and serves as the UUID for many purposes - as we saw above in the command outputs for OP’s EFI partitions.)