Site icon Learning & Doing

How to Check Bad Sectors or Bad Blocks on Hard Disk in Linux

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

$ sudo badblocks -v /dev/sda10 > badsectors.txt

------------ Specifically for ext2/ext3/ext4 file-systems ------------ 
$ sudo e2fsck -l badsectors.txt /dev/sda10
OR
------------ For other file-systems ------------ 
$ sudo fsck -l badsectors.txt /dev/sda10

Scan Bad Sectors on Linux Disk Using Smartmontools

------------ On Debian/Ubuntu based systems ------------ 
$ sudo apt-get install smartmontools
------------ On RHEL/CentOS based systems ------------ 
$ sudo yum install smartmontools
$ man smartctl
$ smartctl -h
$ sudo smartctl -H /dev/sda10
Exit mobile version