physical disk access

Corinna Vinschen corinna@vinschen.de
Fri Dec 31 13:28:00 GMT 1999


Bob McGowan wrote:
> [...]
> I wanted to use dd to verify disk sizes on reads and writes, so I used
> the following two commands:
> 
>   dd if='\\.\F:' of=/dev/null bs=1024k
>   zero | dd of='\\.\F:' bs=1024k
> 
> where the command zero just generates null bytes on standard out.
> [...]
> I would have expected dd to work for both in and out operations under
> these circumstances.  Any idea why it didn't?
> 
> I am running the Cygwin 1.0 environment from the CD, no updates.

If you want to use raw devices with cygwin you have to mount them.
Some examples:

  mount -f -b -s //./F:  /dev/hdb2             # partition
  mount -f -b -s //./physicaldrive0 /dev/hda   # hard disk
  mount -f -b -s //./tape0 /dev/st0            # rewind tape
  mount -f -b -s //./tape0 /dev/nst0           # same as norewind

In further commands you have to use the mountpoints for correct
results:

  dd if=/dev/hdb2 of=/dev/null bs=1024k
  zero | dd of=/dev/hdb2 bs=1024k

Hope, this helps,
Corinna

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list