[
Dear Moderator: when composing my first post, I accidentally clicked Submit when I meant to click on Preview. Crap!!! So, only a fraction of my text is there.
Below is the complete post that I originally intended. If you can replace my original post with the text below, that would be great. I ask because I see no way to edit my original post at this point.
And please read all of it before concluding that Linux Mint is defective! I offer evidence that there is something wrong with the HDS .gz archive.
Finally, if you could give me the privilege to use url tags to make proper hyperlinks, I am sure that everyone reading this would be grateful.]
Background: I have a Windows laptop with a corrupted disk and/or file system that I need to diagnose.
So I created a bootable USB flash drive running the latest Linux Mint Cinnamon (20.2) that I want to put disk diagnostic tools on.
The first tool that I want to use is the Linux version of Hard Disk Sentinel.
(Link: https://www.hdsentinel.com/hard_disk_sentinel_linux.php)
In particular, in the previous link's "Download Hard Disk Sentinel Linux" section, I want to use "Hard Disk Sentinel 64-bit Linux console version - executable, gzip-compressed".
(Link: https://www.hdsentinel.com/hdslin/hdsentinel-019c-x64.gz)
That last link downloads the gzip archive file hdsentinel-019c-x64.gz which I think is malformed.
In particular, when I try to extract it in Linux Mint I get different (wrong) results whereas I can extract it in Windows (partly correctly with cygwin, fully correctly with 7-zip).This is likely not a problem with my version of Linux Mint or cygwin, since I also tested a different gzip archive file and found that Mint and cygwin extracted it perfectly.Therefore, the issue seems to be with hdsentinel-019c-x64.gz: it must have been created with a tool that violates the gzip spec or something?
Full details follow.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What I first tried in Linux Mint:
I opened a browser, went to
(Link: https://www.hdsentinel.com/hard_disk_sentinel_linux.php)
and downloaded the file
hdsentinel-019c-x64.gz
I immediately tried to extract the file inside that archive by executing
- Code: Select all
$ gzip -dk hdsentinel-019c-x64.gz
Here is the result:
- Code: Select all
$ ls -al
...
-rw-rw-r-- 1 mint mint 1589849 Aug 12 00:16 hdsentinel-019c-x64
-rw-rw-r-- 1 mint mint 1589737 Aug 12 00:16 hdsentinel-019c-x64.gz
Note that the file that was extracted is named hdsentinel-019c-x64 (NOT HDSentinel) and that its size (1589849) is barely bigger than the gzip archive that it came from (1589737). These are all bad signs. To no surprise then, when I tried to execute it
- Code: Select all
sudo ./hdsentinel-019c-x64
that failed with an error message.
What the heck is going on with that archive?
Here is what the gzip command thinks it contains:
- Code: Select all
$ gzip -lv hdsentinel-019c-x64.gz
method crc date time compressed uncompressed ratio uncompressed_name
defla c0f770b6 Aug 12 00:16 1589737 1589849 0.0% hdsentinel-019c-x64
The output above agrees exactly with what gzip extracted above, but it is definitely NOT what that archive is supposed to contain, see below.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What I next tried in a different Windows 10 computer:
I opened a cygwin bash shell and first examined the contents of hdsentinel-019c-x64.gz:
- Code: Select all
$ gzip -lv hdsentinel-019c-x64.gz
method crc date time compressed uncompressed ratio uncompressed_name
defla a757f917 Aug 11 14:56 1589849 3222032 50.7% hdsentinel-019c-x64
Bad: it still thinks that the file to extracted is named hdsentinel-019c-x64 (NOT HDSentinel). Good: it now thinks that its uncompressed size (3222032) is much bigger than the gzip archive that it came from (1589849).
In cygwin, I extracted it using
- Code: Select all
$ gunzip -k hdsentinel-019c-x64.gz
which left the file
- Code: Select all
hdsentinel-019c-x64
which is the wrong file name (should be HDSentinel) but its size is correct (3222032).
I next opened hdsentinel-019c-x64.gz in 7-zip. There, I see that the compressed file has the proper name HDSentinel, and using 7-zip I extracted that file.
I then compared the 7-zip extraction (HDSentinel) against the cygwin extraction (hdsentinel-019c-x64) and found that they were byte-byte identical.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Summary for hdsentinel-019c-x64.gz:
--Linux Mint gets the extracted file name and file contents wrong
--cygwin gets the extracted file name wrong but the file contents correct
--7-zip gets the extracted file name and file contents correct
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You may be wondering if there is something buggy with my cygwin or Linux Mint.
I do not think so.
I used 7-zip to create a totally new gzip archive, and I found that both cygwin and Linux Mint were able to extract the file perfectly (both its name and contents).
I conclude that there is something wrong just with the archive file hdsentinel-019c-x64.gz: was it created with a tool that did not follow the proper gzip format?