linux:backup-clone:uuid
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:backup-clone:uuid [2022/10/06 16:28] – oscar | linux:backup-clone:uuid [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== UUID Information ====== | ||
| - | |||
| - | ---- | ||
| - | ===== Be aware of UUID ===== | ||
| - | UUID stands for Universally Unique IDentifier of a partition. This ID is used in few different places to identify the partition. Most commonly this would be /etc/fstab. | ||
| - | |||
| - | ===== UUID vs PARTUUID ===== | ||
| - | * UUID is a // | ||
| - | * PARTUUID is a // | ||
| - | |||
| - | UUIDs are not hardware-specific but stored in the partition' | ||
| - | However recreating the partitions manually on the new disk (e.g. smaller disk), will result in new UUID. This could result in problems when booting the new disk uses UUID in fstab. | ||
| - | < | ||
| - | cat /etc/fstab | ||
| - | # /etc/fstab: static file system information. | ||
| - | # <file system> <mount point> | ||
| - | # / was on /dev/sda3 during installation | ||
| - | UUID=b2fa29ee-670f-4d44-becc-d9ec368d4a41 / | ||
| - | </ | ||
| - | This can be solved by either changing the entries in fstab to the old style: /dev/dbX, Or by getting the new UUID and update fstab accordingy: | ||
| - | < | ||
| - | # blkid /dev/sdb1 | ||
| - | /dev/sdb1: UUID=" | ||
| - | </ | ||
| - | |||
| - | |||
| - | | ||
| - | |||
| - | $ sudo tune2fs /dev/sdb1 -U 39ea80c4-e748-47eb-835c-64025de53e26 | ||
| - | tune2fs 1.44.6 (5-Mar-2019) | ||
| - | Setting the UUID on this filesystem could take some time. | ||
| - | Proceed anyway (or wait 5 seconds to proceed) ? (y,N) y | ||
| - | |||
| - | Check if UUID is properly assigned to the partition. | ||
| - | |||
| - | $ sudo blkid /dev/sdb1 | ||
| - | /dev/sdb1: UUID=" | ||
| - | |||
| - | |||
| - | |||
| - | How to Change UUID of Your Filesystems | ||
| - | |||
| - | Changing UUID of a filesystem is fairly easy. To do this, we are going to use tune2fs. For the purpose of this tutorial, I will change the UUID on my second partition /dev/sdb1, yours may vary, thus make sure you are changing the UUID of the desired filesystem. | ||
| - | |||
| - | The partition has to be unmounted prior apply the new UUID: | ||
| - | |||
| - | # umount /dev/sdb1 | ||
| - | # tune2fs -U random / | ||
| - | # blkid | grep sdb1 | ||
linux/backup-clone/uuid.1665073719.txt.gz · Last modified: by oscar
