Check Bad Blocks or Sectors on your Hard Drive with Pisi Linux

Hello to all

Today i have check my Hard Drive in Pisi Linux 2.0, my Hard Drive is 8 Years old and works, works and works. But with all the working i check from Time to Time my complete Hard Drive.

The checking is simple and easy in Linux, but you ask now how works it in Pisi Linux. It was the same as for all Linux Systems.

You can check it with the Smartmontools on command line , or with the Partition Manager.

The Partition Manager is installed as default in Pisi Linux, should you missing it, install it with the Package Manager or with the command

sudo pisi it partitionmanager

When it was installed open it from Menu>System>KDE Partition Manager

it ask for a Root Password when you will open it

After start go to Device>Smart Status it gives you immediately a output

 

smart-status

 

or you work with the Smartmontools on commandline

for this when it was not installed, install it with the Package Manager or with command line

sudo pisi it smartmontools

Once the installation is complete, use smartctl which controls the S.M.A.R.T system integrated into a disk. You can look through its man page or help page as the follows:

man smartctl

or

smartctl -h

Now you can start to check your Hard Disk,  name your specific device as an argument as in the following command, the flag -H or –health is included to display the SMART overall health self-assessment test result.

sudo smartctl -H /dev/sda2, or other entries

you can check your partitions before you start with the fdisk command
fdisk-l

 

sudo smartctl -H /dev/sda2

smartctl-h

 

The result above indicates that your hard disk is healthy, and may not experience hardware failures any soon.

For an overview of disk information, use the -a or –all option to print out all SMART information concerning a disk and -x or –xall which displays all SMART and non-SMART information about a disk.

 

With another tool you can check too

Check your Disk or USB Device or other again as see above with the fdisk -l command

fdisk-l

 

Then scan your Pisi Linux disk drive to check for bad sectors/blocks by typing as example:

sudo badblocks -v /dev/sda2 > badsectors.txt

badblocks-v

 

With this command you become a output as .txt File in your Home Directory.

badsectors-txt

 

In the command above, badblocks is scanning device /dev/sda2 (remember to specify your actual device) with the -v enabling it to display details of the operation. In addition, the results of the operation are stored in the file badsectors.txt by means of output redirection.

In case you discover any bad sectors on your disk drive, unmount the disk and instruct the operating system not to write to the reported sectors as follows.

The -l option tells the command to add the block numbers listed in the file specified by filename (badsectors.txt) to the list of bad blocks.