How to Change UUID of Partition in Linux Filesystem

Configurare noua (How To)

Situatie

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.

Solutie

How to Find UUID of Your Filesystems

To find the UUID of your partitions, you can use blkid command as shown.

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:

The UUID has been successfully changed. Now you can mount the filesystem back again.

You can also update your /etc/fstab if needed, with the new UUID.

Conclusion

This was a short tutorial how to change a Linux partition UUID. The scenarios to use this are very rare and chances are that you will most probably use this on a local machine.

Tip solutie

Permanent

Voteaza

(12 din 34 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?