Linux How-To

The way to Change UUID of Partition in Linux Filesystem

SEOClerks

On this quick tutorial, you’ll learn to change the UUID of a Linux partition. This will help you in a much less prone to occur situation when the UUID of two partitions are the identical.

In actuality, that is actually laborious to occur, however it’s nonetheless attainable, if for instance you copy a partition utilizing dd command.

What’s UUID?

UUID stands for Universally Distinctive IDentifier of a partition. This ID is utilized in few totally different locations to determine the partition. Mostly this is able to be /and many others/fstab.

The way to Discover UUID of Your Filesystems

To seek out the UUID of your partitions, you need to use blkid command as proven.

# blkid|grep UUID

Find Partition UUID in LinuxFind Partition UUID in Linux

Discover Partition UUID in Linux

The way to Change UUID of Your Filesystems

Altering UUID of a filesystem is pretty simple. To do that, we’re going to use tune2fs. For the aim of this tutorial, I’ll change the UUID on my second partition /dev/sdb1, yours might range, thus be sure you are altering the UUID of the specified filesystem.

The partition must be unmounted prior apply the brand new UUID:

# umount /dev/sdb1
# tune2fs /dev/sdb1 -U random /dev/sdb1 # blkid | grep sdb1
Change Partition UUID in LinuxChange Partition UUID in Linux

Change Partition UUID in Linux

The UUID has been efficiently modified. Now you possibly can mount the filesystem again once more.

# mount /dev/sdb1

You may also replace your /and many others/fstab if wanted, with the brand new UUID.

Conclusion

This was a brief tutorial the right way to change a Linux partition UUID. The eventualities to make use of this are very uncommon and chances are high that you’ll likely use this on a neighborhood machine.

Share

Ask Anything

‘,
enableHover: false,
enableTracking: true,
buttons: ,
click on: perform(api, choices)
});
jQuery(‘#fb’).sharrre(
share: ,
template: ‘

‘,
enableHover: false,
enableTracking: true,
click on: perform(api, choices)
);
jQuery(‘#googleplus’).sharrre();
jQuery(‘#linkedin’).sharrre(
share:
linkedin: true
,
template: ‘

‘,
enableHover: false,
enableTracking: true,
buttons: ,
click on: perform(api, choices)
api.simulateClick();
api.openPopup(‘linkedin’);

);
// Scrollable sharrre bar, contributed by Erik Frye. Superior!
var shareContainer = jQuery(“.sharrre-container”),
header = jQuery(‘#header’),
postEntry = jQuery(‘.entry’),
$window = jQuery(window),
distanceFromTop = 20,
startSharePosition = shareContainer.offset(),
contentBottom = postEntry.offset().high + postEntry.outerHeight(),
topOfTemplate = header.offset().high;
getTopSpacing();
shareScroll = perform(){
if($window.width() > 719)
var scrollTop = $window.scrollTop() + topOfTemplate,
stopLocation = contentBottom – (shareContainer.outerHeight() + topSpacing);
if(scrollTop > stopLocation)
else if(scrollTop >= postEntry.offset().top-topSpacing)else if(scrollTop 1024)
topSpacing = distanceFromTop + jQuery(‘.nav-wrap’).outerHeight();
else
topSpacing = distanceFromTop;

});

Source link

Related Articles

Leave a Reply

Back to top button