Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature? Ever have a signature collision problem (especially with Virtual Machines?) This article is intended to help you understand what's going on and fix some common problems.
This is article is a collection of information already available from Microsoft and other sources but put into my own words and gathered in this one place.
What are they?
The disk signature is a unique number that identifies the disk to the operating system. Windows 2000 and later Windows operating systems use it as an index to store and retrieve information about the disk in the
HKLM\SYSTEM\MountedDevices registry key. The boot configuration data (BCD) store in Vista and newer operating systems reference it when booting the computer.
In MBR type disks, the signature is a four-byte hexadecimal value stored in
little-endian format, such as
5f1b2c36. GUID Partition Table (GPT) disks use a GUID, an example being
bfc714e7-6bb1-4cfb-adac-e86c96e196ee.
The unique number is actually stored at offset
0x01B8 on an MBR disk and at
0x00 on GPT disks.
Signature Collisions
Before virtualization arrived, signature collisions were a near non-issue. Generally, they would occur in the rare circumstance where you copied a disk using a byte level disk copy program (such as
RoadKil.Net's
RawDisk or a tool like
dd in a *nix operating system) and subsequently tried to attach the copy to the same system you just copied from.
With virtualization, it's far more common these days. Often enough, copies of a virtual hard disk (vmdk, vhd, vhdx, among others) are made and then attached to the same system - sometimes to "split up" a partitioned disk into two separate "disks". When this is done, if the signature is not changed before attaching to the VM, a signature collision can occur.
In the example below, I created a Windows Server 2012 R2 VM and a 20 GB virtual hard disk. I initialized it, formatted it, and assigned it the drive letter D:. Then I shutdown the VM, copied the D: VHDX to a new file, and attached it as a third virtual hard disk.
![VMSettings.PNG]()
When I restarted Windows and opened Disk Management, I found Disk 2 Offline.
![DiskManagementDisk2Offline.PNG]()
I right-clicked on
Disk 2 and set the disk "Online" and then tried to assign a drive letter to it. I was rudely told "the parameter is incorrect."
![ParameterIncorrect.PNG]()
Clearly, I know what is wrong, but if you're not sure, you can verify your suspicions easily enough. Open a command prompt as an administrator and run
DISKPART, the Windows command line tool used for disk management. List your disks using the
LIST DISK command and then select each disk using the
SELECT DISK
# command (SEL can be used as a shorthand) followed by
UNIQUEID DISK to check the ID for each disk, as illustrated below.
![DiskPartShowingIdenticalIDs.PNG]()
As you can see, the disk IDs match.
Changing a Disk Signature
There's more than one way to skin a cat (please don't test this - using any method - cats shouldn't be skinned!) and there's more than one way to change a disk signature!
If you're into the long, hard way of doing things, you could use a byte level editor to modify the signature starting at the point where it is stored - for example, as mentioned before, 0x01B8 on an MBR type disk. Changing a single byte should do the trick as that will ensure the disk has a different signature from the original.
Most people would be better off going with
DISKPART, however. Building off what we did to verify there was a collision, select the disk you want to change with
SEL DISK and then use the command
UNIQUEID DISK ID=
<8-digit hexadecimal number>, as illustrated below. (Remember, if you are changing the ID for a GPT disk, you'll need to use a GUID instead).
Gotchas!
DON'T CHANGE THE SIGNATURE OF THE DISK WITH YOUR C: DRIVE! If you're trying to split one virtual disk with a C: and partition and one or more other partitions, the file you intend to use for your C: drive leave UNTOUCHED! Instead, take the copy you made with the other partitions and attach it to a DIFFERENT VM temporarily. Change the signature on the disk using the other VM. Another possible option (if using VHDs as your virtual hard disks), is to mount it in Disk Management. Remember, the boot configuration data and registry use the disk signature for many critical things - changing that for your C: drive could leave your system unbootable until restored.
Notes:
Disk part was not included in any edition of Vista but is available in Windows Server 2008 and later as well as Windows 7 and later.
Additional reading / sources:
Technet Library -
Master Boot Record.
Wikipedia Entry on the
GUID Partition Table.
Mark Russinovich Blog -
Fixing Disk Signature Collisions.
Comments (4)
Commented:
We can do so selecting the to-be-copied disk, selecting edit and then convert. Convert can be used to copy the disk (without converting anything) and no signature conflicts happen.
Author
Commented:Commented:
Author
Commented: