Jump to content

- - - - -

Thoughts about VHDs with disk signature = zero

vhd windows backup disk signature

  • Please log in to reply
1 reply to this topic

#1 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1420 posts
  • Location:Borås, Sweden

Posted 02 February 2014 - 03:05 PM

It has come to my knowledge that at least some vhd files, created by Windows Backup, have all zeroes in the mbr disk signature field. When you attach such a vhd to DIsk Management in Windows (or using "diskpart" or Arsenal Image Mounter etc), you will see that Windows needs to initialize such images with a new disk signature before even reading the partition table.


Even though this might not itself corrupt the vhd file in any way, there are still cases where you would like to attach such a vhd file in read-only mode. Simply to read something from a backup without any risk of modifying anything. When mounted in read-only mode, Windows cannot initialize such disks with a valid disk signature and therefore refuses to do anything whatsoever with the vhd.


The obvious workaround I have used a couple of times is to create a differential vhd based on the original and mount the diff in read/write mode. But that's not obvious to people and there are sometimes quite a lot of support discussions around Windows Backup / Hyper-V / etc in various forums where people have tried to read things from such vhd files without success and without any clues why it would not work for them.


An idea I got was to modify Arsenal Image Mounter driver slightly so that when a disk is mounted in read-only mode, has disk signature = zero but in other respects contains an obviously valid partition table, expected 0xAA55 magic etc, it could fake a random disk signature "on-the-fly" when Windows reads the mbr. Would such a "fix" make sense? Would there be any risks involved, side-effects etc? Any thoughts, anyone?


#2 steve6375


    Platinum Member

  • Developer
  • 7188 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
    United Kingdom

Posted 02 February 2014 - 03:13 PM

Sounds OK. Slight worry that the disk signature would be different every time it was mounted but not sure if this would be a problem (except maybe Windows could assign a different drive letter??).

Maybe take a CRC of the first 1000   (???)  sectors of the image and use that for the disk sig, - then it would always have the same disk sig every time?

Also tagged with one or more of these keywords: vhd, windows backup, disk signature

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users