UUID in NTFS partition

Asked by Bruno Gomes

This probably has been asked a thousand times, but I can't seem to find an answer: how do I change the UUID for an NTFS partition without recreating it?

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Bruno Gomes
Solved:
Last query:
Last reply:
Revision history for this message
bodhi.zazen (bodhi.zazen) said :
#1

Looks like you can change the label but not the UUID

Most people advise you copy the data off the NTFS partition, delete, and recreate the partition, then restore the data.

You could consider asking on the ntfsprogs forums

http://forum.linux-ntfs.org/index.php

Revision history for this message
peter b (b1pete) said :
#2

- first, if I may, why would you like to change the UUID of a win created/formatted partition?

NTFS type partitions can not be formatted but with/in windows; if it's got problems try to salvage any data that can be salvaged and reformat it with win - operation that will change the UUID.

if the partition is sound and you just want to have it available in linux then find its UUID and edit /etc/fstab file accordingly.

sudo blkid

command in linux will tell you its UUID.

peter b

Revision history for this message
Bruno Gomes (blfgomes) said :
#3

Thanks for the answers...

Here's what happened: a long time ago, I bought another hard drive and used the software that came with it to move my data from the old hd to the new one (I don't know if I'm allowed to say that here without getting banned, but I was using Windows ;)). I started using Ubuntu a couple of weeks ago and I noticed this strange behavior when I tried to mount my NTFS partitions using Nautilus: it would only mount/umount one of two partitions. Using blkid, I found out that they had the same UUID - when I cloned my partition, it also copied the UUID. I haven't formatted either of the partitions since then, and I wasn't planning to.

Anyway, I solved my problem using a partition editor for Windows (HxD). I was able to find the UUID in the partition using dd if=/dev/sdaN of=/tmp/sdaN.bin bs=512 count=1. I could've changed it using an hex editor and used dd to save it back to the partition, but I was afraid I would screw it up.

Thank you all once again!

Revision history for this message
ijk (ijk) said :
#4

The package ntfs-3g has a command "ntfslabel" that can change the uuid (serial number).