Cygwin dd of='\\.\PhysicalDrive0' Invalid argument
I'm trying to copy my hard drive. unxutils
dd that used to work before, now doesn't.
So I'm trying the Cygwin version. It reads just fine, but can't open for writing:
$ dd if='\\.\PhysicalDrive0' count=0
0+0 records in
0+0 records out
0 bytes (0 B) copied, 4.4131e-05 s, 0.0 kB/s
$ dd if=/dev/null of='\\.\PhysicalDrive0'
dd: opening `\\\\.\\PhysicalDrive0': Invalid argument
You may need to use
dd if=/dev/zero of=/dev/sdc
where sdc is whole drive that you want to be zeroed.
Check that you are sure that you are zeroing right drive.
sdc is the third whole drive,
sdc2 is the second partition on the third drive (contains boot sector if it is there).
Cygwin uses standard *nix terminology for local drives.
You may want to use pv
(pipe viewer, it is available in Cygwin) to see the progress:
pv /dev/zero > /dev/sdc
This works:
dd if=/dev/null of='\\.\PhysicalDrive0' conv=notrunc,nocreat
Upd: Cygwin has an alias /dev/sda
for PhysicalDrive0
and so forth and opening it like this does not require conv flags