copy corrupting last block of file?

Tom Horsley horsley1953 at gmail.com
Thu Dec 20 23:48:53 UTC 2012


This looks suspiciously like a software problem of some kind:

I've got a file (a firmware update) I try to copy to an sdcard.

Two different copies now have shown as corrupted at the start
of the final 16K boundary of the file data:

zooty> cmp /zooty/public/S800CUpdate/firmware/firmware.bin /tmp/tom/bad-linux-firmware/firmware.bin 
/zooty/public/S800CUpdate/firmware/firmware.bin /tmp/tom/bad-linux-firmware/firmware.bin differ: char 127041537, line 496168

zooty> cmp /zooty/public/S800CUpdate/firmware/firmware.bin /tmp/tom/firmware/firmware.bin 
/zooty/public/S800CUpdate/firmware/firmware.bin /tmp/tom/firmware/firmware.bin differ: char 127041537, line 496168

That 127041537 value in hex is 0x7928001.

Worst yet, if I use rsync rather than cp to copy the file, lo and behold the
contents turn up identical!

Is the "cp" command busted? That would be insane.


More information about the users mailing list