I foolishly decided to convert a Windows operating system drive from MBR partitioned to GPT partitioned. That conversion didn't go right. The boot portion of the drive was erased or destroyed. The partitions were still there and no data was destroyed. I tried to convert the drive back to MBR. That didn't work easier. This is usually the point where you might start panicking.
The cycle time is pretty long when you try and fix the boot portion of a physical disk. There are continual physical machine restarts. There is also risk that data will be lost while attempting to fix this. I wanted to attempt drive repair without risking destruction of data on the drive I was working on. In addition, I didn't want to work on this drive without access to the internet.
My target laptop laptop has two bootable drives in it. I realized that I could convert the trashed disk from Physical to Virtual using Paragon Drive Copy. Then I could hack on the virtual drive without risking losing data. Bad mistakes could be "undone" by running P2V again to rebuild my virtual disk.
- Paragon Drive Copy P2V to create virtual disk images of my physical hard drive
- Windows installation ISO for system repair
- VMWare Player
- Paragon Drive Copy V2P to clone the virtual disk image back onto the physical disk
- Google to find out what kinds of commands might be needed.
- Convert physical disk to virtual, vmdk in my case
- Create Virtual machine with newly created disk and Windows installation ISO
- Boot the virtual machine from the ISO and use the Windows recovery tools to repair the virtual disk/machine.
- Clone the repaired virtual disk back to a physical disk
P2VParagon Drive Copy converted the physical disk to virtual. I then created VMWare virtual machine that mounted that virtual disk as its primary and attached a Windows ISO as the boot CD.
Create the VM
- Create a new VMWare VM using VMWare Player using the ISO as the installation media and the VMDK created by P2V as the hard drive. The VMWare New Machine Wizard didn't let me create a VM with an existing vmdk.
- Edit the machine configuration before running it. Add the P2V vmdk and remove the empty one created by the wizard.
- Boot the VM. It should boot from the ISO by default.
Note: You can give time to boot to bios by adding a boot delay where the time is milliseconds. The following vmx file entry waits 5 seconds for user input before continuing the boot process.
bios.bootDelay = "5000"
RepairThis let me boot the VM in recovery mode. The disk was fixed and bootable with about 1-2 hours of system recovery disk work. Most problems can be fixed with just the windows recovery disk. My problems were a little more complex :-(
Note: I ended up deleting my recovery partitions, rebuilding the MBR and then letting the windows recovery process make it bootable.
- bootrec /fixmbr
- bootrec /fixboot
- ren c:\boot\bcd bcd.old
- bootrec.exe /rebuildbcd
- bcdboot c:\windows
"x:\sources\recovery\StartRep.exe" runs the recovery app.
"bcdedit" tells your your boot config
V2PParagon Dive Copy documentation says it supports Virtual to Physical (V2P). It turns out you do this by mounting the virtual drive with Drive Copy. This makes the (newly repaird) virtual drive look like a physical disk. I was then able to clone the virtual disk onto the original physical drive. The clone operation copies all the partition and boot information.
Paragon Drive CopyThere are plenty of disk cloning tools out there. I used Paragon Drive Copy because I own a copy and have had good luck with it in the past.
- P2V: There is a button on the Paragon Drive Copy ribbon bar that does this.
- V2P: This is done by cloning a mounted virtual drive.
P2V and V2P can be useful tools when trying to fix certain types of disk issues.