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
Locked
Message
Author
recuperation
Posts: 2235
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.

On windows installations of smartmontools you can find a menu entry to update the database. Running that updates could resolve issues with some unknown attributes in newer drives.

Create a report of the SMART parameters running
smartctl -a /dev/sdx > myreport.txt
at the command prompt.

Under Windows you probably need admin rights to run that command.
Under Linux some distributions migh require you to put a "sudo" in front of the command:
sudo smartctl -a /dev/sdx > myreport.txt

Replace the "x" in "sdx" by the drive letter (a small letter!) of your HDD in question. Post the log in your forum thread using the attachment tab on the bottom of the page.

Hint for beginners:
The linux drive names a,b,c,... in a device name like /dev/sdb correspond to complete disk drives, not to Windows drive letters like "a:" for floppy or "c:" which is typically a partition on a hard drive.
When running smartmontools under Windows, use the disk management function. Your disks are listed with numbers in ascending order (drive 0, drive 1, drive 2). Normally drive 0 corresponds to /dev/sda, drive 1 corresponds to /dev/sdb....
When unsure, look at the log, smartmontools provides you with the maker, the model and the serial number of the drive that it is reporting about.



External drives may require some variations of the command.
If smartctl fails, use the additional parameter "-d sat,12" or "-d sat,16".
Example:
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.

Locked