[nmglug] UUIDs

Brian O'Keefe okeefe at cybermesa.com
Sun Feb 4 17:09:19 PST 2024


Hello All

I think I've figured out why my newly cloned external SSD won't boot. 
It's not mounted on my ubuntu 20.04 system though I can see it in 
"Disks" or GParted. Since it is a clone the UUIDs are the same and that 
confuses GRUB, or something. With GParted I can supposedly generate a 
new UUID for it but that fails with an error and an invitation to visit 
GParted to try and work that out.

So I found a help page at superusers.com and this about setting a new, 
random UUID. I'm pretty sure that if the external drive didn't have the 
same UUID as the internal SSD, it would boot and also be mounted when 
running from my internal SSD. Here's their fix:

12
<https://superuser.com/posts/1159006/timeline>

UUIDs are not hardware-specific but stored in the partition's 
filesystem. That means cloning a disk or partition with|dd|will result 
in the same UUID.

You can assign a new UUID by using:

  * |tune2fs -U random <device>|(ext2/ext3/ext4)
  * |xfs_admin -U generate <device>|(xfs)
  * |reiserfstune -u $(uuidgen) <device>|(reiserfs)
  * |mkswap -U $(uuidgen) <device>|(swap)

Having duplicated UUIDs doesn't necessarily lead to errors. However 
booting and mounting a device by UUID will become ambiguous and may lead 
to the wrong device being used.


So I ran:

sudo tune2fs -U random /dev/sdb2
tune2fs 1.45.5 (07-Jan-2020)

This operation requires a freshly checked filesystem.

Please run e2fsck -f on the filesystem.


I'm reluctant to run the "Please" command as I know fsck can be a 
powerful tool. Since I can't yet mount the cloned disk I can't see how I 
can run the command to check it.


Any help is greatly appreciated!


Oh, I can also see that the cloned drive is a backup when I boot the 
live thumb drive. Everything is in there. However, in case I need it to 
restore data it would help if I could mount it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nmglug.org/pipermail/nmglug-nmglug.org/attachments/20240204/a5f1f2b6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.png
Type: image/png
Size: 3913 bytes
Desc: not available
URL: <http://lists.nmglug.org/pipermail/nmglug-nmglug.org/attachments/20240204/a5f1f2b6/attachment.png>


More information about the nmglug mailing list