[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trimming away bad sectors...
"Robert G. (Doc) Savage" <dsavage@peaknet.net> wrote ..
> Thanks for the link. Downloaded the src.rpm and rebuilt it for my
> machine. Then discovered an odd thing. Unlike the "real" dd, dd_rescue
> requires me to write to an output _file_ rather than stdout which can be
> piped to nc:
>
> listener:
> # nc -l -p 30000 > hda5.img
> source:
> # dd_rescue if=/dev/hda5 | nc 192.168.1.2 30000 -w 3
> dd_rescue: (fatal): both input and output have to be specified!
From the webpage:
> The current version is 1.10.
> Since 1.10, it has support for non-seekable input and output
> (so you can write to pipes, e.g. stdout).
Looking through the source code, you can see that you can use the special
filename '-' (dash) for the output filename to send the output to stdout.
So, your example source should be changed to:
# dd_rescue if=/dev/hda5 - | nc 192.168.1.2 30000 -w 3
And you should be good to go. Let us know how it went. However, due to the
non-seekable nature of the STDOUT character device, you will not be able to
run "partial" or a reverse dd working with a target file to fill in the missing areas you're ripping from the bad disk.
Another poster also mentioned NFS/SMB mounting as well. But, if you're doing this via remote connection into the box, netcat is a heck of a lot simpler than firing up SMB/NFS servers and clients. I assume you're tunnelled through SSH (or you could setup a port forward and then use netcat to send it to the local forward, tunnel it back through SSH, and then receive it with nc on your remote console.
Mike/
-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.