Change UUID or serial number of a EXT4, swap, VFAT, FAT16 or FAT32 partition


Is it an EXT4 partition?

tune2fs -U "<UUID>" /dev/sdXY


Is it a swap partition?

If you have not used it, first do:
mkswap /dev/sdXY

swaplabel -U "<UUID>" /dev/sdXY


Is it a VFAT, FAT16 or FAT32 partition?

If you do not have mlabel, install it by:
apt install mtools

A FAT partition has a serial number in a format like XXXX-YYYY, in the command below omit the - from the serial number.

mlabel -N XXXXYYYY -i /dev/sdXY ::


Check UUID or serial number of a partition

blkid
or
blkid /dev/sdXY


Sources

https://www.tecmint.com/change-uuid-of-partition-in-linux/
https://unix.stackexchange.com/questions/261236/change-fat16-partition-uuid

This is a personal note. Last updated: 2021-01-05 22:02:54.



GitHub

My

GitLab

My

LinkedIn

My

Klebe.se

Don't forget to pay my friend a visit too. Joakim