Re: dd Bug using \.\PhysicalDriveX ?

2007-09-20 Thread Corinna Vinschen
On Sep 19 14:53, DePriest, Jason R. wrote:
 On 9/19/07, Eric Blake  wrote:
  Scalzott, Todd  writes:
   I've discovered what I believe to be a problem with dd on several
   different XP SP2 systems with Cygwin installed involving the usage of
   Windows' \\.\PhysicalDrive nomenclature.
 
  That's your problem.  Cygwin is a Linux emulation, and use of Window's \\.\
  nomenclature is not guaranteed to work.  Using the corresponding posix-y 
  name
  is more likely to succeed, in which case the bug is not in dd but in your 
  usage.
 
  [...]
 I concur with Eric Blake.  I have used dd, dd_rescue, aimage, and the
 sleuthkit under Cygwin using the /dev/sdX nomenclature.
 It works once you can figure out which /dev/sdX corresponds to which
 device+partition.

...which isn't that tricky.  In the Disk Management tool (for instance
right click My Computer - Manage to get there via the Computer
Management admin tool) disks are numbered Disk 0, Disk 1, etc.
This order corresponds with /dev/sda, /dev/sdb, etc.  Partitions are
numbered left to right.  /dev/sda1 corresponds to the first partition,
etc.

Similar for CD-ROM and DVD drives.  In the Disk Management tool they are
numbered CD-ROM 0, CD-ROM 1, etc, which corresponds to /dev/sr0,
/dev/sr1, etc..  Alternatively to /dev/scd0, /dev/scd1, etc.

For tape drives, have a look into the Device Manager.  The properties
dialog of each tape drive has a tab Tape Symbolic Name.  Tape0
corresponds to /dev/st0, /dev/nst0, Tape1 to /dev/st1, /dev/nst1, etc.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Re: dd Bug using \.\PhysicalDriveX ?

2007-09-20 Thread Scalzott, Todd
Thank you for the correction on coreutils.

Yes, I am using cmd.exe.  The quotes are necessary (try it) or dd goes
off searching for an UNC.

I have  no problem using /dev/sdb, etc., but others that need to know
how to do a simple image burn do.  So believe it or not, the physical
drive mapping is easier for them.

Thank you all for your help 

-Original Message-
From: Eric Blake [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 19, 2007 2:24 PM
To: cygwin@cygwin.com
Subject: Re: dd Bug using \.\PhysicalDriveX ?

Scalzott, Todd tscalzott at kastle.com writes:

 
 I believe that this is part of CORE, which I have at 6.9-5.  I did 
 update to all of the latest just a short while ago and reverified the 
 problem.

There's no such thing as CORE in the cygwin distribution; you meant
coreutils.

 
 I've discovered what I believe to be a problem with dd on several 
 different XP SP2 systems with Cygwin installed involving the usage of 
 Windows' \\.\PhysicalDrive nomenclature.

That's your problem.  Cygwin is a Linux emulation, and use of Window's
\\.\ nomenclature is not guaranteed to work.  Using the corresponding
posix-y name is more likely to succeed, in which case the bug is not in
dd but in your usage.

 
 That is, reading from \\.\PhysicalDrive1 with the below command works
 flawlessly:
 dd if=^\^\.^\PhysicalDrive1 of=tmp.img bs=16384

That's an unusual quoting style; it certainly doesn't work under bash.
Are you by chance trying this under cmd.com?  In which case, why are you
bothering with quoting? cmd.com passes \ through without the need for
quoting.

At any rate, what you probably wanted something more like this (less
typing, and no need for quoting, whether in cmd.com or bash):

dd if=tmp.img of=/dev/sda bs=16K

See http://cygwin.com/cygwin-ug-net/using-specialnames.html for more
details.

--
Eric Blake
volunteer cygwin coreutils maintainer



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Re: dd Bug using \.\PhysicalDriveX ?

2007-09-20 Thread Corinna Vinschen
On Sep 20 10:14, Scalzott, Todd wrote:
 Thank you for the correction on coreutils.
 
 Yes, I am using cmd.exe.  The quotes are necessary (try it) or dd goes
 off searching for an UNC.
 
 I have  no problem using /dev/sdb, etc., but others that need to know
 how to do a simple image burn do.  So believe it or not, the physical
 drive mapping is easier for them.
 

But it won't work as you expect.  There's special handling for the
raw devices which only works if the used device name is the POSIX
device name.  If you're using the unsupported \\.\foo syntax, you're
on your own.  If it doesn't work... *shrug*.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: dd Bug using \.\PhysicalDriveX ?

2007-09-20 Thread DePriest, Jason R.
On 9/20/07, Corinna Vinschen [EMAIL PROTECTED] wrote:

 ...which isn't that tricky.  In the Disk Management tool (for instance
 right click My Computer - Manage to get there via the Computer
 Management admin tool) disks are numbered Disk 0, Disk 1, etc.
 This order corresponds with /dev/sda, /dev/sdb, etc.  Partitions are
 numbered left to right.  /dev/sda1 corresponds to the first partition,
 etc.

 Similar for CD-ROM and DVD drives.  In the Disk Management tool they are
 numbered CD-ROM 0, CD-ROM 1, etc, which corresponds to /dev/sr0,
 /dev/sr1, etc..  Alternatively to /dev/scd0, /dev/scd1, etc.

 For tape drives, have a look into the Device Manager.  The properties
 dialog of each tape drive has a tab Tape Symbolic Name.  Tape0
 corresponds to /dev/st0, /dev/nst0, Tape1 to /dev/st1, /dev/nst1, etc.


 Corinna

 --
 Corinna Vinschen  Please, send mails regarding Cygwin to
 Cygwin Project Co-Leader  cygwin AT cygwin DOT com
 Red Hat

