How does one change the UUID of a Volume on Mac OS X 10.6?

the syntax for hfs.util appears to just be the devicename, not the path including /dev/

i.e.

Server:~ admin$ mount
(...)
/dev/disk1s2 on /Volumes/Backup (hfs, local, journaled)
(...)
Server:~ admin$ sudo /System/Library/Filesystems/hfs.fs/hfs.util -s rdisk1s2

make sure to unmount the drive before the hfs.util -s and mount afterwards.

use the "raw" device i.e. rdisk1s2 instead of disk1s2

diskutil info will not show the new uuid until you remount.


It should be doable. try using the hfs.util specifying the actual device id of the volume (if it's a raid volume you want the device id of the volume on the raid, not of any specific disk).

Alternatively use the little tool that is part of SuperDuper! so you can specify the path to a mounted volume.

The gory details of how the volume id is handled (which is actually not an UUID, the UUID is only used for display and is re-computed every time from the actual volume id) is explained in my answer to How does one change the UUID of a Volume on Mac OS X to a SPECIFIED value?


You can simply change UUID by partition format/erase.

1) Format disk to Mac OS Extended using built-in Disk Utility

2) If you need windows partition, format disk to exFAT after you have done first step (for some reason you need two steps for windows partition)

You can check if UUID changed by listing all UUID numbers:

find /Volumes -maxdepth 1 -mindepth 1 -exec diskutil info {} \;

/dev/disk4 isn't an HFS volume, it's an entire drive, including the partition table and any number of separate volumes (partitions) on the drive. /dev/disk4s0 would be an example of a volume. Find the correct identifier for the actual HFS volume you care about, and try doing hfs.util -s on that.