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.
Have you tried checking WMI for accurate values? You can query common aliases through the wmic command:
C:>wmic partition get name,bootable,size,type C:>wmic diskdrive get size,status,TotalCylinders,TotalSectors,SCSIPort,SCSITargetId,model
- Mongodb grew to 850GB, disk has zero bytes left!! I rm 9GB file but still have 0 disk space! How can I reclaim the bytes? (urgent)
- combine partitions to one disk image
- Clone disk with dd, and change blocksize?
- Force Windows to recalculate disk size on VM after resizing hard drive
- After using dd new disk cannot be booted and partition tables lost