Change UUID on a disk partition

posted in: Linux | 0

Make a new uuid
uuidgen

Replace n with the number of the partition
tune2fs /dev/sdan -U uuid_generated_by_uuidgen

Check the new uuid with
vol_id /dev/sdan

use xargs to make that a one liner
uuidgen | xargs tune2fs /dev/sdan -U ; vol_id /dev/sdan

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.