Sunday, July 10, 2016

checking for bad blocks on hard disk

The IBM ThinkCentre given by K for use by Ke's son had some disk issues - the hard disk was my former 160 GB laptop hard disk. Probably bad sectors and so on, so I had to do the Linux equivalent of running scandisk. Ubuntu 16.04 apparently doesn't support shutdown -Fr now for scanning on reboot - maybe due to systemd?

So, booted using USB flash drive and ran
sudo umount /dev/sda1
sudo e2fsck -c /dev/sda1

Apparently e2fsck with the -c option marks bad blocks using the badblocks program. 160 GB drive took 1 hour 30 minutes to scan - would have taken around 45 minutes if not for the 97 errors.

Output of badblocks 97/0/0 apparently means  read/write/corruption errors. Since I'm doing a read-only test, only the read errors show up.

No comments:

Post a Comment