DD over Netcat

View: New views
8 Messages — Rating Filter:   Alert me  

DD over Netcat

by Jwelch :: Rate this Message:

| View Threaded | Show Only this Message

I've been trying to do a block copy of one of my systems but I'm having an issue with finding the partition on cygwin. When I go to /dev, I don't see my hard drives so I can't do a DD. Here is the website I was using:DD over Netcat

How can I setup cygwin, so I can have linux directories rather than windows?

~Jay

RE: DD over Netcat

by Dave Korn :: Rate this Message:

| View Threaded | Show Only this Message

Jwelch wrote on 26 June 2008 18:13:

> I've been trying to do a block copy of one of my systems but I'm having an
> issue with finding the partition on cygwin. When I go to /dev, I don't see
> my hard drives so I can't do a DD.

  Even though you don't see them, they are there.  The /dev filesystem is
(more-or-less) entirely synthetic under cygwin.  See here for the details of
the device names you'll want to use:

http://cygwin.com/cygwin-ug-net/using-specialnames.html

Note especially the first paragraph under "POSIX devices".

    cheers,
      DaveK
--
Can't think of a witty .sigline today....


--
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 over Netcat

by Jwelch :: Rate this Message:

| View Threaded | Show Only this Message

Ok, that makes sense but I don't have the /device directory. How do I create it so I can see it?



Dave Korn wrote:
Jwelch wrote on 26 June 2008 18:13:

> I've been trying to do a block copy of one of my systems but I'm having an
> issue with finding the partition on cygwin. When I go to /dev, I don't see
> my hard drives so I can't do a DD.

  Even though you don't see them, they are there.  The /dev filesystem is
(more-or-less) entirely synthetic under cygwin.  See here for the details of
the device names you'll want to use:

http://cygwin.com/cygwin-ug-net/using-specialnames.html

Note especially the first paragraph under "POSIX devices".

    cheers,
      DaveK
--
Can't think of a witty .sigline today....


--
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 over Netcat

by Mark J. Reed-2 :: Rate this Message:

| View Threaded | Show Only this Message

There is no \device directory.   You just use /dev/whatever even
though it doesn't show up in ls.

On Thu, Jun 26, 2008 at 2:17 PM, Jwelch <jwelch@...> wrote:

>
> Ok, that makes sense but I don't have the /device directory. How do I create
> it so I can see it?
>
>
>
>
> Dave Korn wrote:
>>
>> Jwelch wrote on 26 June 2008 18:13:
>>
>>> I've been trying to do a block copy of one of my systems but I'm having
>>> an
>>> issue with finding the partition on cygwin. When I go to /dev, I don't
>>> see
>>> my hard drives so I can't do a DD.
>>
>>   Even though you don't see them, they are there.  The /dev filesystem is
>> (more-or-less) entirely synthetic under cygwin.  See here for the details
>> of
>> the device names you'll want to use:
>>
>> http://cygwin.com/cygwin-ug-net/using-specialnames.html
>>
>> Note especially the first paragraph under "POSIX devices".
>>
>>     cheers,
>>       DaveK
>> --
>> Can't think of a witty .sigline today....
>>
>>
>> --
>> 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/
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/DD-over-Netcat-tp18138826p18140123.html
> Sent from the Cygwin list mailing list archive at Nabble.com.
>
>
> --
> 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/
>
>



--
Mark J. Reed <markjreed@...>

--
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 over Netcat

by Dave Korn :: Rate this Message:

| View Threaded | Show Only this Message

Jwelch wrote on 26 June 2008 19:18:

> Ok, that makes sense but I don't have the /device directory.

  Not "/device", "/dev".

>  How do I create it so I can see it?

  "mkdir /dev" will create it (but won't populate it), or perhaps better,
you could use the create_devices.sh script that is linked from that "POSIX
devices" paragraph.  But the point is, you don't need to be able to see it;
it's all still there and "just works".


    cheers,
      DaveK
--
Can't think of a witty .sigline today....


--
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 over Netcat

by Brian Dessent :: Rate this Message:

| View Threaded | Show Only this Message

Jwelch wrote:

> Ok, that makes sense but I don't have the /device directory. How do I create
> it so I can see it?

You are misinterpreting what is written on that page.  There is no need
to create anything, nor is there a need to know about anything under
\Device as that is the NT name not the POSIX name, and you're using
POSIX dd.  You simply use dd with the appropriate
/dev/sd<letter><number>.  You won't see them in ls but they are
nonetheless present and work, like all the devices listed on that page.

To find out the correct <letter>, look in the Logical Disk Manager
service (can be accessed by running diskmgmt.msc).  You will see each
logical drive listed as "Disk 0", "Disk 1", etc.  /dev/sda corresponds
to Disk 0, /dev/sdb to Disk 1, and so on.  /dev/sda is the whole drive,
/dev/sda1 is the first partition of the drive, and so on.

Brian

--
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 over Netcat

by Jwelch :: Rate this Message:

| View Threaded | Show Only this Message

This is some good stuff, thanks for all the feedback, I really appreciate it. The problem I have now is that every time I try to DD the drive, it freezes on me. I have tried it 3 times and it freezes on the same number of bytes every time.

$ nc -l -p 7000 | dd of=/dev/sda
 punt!
16+0 records in
16+0 records out
8192 bytes (8.2 kB) copied, 972.875 s, 0.0 kB/s


Is there any way I can check for errors or any of you guys have an idea why it would do this?

Thanks

Brian Dessent wrote:
Jwelch wrote:

> Ok, that makes sense but I don't have the /device directory. How do I create
> it so I can see it?

You are misinterpreting what is written on that page.  There is no need
to create anything, nor is there a need to know about anything under
\Device as that is the NT name not the POSIX name, and you're using
POSIX dd.  You simply use dd with the appropriate
/dev/sd<letter><number>.  You won't see them in ls but they are
nonetheless present and work, like all the devices listed on that page.

To find out the correct <letter>, look in the Logical Disk Manager
service (can be accessed by running diskmgmt.msc).  You will see each
logical drive listed as "Disk 0", "Disk 1", etc.  /dev/sda corresponds
to Disk 0, /dev/sdb to Disk 1, and so on.  /dev/sda is the whole drive,
/dev/sda1 is the first partition of the drive, and so on.

Brian

--
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 over Netcat

by Christopher Faylor-8 :: Rate this Message:

| View Threaded | Show Only this Message

On Thu, Jun 26, 2008 at 12:39:20PM -0700, Jwelch wrote:

>This is some good stuff, thanks for all the feedback, I really appreciate it.
>The problem I have now is that every time I try to DD the drive, it freezes
>on me. I have tried it 3 times and it freezes on the same number of bytes
>every time.
>
>$ nc -l -p 7000 | dd of=/dev/sda
> punt!
>16+0 records in
>16+0 records out
>8192 bytes (8.2 kB) copied, 972.875 s, 0.0 kB/s
>
>Is there any way I can check for errors or any of you guys have an idea why
>it would do this?

Try varying the block size.  Does that make a difference?

i.e., bs=4096

cgf

--
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/