Get exact size in bytes of a disk & partitions in windows
Posted
by
Antonius Bloch
on Server Fault
See other posts from Server Fault
or by Antonius Bloch
Published on 2011-01-12T18:29:32Z
Indexed on
2011/01/12
18:55 UTC
Read the original article
Hit count: 365
Hi,
I'm using dd (under cygwin) to copy a shadow image of a disk in windows. Shadow copy will only give me a partion, so what I am doing is:
1) using dd to grab the disk header (32k on Win2003)
2) using dd to copy the shadow partition
3) using dd to copy the end of of the disk (8 meg reserved on Win2003)
4) stitch them all together and boot on KVM
I need the exact size of all the partitions and non partitioned space on this windows drive. Unfortunately most windows disk tools seem to fudge the numbers a bit, or at least give me a different size than Linux does. I could guess like this 32k + partition size + 8M, but I want to double check. If I make a mistake I could lose data.
This is on a remote & live Windows 2003 server so no offline solutions will be helpful. Latest cygwin is installed.
© Server Fault or respective owner