Sunday, March 31, 2013

Convert Boot-to-VHD image to Hyper-V

The following post is a useful guide on how to modify a Boot-to-VHD image to work in Hyper-V:

http://blogs.msdn.com/b/bramveen/archive/2009/10/27/swapping-between-native-vhd-boot-and-hyper-v.aspx

From the command prompt, enter the following commands:

DiskPart

select vdisk file=C:\<VHDFILENAME>.VHD

attach vdisk

select part 1

active

assign letter=Z

exit

Z:

cd Z:\Windows\System32

BCDboot.exe Z:\Windows /s Z:\

BCDedit /store Z:\boot\BCD /set {bootmgr} device boot

BCDedit /store Z:\boot\BCD /set {default} device boot

BCDedit /store Z:\boot\BCD /set {default} osdevice boot

C:

Diskpart

select vdisk file=C:\<VHDFILENAME>.VHD

detach vdisk

exit

Saturday, March 23, 2013

Fixing a disk signature collision

I purchased two WD My Passport portable external hard drives recently. When I connected both of them to my computer, only one would show up as a drive.

Looking in Computer Management > Storage > Disk Management, the 2nd drive was shown as offline due to a signature collision. These are the steps I used to fix this problem.

  1. Open DISKPART from the Windows Run command (WIN+R)
  2. Enter the following commands:
  3. list disk
  4. select disk N
    Where N is the # of the offline disk
  5. uniqueid disk
    This will display the unique ID of the disk
  6. online disk
  7. uniqueid disk
    This will display the new unique ID of the disk
  8. exit