View/change UUID in Linux
February 20, 2008 Leave a comment
This may seem obvious, but you can view/change uuids with tune2fs
This is a fact I’ve stumbled upon quite a bit, but when trying to remember it, it slipped my mind and googling for ‘view uuid’ sort of came up fruitless, so I thought I’d post it here. I knew it was one of the common commands I use quite a bit, so after manning hdparm (yeah, again, it seems obviously not that in retrospect) I tried tune2fs, which is where I’ve seen the option before.
tune2fs -l /dev/hda1
will let you see the uuid of /dev/hda1
The -U flag will let you set it. Of course, you can then mount by uuid, which is a lot of times better because hey, device names change.