Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If you are wanting to check to see if the drive itself is still good the utility available from the manufacturer is a good choice.
The Ultimate boot CD has most of them. http://www.ultimatebootcd.com/
There is a S.M.A.R.T. utility that is native to Linux and should in theory work on any chipset/HDD combination which purport to support SMART. To use it you need to start the smartd daemon, and smartctl is the test utility you use to interact with the SMART tests built into the hard drive(s).
For DETAILED info on SMART:
man smartd
man smartctl
Well to be honest, it's the hard drives' firmware that is actually conducting the low-level test, and that information is usually proprietary. It is unlikely you will receive the source code for those tests as all the S.M.A.R.T. utilities do is request via the SMART protocol that the drives run their internal tests. To get access to the source you'd need to work for a data recovery company which has reverse-engineered the firmware or has a partnership with the manufacturers, actually work for one of the manufacturers, or reverse engineer the drives' firmware yourself from the machine language code in the chips.
It's unlikely that you would actually be able to write a portable HDD low-level testing utility without using SMART since sector addresses are abstracted and not revealed to programmers interacting with the drives anyhow; the drives' firmware actually handles the internal addressing. Any CHS specs you might see are works of fiction which only work out mathematically to a size which the drive's firmware will agree with. Why would you need that info anyhow, considering that SMART will do most if not all of what you would need?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.