<

Go Premium for a chance to win a PS4. Enter to Win

x

Windows Signature Collisions

Published on
6,721 Points
2,421 Views
3 Endorsements
Last Modified:
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.PNGWhen I restarted Windows and opened Disk Management, I found Disk 2 Offline. 
DiskManagementDisk2Offline.PNGI 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.PNGClearly, 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.PNGAs 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).

DiskpartChangedID.PNG

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.
 
3
Comment
Author:Lee W, MVP
  • 2
  • 2
4 Comments
 
LVL 57

Expert Comment

by:McKnife
You should include how to copy a virtual hard drive in a way, so that this does not happen.
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.
0
 
LVL 96

Author Comment

by:Lee W, MVP
There are many different virtualization solutions and the process can vary or not be possible depending on platform.
0
 
LVL 57

Expert Comment

by:McKnife
Sure. But I suppose that for each platform there will be a way and to copy and re-use a disk file using explorer is not the supported way in the first place.
0
 
LVL 96

Author Comment

by:Lee W, MVP
I can see an argument could be made to provide advice on proper ways of copying VHDs... but my point to the article was handling collisions and correcting them when they occur... With virtual disks being the easiest way to demonstrate the issue (and often to have it).  Feel free to post in links of "proper" ways to copy virtual disks (I've never seen one from MS, but I haven't looked either).
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Join & Write a Comment

How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month