How do I change the UUID on an NTFS partition?
I've done this before but I can't remember how. Gparted (actually ntfsclone) duplicates the UUID, so I cannot mount them both!
ntfslabel /dev/sdaX LABELNAME and in /etc/rfstab change the /dev/sdaX or UUID= part of the line to LABEL=LALBELNAME That should do the trick. You may need to install a new package to get ntfslabel, in Ubuntu, that package is ntfsprogs. On Wed, Feb 24, 2010 at 2:14 PM, Randy Cole <randyokc@gmail.com> wrote:
I've done this before but I can't remember how. Gparted (actually ntfsclone) duplicates the UUID, so I cannot mount them both! _______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
OR .... If you absolutely need to change the UUID, then you can always alter the superblock of the partition. This is a little scarry, though. The superblock is the first 512 bytes of the partition. You can edit it in the hex editor and the NTFS volume serial number should be in 0x48 to 0x4f. It's only 8 bytes long. Just alter a byte or two in that region, and you should have a new UUID. This is NOT for the faint of heart, though. On Wed, Feb 24, 2010 at 2:30 PM, Adam Gomes <adam@unixgeek.net> wrote:
ntfslabel /dev/sdaX LABELNAME
and in /etc/rfstab change the /dev/sdaX or UUID= part of the line to LABEL=LALBELNAME
That should do the trick. You may need to install a new package to get ntfslabel, in Ubuntu, that package is ntfsprogs.
On Wed, Feb 24, 2010 at 2:14 PM, Randy Cole <randyokc@gmail.com> wrote:
I've done this before but I can't remember how. Gparted (actually ntfsclone) duplicates the UUID, so I cannot mount them both! _______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
Sorry for spamming the list. Randy, In case you are curious about what's in that NTFS superblock, here's a great reference: http://technet.microsoft.com/en-us/library/cc781134(WS.10).aspx If you wanted instructions for editting that superblock, this is probably the simplest way: dd if=/dev/sda# of=block bs=512 count=1 ghexedit2 block (or what hex editor you like) dd if=block of=/dev/sda# bs=512 count=1 You may also want to keep a copy of the original block, just in case your modified block is not happy. The serial number is stored in the 8 bytes starting at offset 0x48. Here's an example from one of my own NTFS Super Blocks: adam@adam-laptop:~$ hd block 00000000 eb 52 90 4e 54 46 53 20 20 20 20 00 02 08 00 00 |.R.NTFS .....| 00000010 00 00 00 00 00 f8 00 00 3f 00 ff 00 3f 00 00 00 |........?...?...| 00000020 00 00 00 00 80 00 80 00 24 97 ff 04 00 00 00 00 |........$.......| 00000030 00 00 0c 00 00 00 00 00 72 f9 4f 00 00 00 00 00 |........r.O.....| 00000040 f6 00 00 00 01 00 00 00 *69 28 05 50 64 05 50 3a* |........* i(.Pd.P:*| 00000050 00 00 00 00 fa 33 c0 8e d0 bc 00 7c fb b8 c0 07 |.....3.....|....| If you had any more questions, I'll gladly take them off list, too. On Wed, Feb 24, 2010 at 2:48 PM, Adam Gomes <adam@unixgeek.net> wrote:
OR ....
If you absolutely need to change the UUID, then you can always alter the superblock of the partition. This is a little scarry, though. The superblock is the first 512 bytes of the partition. You can edit it in the hex editor and the NTFS volume serial number should be in 0x48 to 0x4f. It's only 8 bytes long. Just alter a byte or two in that region, and you should have a new UUID.
This is NOT for the faint of heart, though.
On Wed, Feb 24, 2010 at 2:30 PM, Adam Gomes <adam@unixgeek.net> wrote:
ntfslabel /dev/sdaX LABELNAME
and in /etc/rfstab change the /dev/sdaX or UUID= part of the line to LABEL=LALBELNAME
That should do the trick. You may need to install a new package to get ntfslabel, in Ubuntu, that package is ntfsprogs.
On Wed, Feb 24, 2010 at 2:14 PM, Randy Cole <randyokc@gmail.com> wrote:
I've done this before but I can't remember how. Gparted (actually ntfsclone) duplicates the UUID, so I cannot mount them both! _______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
Adam Gomes found the same correkt solution I did. Thanks Adam. I could not find a utility to change the UUID of an NTFS partition. So I edited the boot sector of the partition. ACHTUNG! Editing the boot sector can cause loss of data and severe tire damage! You have been warned. % blkid | grep ntfs The partition I want to change is /dev/sdb14. % dd if=/dev/sdb14 of=superblockSDB14 bs=512 count=1 you can use a random-number generator to synthesize new UUID. Or you can just change a couple of digits. edit Volume Serial Number aka "UUID" bytes 0x48 thru 0x4F (due to endian, the hex digits are both backwards and reversed!): % hexeditor superblockSDB14 % sudo dd of=/dev/sdb14 if=superblockSDB14 bs=512 count=1 Adam Gomes wrote:
Sorry for spamming the list.
Randy, In case you are curious about what's in that NTFS superblock, here's a great reference: http://technet.microsoft.com/en-us/library/cc781134(WS.10).aspx <http://technet.microsoft.com/en-us/library/cc781134%28WS.10%29.aspx>
If you wanted instructions for editting that superblock, this is probably the simplest way:
dd if=/dev/sda# of=block bs=512 count=1 ghexedit2 block (or what hex editor you like) dd if=block of=/dev/sda# bs=512 count=1
You may also want to keep a copy of the original block, just in case your modified block is not happy.
The serial number is stored in the 8 bytes starting at offset 0x48.
Here's an example from one of my own NTFS Super Blocks:
adam@adam-laptop:~$ hd block 00000000 eb 52 90 4e 54 46 53 20 20 20 20 00 02 08 00 00 |.R.NTFS .....| 00000010 00 00 00 00 00 f8 00 00 3f 00 ff 00 3f 00 00 00 |........?...?...| 00000020 00 00 00 00 80 00 80 00 24 97 ff 04 00 00 00 00 |........$.......| 00000030 00 00 0c 00 00 00 00 00 72 f9 4f 00 00 00 00 00 |........r.O.....| 00000040 f6 00 00 00 01 00 00 00 *69 28 05 50 64 05 50 3a* |........*i(.Pd.P:*| 00000050 00 00 00 00 fa 33 c0 8e d0 bc 00 7c fb b8 c0 07 |.....3.....|....|
If you had any more questions, I'll gladly take them off list, too.
On Wed, Feb 24, 2010 at 2:48 PM, Adam Gomes <adam@unixgeek.net <mailto:adam@unixgeek.net>> wrote:
OR ....
If you absolutely need to change the UUID, then you can always alter the superblock of the partition. This is a little scarry, though. The superblock is the first 512 bytes of the partition. You can edit it in the hex editor and the NTFS volume serial number should be in 0x48 to 0x4f. It's only 8 bytes long. Just alter a byte or two in that region, and you should have a new UUID.
This is NOT for the faint of heart, though.
On Wed, Feb 24, 2010 at 2:30 PM, Adam Gomes <adam@unixgeek.net <mailto:adam@unixgeek.net>> wrote:
ntfslabel /dev/sdaX LABELNAME
and in /etc/rfstab change the /dev/sdaX or UUID= part of the line to LABEL=LALBELNAME
That should do the trick. You may need to install a new package to get ntfslabel, in Ubuntu, that package is ntfsprogs.
On Wed, Feb 24, 2010 at 2:14 PM, Randy Cole <randyokc@gmail.com <mailto:randyokc@gmail.com>> wrote:
I've done this before but I can't remember how. Gparted (actually ntfsclone) duplicates the UUID, so I cannot mount them both! _______________________________________________ Wlug mailing list Wlug@mail.wlug.org <mailto:Wlug@mail.wlug.org> http://mail.wlug.org/mailman/listinfo/wlug
------------------------------------------------------------------------
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
participants (2)
-
Adam Gomes
-
Randy Cole