Corinna, thanks for the tip about the order in Disk Management
corresponding to the /dev/sdX order.

I never thought of that since I was always trying to find a tool to
give me the information from the command-line.

That will make things easier in the future.

-Jason

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



dd Bug using \\.\PhysicalDriveX ?

2007-09-19 Thread Scalzott, Todd
I believe that this is part of CORE, which I have at 6.9-5.  I did
update to all of the latest just a short while ago and reverified the
problem.
 
I've discovered what I believe to be a problem with dd on several
different XP SP2 systems with Cygwin installed involving the usage of
Windows' \\.\PhysicalDrive nomenclature.
 
That is, reading from \\.\PhysicalDrive1 with the below command works
flawlessly:
dd if=^\^\.^\PhysicalDrive1 of=tmp.img bs=16384
However, writing to \\.\\PhysicalDrive1 in similar fashion fails with an
error:
dd if=tmp.img of=^\^\.^\PhysicalDrive1 bs=16384
dd: opening `.\\PhysicalDrive1': Invalid argument

PhysicalDrive1 is a removeable drive.

Thank you.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: dd Bug using \.\PhysicalDriveX ?

2007-09-19 Thread Eric Blake
Scalzott, Todd tscalzott at kastle.com writes:

 
 I believe that this is part of CORE, which I have at 6.9-5.  I did
 update to all of the latest just a short while ago and reverified the
 problem.

There's no such thing as CORE in the cygwin distribution; you meant coreutils.

 
 I've discovered what I believe to be a problem with dd on several
 different XP SP2 systems with Cygwin installed involving the usage of
 Windows' \\.\PhysicalDrive nomenclature.

That's your problem.  Cygwin is a Linux emulation, and use of Window's \\.\ 
nomenclature is not guaranteed to work.  Using the corresponding posix-y name 
is more likely to succeed, in which case the bug is not in dd but in your usage.

 
 That is, reading from \\.\PhysicalDrive1 with the below command works
 flawlessly:
 dd if=^\^\.^\PhysicalDrive1 of=tmp.img bs=16384

That's an unusual quoting style; it certainly doesn't work under bash.  Are you 
by chance trying this under cmd.com?  In which case, why are you bothering with 
quoting? cmd.com passes \ through without the need for quoting.

At any rate, what you probably wanted something more like this (less typing, 
and no need for quoting, whether in cmd.com or bash):

dd if=tmp.img of=/dev/sda bs=16K

See http://cygwin.com/cygwin-ug-net/using-specialnames.html for more details.

-- 
Eric Blake
volunteer cygwin coreutils maintainer



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: dd Bug using \.\PhysicalDriveX ?

2007-09-19 Thread DePriest, Jason R.
On 9/19/07, Eric Blake  wrote:
 Scalzott, Todd  writes:

 
  I believe that this is part of CORE, which I have at 6.9-5.  I did
  update to all of the latest just a short while ago and reverified the
  problem.

 There's no such thing as CORE in the cygwin distribution; you meant coreutils.

 
  I've discovered what I believe to be a problem with dd on several
  different XP SP2 systems with Cygwin installed involving the usage of
  Windows' \\.\PhysicalDrive nomenclature.

 That's your problem.  Cygwin is a Linux emulation, and use of Window's \\.\
 nomenclature is not guaranteed to work.  Using the corresponding posix-y name
 is more likely to succeed, in which case the bug is not in dd but in your 
 usage.

 
  That is, reading from \\.\PhysicalDrive1 with the below command works
  flawlessly:
  dd if=^\^\.^\PhysicalDrive1 of=tmp.img bs=16384

 That's an unusual quoting style; it certainly doesn't work under bash.  Are 
 you
 by chance trying this under cmd.com?  In which case, why are you bothering 
 with
 quoting? cmd.com passes \ through without the need for quoting.

 At any rate, what you probably wanted something more like this (less typing,
 and no need for quoting, whether in cmd.com or bash):

 dd if=tmp.img of=/dev/sda bs=16K

 See http://cygwin.com/cygwin-ug-net/using-specialnames.html for more details.

 --
 Eric Blake
 volunteer cygwin coreutils maintainer

I concur with Eric Blake.  I have used dd, dd_rescue, aimage, and the
sleuthkit under Cygwin using the /dev/sdX nomenclature.
It works once you can figure out which /dev/sdX corresponds to which
device+partition.

-Jason

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/