Wednesday, January 17, 2018

Netcat weirdness - corruption

I thought I'd try to image a hard drive over the local network.

I boot knoppix on each system, figure out the ip address with ifconfig and then


nc -l 5000 | pv > /media/sdc1/MY_IMAGE_FILE

and on the system to be imaged:

dd if=/dev/sda | pv | nc -N 192.168.1.1 5000


I like to pipe it through pv so I can see what's happening.

I've got a 250GB hard drive so at around 20MB/sec it takes a while, 250E9 / 20e6 / 60 / 60 = 3.47 hours.

But when I check it with md5sum I get different results. Very strange. I thought that TCP connections were supposed to be error corrected.

I do an image directly to a usb drive and the md5sums match.

netstat -s
nstat

gives a lot of statistics,

I see quite a few errors, maybe the network card or switch is acting up. This is the kind of thing that drives you crazy.

No comments:

Post a Comment