I'm trying to work out a method of using cygwin dd and shadow copy to create an image of a live 2003 server for p2v conversion. Shadow copy only gives us partition data, so the image isn't bootable. So my idea is this:
1) Use dd to copy the first 32k of the actual boot disk.
2) Use dd to copy the C: shadow partition.
3) Stitch them together.
This is enough to get a booting system, but it's incomplete. The last 8 meg on a windows disk is reserved for dynamic disk metadata. So if you use simple disks (and never intend to use dynamic disks) you are fine. However if you are converting a system with dynamic disks you have a problem. So the logical solution is to grab the last 8 meg from the physical using dd and then stitch it to the end of the file. But for some infuriating reason I can't get it to work. I've been trying things like:
dd if=/dev/sda bs=1 seek=400077331408 of=tail.raw
The partition size + the 32k header is 400077331408 bytes. I am telling dd to skip 400077331408 one byte blocks then start it's copy. When I hexedit the file ... it's all zeroes, definitely not my disk. It also keeps transferring way past the 8 meg that I think is left at the end of my drive.
I've tried a lot of different skip/seek combinations. Can someone please correct my syntax? Is there a better tool than dd to slice off the end of the drive? Hopefully one that comes with Cygwin?
1) Use dd to copy the first 32k of the actual boot disk.
2) Use dd to copy the C: shadow partition.
3) Stitch them together.
This is enough to get a booting system, but it's incomplete. The last 8 meg on a windows disk is reserved for dynamic disk metadata. So if you use simple disks (and never intend to use dynamic disks) you are fine. However if you are converting a system with dynamic disks you have a problem. So the logical solution is to grab the last 8 meg from the physical using dd and then stitch it to the end of the file. But for some infuriating reason I can't get it to work. I've been trying things like:
dd if=/dev/sda bs=1 seek=400077331408 of=tail.raw
The partition size + the 32k header is 400077331408 bytes. I am telling dd to skip 400077331408 one byte blocks then start it's copy. When I hexedit the file ... it's all zeroes, definitely not my disk. It also keeps transferring way past the 8 meg that I think is left at the end of my drive.
I've tried a lot of different skip/seek combinations. Can someone please correct my syntax? Is there a better tool than dd to slice off the end of the drive? Hopefully one that comes with Cygwin?