I need your help.
I have lost a partition due to bad usage of gparted. I need to restore MBR from a vmdk file that I created before. The VMDK is not a whole virtual disk but just the headers pointing to the physical device. (using raw partition as a virtual disk). I created that file from the original physical drive and worked like a charm. I got two different files:
- Windows 7-0.vmdk. This is the "pointer" to the physical drive, I'm dumping the contentents here.
# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=8b0b0bcb
parentCID=ffffffff
isNativeSnapshot="no"
createType="partitionedDevice"
# Extent description
RW 63 FLAT "Windows 7-0-pt.vmdk" 0
RDONLY 1985 FLAT "/dev/sda" 63
RW 314572800 FLAT "/dev/sda" 2048
RDONLY 979208192 FLAT "/dev/sda" 314574848
RW 1293795328 ZERO
RW 63 FLAT "Windows 7-0-pt.vmdk" 63
RDONLY 1985 FLAT "/dev/sda" 2587578431
RW 1038336 ZERO
RW 63 FLAT "Windows 7-0-pt.vmdk" 126
RDONLY 1985 FLAT "/dev/sda" 2588618815
RW 1044480 ZERO
RW 63 FLAT "Windows 7-0-pt.vmdk" 189
RDONLY 1985 FLAT "/dev/sda" 2589665343
RW 309663744 ZERO
RW 63 FLAT "Windows 7-0-pt.vmdk" 252
RDONLY 1985 FLAT "/dev/sda" 2899331135
RW 1044480 ZERO
RW 63 FLAT "Windows 7-0-pt.vmdk" 315
RDONLY 1985 FLAT "/dev/sda" 2900377663
RW 29882368 ZERO
RW 15152 ZERO
# The Disk Data Base
#DDB
ddb.toolsVersion = "9283"
ddb.adapterType = "ide"
ddb.geometry.biosSectors = "63"
ddb.geometry.biosHeads = "255"
ddb.geometry.biosCylinders = "51329"
ddb.geometry.sectors = "63"
ddb.geometry.heads = "16"
ddb.geometry.cylinders = "16383"
ddb.uuid = "60 00 C2 9f 9d 79 5f 9f-7c 0a 25 f0 ef ba 13 77"
ddb.longContentID = "298ca37d0efbc707f4155fa58b0b0bcb"
ddb.virtualHWVersion = "7"
ddb.uuid.image="09951131-7174-4d97-8fcb-11cfa20b6288"
The other file is binary and is called Windows 7-0-pt.vmdk.
I need to rebuild my original partition table from VMDK.
This is my actual output for sfdisk (/dev/sda2 is incorrect):
# partition table of /dev/sda
unit: sectors
/dev/sda1 : start= 2048, size=314572800, Id= 7, bootable
/dev/sda2 : start=440092672, size=2147485696, Id= 7
/dev/sda3 : start=2587578368, size=342698800, Id= 5
/dev/sda4 : start= 0, size= 0, Id= 0
/dev/sda5 : start=2587580416, size= 1038336, Id=82
/dev/sda6 : start=2588620800, size= 1044480, Id=83
/dev/sda7 : start=2589667328, size=309663744, Id=83
/dev/sda8 : start=2899333120, size= 1044480, Id=83
/dev/sda9 : start=2900379648, size= 29882368, Id=83
HELP, PLEASE, HELP!
Any advice is highly appreciated, thank you.
Attach it to some other VM having the same OS and using the same SCSI controller and then create the partition table from command line