New Linux Tool - HDDSuperTool

A place to discuss various hard drive diagnostic tools and their results.
Post Reply
maximus
Posts: 6
Joined: Mon Jul 13, 2015 11:28 pm

New Linux Tool - HDDSuperTool

Post by maximus » Mon Jul 13, 2015 11:30 pm

Hddscripttool has now become HDDSuperTool. Actually that was the first name I had for it, but I did not think it was worthy of having the word “super” in it when first released. HDDSuperTool is a scriptable tool for accessing hard drives. It is still closed source, but the free version is considered freeware (proprietary version to come in the future with more goodies). It now comes with more scripts that can do more of the things that MHDD can do, including scanning, smart data, and basic imaging. Since it is provided as an executable, it can be run from a Linux Live CD without installing. It is created in Ubuntu (Debian based), but also seems to work on other distributions such as Fedora. As long as the version of Linux supports the needed functions, it is likely to work.

HDDSuperTool can be found at:
www.sdcomputingservice.com

There are also a couple exciting improvements over the original hddscripttool.

First, the advanced scripting has been opened up to be free. This allows the scripts to be written in a way that can be menu driven. The scripts I am providing with it are menu driven, but can also be run separate from the command line if desired. Along with the scripting menu ability, it now has the ability to list available drives with model and serial numbers and allow choosing the drive from a menu. Please feel free to suggest additional functions you would like to see added.

Second, HDDSuperTool now has the ability to perform direct port IO. This means it can see and work with drives that Linux or other operating systems are not able to. Direct IO only works in IDE mode for SATA drives, AHCI is not supported. Some computers may not properly support IDE mode. I happen to have one of those computers, and Linux sees all SATA drives as AHCI even though it is switched in the BIOS, where MHDD is able to see them. On the plus side, I also have computers without IDE connectors on the motherboard (as many newer ones do not have this), and have installed JMicron IDE PCI adapter cards. MHDD is unable to see those, but HDDSuperTool can. When using direct IO mode, it is highly recommended to apply power to the drive AFTER Linux boots up. That way the OS doesn’t see the drive and therefore does not try to access it. Please see the warnings in the manual about direct IO before using it.

An additional bonus is that it can work with USB attached ATA drives in the normal passthrough mode. However, you are at the mercy of the USB to ATA adapter as to what commands are supported, and how it responds to those commands.

Please use HDDSuperTool with caution. It is a very powerful tool. It is also very flexible since it is script based. This means anyone that wants to learn the scripting language can write their own functions. I have documented the language as best I could. It also means that if for some reason I am no longer able/willing to support it, new scripts can still be written for it. As long as the core program is as bug free as possible, it could live on for some time. Move over, MHDD! HDDSuperTool is coming out to play!

PS
Wonder why I think it is now worthy of the word “Super”? Direct IO can do some amazing things. I have seen the potential to be able to work with and even clone drives that something like ddrescue would struggle with or totally fail. There is great potential to be able to work with some drives that would normally require an expensive hardware tool. So maybe you can look forward to a new style cloning utility in the future, although that option will not be free (but likely very affordable). Much work is needed before that will be ready…

Jared
Posts: 61
Joined: Tue Jan 13, 2015 5:56 pm
Location: Providence, RI
Contact:

Re: New Linux Tool - HDDSuperTool

Post by Jared » Tue Jul 14, 2015 3:35 pm

I'm very intrigued by this tool. Can't wait to play around with it a bit later. A Linux software option that potentially could have DDI type imaging capabilities would definitely be something I'd invest some $$$ into.

Let me know if you need any help beta testing new features.

Please feel free to post about it in my data recovery forum too: https://www.data-medics.com/forum
I'm sure other guys there would be interested in this.

lcoughey
Site Admin
Posts: 303
Joined: Thu Jan 08, 2015 7:23 pm

Re: New Linux Tool - HDDSuperTool

Post by lcoughey » Tue Jul 14, 2015 3:44 pm

I plan to take a look when I have a few spare cycles. The concept certainly seems valid.

maximus
Posts: 6
Joined: Mon Jul 13, 2015 11:28 pm

Re: New Linux Tool - HDDSuperTool

Post by maximus » Wed Jul 15, 2015 10:13 pm

Right now I have a very good proof of concept, but more testing is needed. You can test it with the free version using direct IO, but only with PIO commands. I am saving DMA for the paid version. DMA was very hard for me to implement in this circumstance, and I am not willing to give it up without some sort of return. DMA is also not fully finished yet in some ways. You may also not get the same results when using PIO mode vs. DMA (the resets may not give the same positive results, in my case resets do not make it past faults when using PIO reads).

One of the most important features about direct IO is the ability to send a soft reset at any time. In the event of a bad read, you can send a soft reset well before the drive times out, which can lead to increased ability to get past the bad read much faster. You can also do this with the read error control timer if it is supported, but the soft reset mode will work on all drives. The only downside is that some drives might take longer to recover from a reset then it would to just time out on the read.

The real magic happens when this method will make it past an area that would normally cause a device fault, which would require power cycling the drive. At this time I only have one drive like this to test with, but I am very excited about the potential. It is a 750GB Seagate drive. As soon as Linux touches it, the drive will fault out. I even erased sector 0 so there was no partition table, but there is something else being read that kills it (smart logs maybe?). But with direct IO, I can read sectors from the drive, and when using DMA mode with a soft reset timeout it will make it past the areas that would normally fault out. I have only done short runs on this drive as I don’t want to totally kill it yet, but the indication is that I could fully clone this drive (minus the errors of course). Ddrescue could never even see this drive, let alone work with it without multiple power cycles. But HDDSuperTool could very possibly, if not likely, clone it without stopping. But more testing is needed to see how this will work with different drives.

lcoughey
Site Admin
Posts: 303
Joined: Thu Jan 08, 2015 7:23 pm

Re: New Linux Tool - HDDSuperTool

Post by lcoughey » Thu Jul 16, 2015 12:26 pm

You certainly don't want to read an entire 4TB drive in PIO mode.

maximus
Posts: 6
Joined: Mon Jul 13, 2015 11:28 pm

Re: New Linux Tool - HDDSuperTool

Post by maximus » Thu Jul 16, 2015 9:29 pm

lcoughey wrote:You certainly don't want to read an entire 4TB drive in PIO mode.
No, that would be very bad. You would likely kill the drive before it finished. This is mostly meant to be a utility at this time. I included a very basic imaging script, but it is very basic and not meant as a good cloning method. It only reads in 256 sector blocks (unless you edit the script). If you use passthrough mode then it has DMA access, but then it is using the OS and it would be much better to use ddrescue.

When I add the actual cloning ability, it will be internal and not script based.

And I would like to clarify about not having DMA finished yet. When a drive is powered up, the controller (BIOS) negotiates usually the lowest speed. I have not yet tried to alter the controller settings to set a higher speed, and you can't just change it on the drive and have it work. That is for actual IDE drives. SATA drives don't seem to care what DMA mode they are in, and seem to achieve full speed even when the drive reports a low DMA mode.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest