How does a downloaded ISO get corrupted?

3

1

Possible Duplicate:
Is it possible to get corrupted download with http?

I downloaded an ISO for fedora. Went to install it as a VM. It failed 5 times the installer. The warning for the failure was "possible corrupted install image". How does a downloaded ISO get corrupted?

(I am stubborn and didn't want to download the huge file again) So finally after 5 failures I went to download the ISO again... and I thought... maybe the warning was correct.

So instead of blindly trusting the download I went to verify the ISO using the supplied "sha256" checksum. "!well blow me down Olive Oil!" Sure enough the first downloaded ISO failed the failed the checksum test!

My question is this... What is the most likely way (or ways plural) that my ISO got corrupted?

UPDATE:

  • Both downloaded ISO files have the same total number of bytes.
  • How did I download the ISO file? I downloaded via a link in browser. And then the browser did the download. So http.
  • How is my computer connected to the internet, physical/wireless? Wireless. Wifi (unsecured... I am aware of the unsecured...).

Trevor Boyd Smith

Posted 2011-09-13T20:13:22.740

Reputation: 2 093

Question was closed 2011-09-14T08:03:21.780

How did you download the image (bittorrent or http or ftp)? How is your PC connected to the Internet? – sawdust – 2011-09-13T20:23:16.560

@TrevorBoydSmith Are you sure that the second image was actually downloaded from same server? Load balancing on the other side might have moved you to another server that has good image. Also you are being very aggressive to other people who are spending their time to help you. We can't know things that you know and therefore must list some likely reasons, even if they aren't applicable in your particular case. – AndrejaKo – 2011-09-13T20:56:43.757

thanks for the link to the duplicate. the duplicate is talking about exactly what i needed. – Trevor Boyd Smith – 2011-09-14T14:02:59.677

Answers

8

HTTP and FTP do not have built-in checksums. TCP provides basic checksumming methods (padding and ones-complement addition), but these do not account for data being corrupted either before transit, during storage (power failure), and after storage (corrupted hard drive).

BitTorrent, on the other hand, checksums each block received (a few hundred kilobytes to a few megabytes, depending on torrent) using a cryptographically strong(er) method (either CRC32 or MD5), which, on top of the TCP checksum, is almost guaranteed to be correct.

However, no amount of checksumming will prevent against corruption after the file has been saved. (power failure during download for example)

Hello71

Posted 2011-09-13T20:13:22.740

Reputation: 7 636

BitTorrent uses SHA-1 hashes, and most (all?) clients are able to re-verify already downloaded data upon user request. CRC32 doesn't even count as "cryptographic"; it's just a checksum, like TCP's algorithm. – user1686 – 2011-09-13T20:30:38.547

i never mentioned any sort of "there was a power failure"... so i don't really see why your answer is peppered with "during storage (power failure)" "(power failure during download for example)" – Trevor Boyd Smith – 2011-09-13T20:41:04.113

@grawity: Poor wording. – Hello71 – 2011-09-13T21:10:27.660

5

One notorious way to download a corrupted file is to use FTP in text mode for a non-text file (such as an ISO).

In text mode, the FTP protocol allows for translation of line-endings, so when downloading from Unix to Windows, every 0x0a is replaced by 0x0d 0x0a (LF -> CR LF) which is catastrophic for the integrity of a binary file where 0x0A can occur as part of the data not representing a newline / linefeed (LF)

RedGrittyBrick

Posted 2011-09-13T20:13:22.740

Reputation: 70 632

Added 2nd para to answer. – RedGrittyBrick – 2011-09-13T21:05:50.790

actually, translation on newlines depends on the platform. But I think this is lost on Mr. Smith. Thanks for the patience Brick, adding the explanation. – Florenz Kley – 2011-09-13T21:30:32.650

i should not have started my post with "not helpful". that was too not constructive on my part. – Trevor Boyd Smith – 2011-09-14T13:59:25.407

thank you for elaborating your answer I can now understand why using ftp in text mode would affect the download of a binary file. – Trevor Boyd Smith – 2011-09-14T14:00:32.317

0

Bad connection to server, downloading program saying it was done when it wasn't, file getting changed as it's downloading, getting disconnected, file not fully there when you're downloading it...

Canadian Luke

Posted 2011-09-13T20:13:22.740

Reputation: 22 162

i deleted the comment i posted because it was not the terribly constructive. instead of this comment i updated the question. – Trevor Boyd Smith – 2011-09-14T14:01:46.120