extracting SMART parameters into a file

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Posts: 1660
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

extracting SMART parameters into a file

#1 Post by recuperation »

Use smartmontools on a working system or by running Knoppix from DVD or a USB stick if your installation broke down.
Smartmontools is a free and open source software that deals with the health information of drives.

Create a report of the SMART parameters running
smartctl -a /dev/sdx > myreport.txt
at the command prompt. Replace the "x" in "sdx" by the drive letter (a small letter!) of your HDD in question. Post the log in your forum thread.

External drives may require some variations of the command.
If smartctl fails, use the additional parameter "-d sat,12" or "-d sat,16".
smartctl -a -d sat,12 /dev/sdx > myreport.txt

Other variants of the -"d"-parameter are outlined here:
https://www.smartmontools.org/browser/t ... rtctl.8.in

On older systems it may be necessary to adress the drives a little bit differently:
smartctl -a /dev/hdx > myreport.txt

additional help for starters:
In windows you would use the Windows Explorer to navigate to where the folder "smartmontools" is located which contains the file "smartctl.exe".
You can reach the command window (at least in Windows 7) by keying "cmd" into the address line of your explorer.
Then an additional command prompt windows pops up.
When running dir s* the file "smartctl.exe" should be visible.
Then you enter the command in bold letters above.