WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Checksum test for 'tce-load -i'  (Read 1789 times)

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Checksum test for 'tce-load -i'
« on: March 03, 2010, 04:29:30 PM »
I've only now realized that when installing a (local) extension (e.g. tce-load -i /path/to/file/EXT.tcz) no check with a corresponding checksum file (e.g. /path/to/file/EXT.tcz.md5.txt) is done. IMHO this checksum test is a useful protection against file corruptions. Maybe this should be considered as an enhancement.

Such an enhancement could work like this: If a corresponding .md5.txt is present, the checksum test gets executed and in case of a failed test no installation takes place. If no corresponding .md5.txt is present a warning will be issued, but the installation shall proceed nevertheless.

In the case of a failed checksum the user would be made aware of it. The user has then the options to either "outfox the logic" (e.g. by deleting the non-matching .md5.txt file) or investigate why that just happened.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: Checksum test for 'tce-load -i'
« Reply #1 on: March 03, 2010, 07:20:47 PM »
Sounds useful, but one of the key strengths of Tiny Core is how fast extensions load. This would greatly affect that without any practical benefit.

I had some experience with this. I was booting from a defective USB drive, and I noticed that unsquashfs failed on some extensions (I had a script that extracted them manually for special reasons). I fixed them, and later some different ones failed. As I found, unsquashfs (and thus tce-load) can detect file corruption without using the md5 sum. There is no practical need to check against the md5 sum except manually when you suspect problems.