Tuesday, 20 August 2013

"Bad file descriptor" with /dev/stdin using dd

"Bad file descriptor" with /dev/stdin using dd

I've been using this method (Running off a live CD on both ends, and in
root shell, as suggested in another of my questions) to clone one computer
I've got set up to my liking to four others with the same hardware.
The first two clonings went smoothly, but when I try the
sudo dd if=/dev/sda of=/dev/stdout | nc 1.2.3.4 5678
(with the correct ip, of course) on the third computer to clone, after a
short delay I'm greeted with the root@ubuntu:~# prompt again, rather than
having to wait ~3 hours as it actually does the cloning.
When I Ctrl+C out of the nc on the receiving end, after mentioning that no
records went in or out, and 0 bytes were copied, I see
dd: closing input file '/dev/stdin': bad file descriptor
The other clonings went fine, and all the computers I'm cloning to should
be identical other than in name/ip address etc (Although I'm only human,
and may have set them up slightly differently by accident, hence why I'm
cloning to ensure they're all the same in the end).
Any idea why this one particular computer refuses to be cloned to (Or why
the sender refuses to clone to it?)

No comments:

Post a Comment