nedelja, 24. februar 2013

Finding bad blocks on hard drive in Linux

Run:

  • sudo badblocks -v /dev/sda1 > bad.block
  • sudo fsck -t ext4 -l bad.block /dev/sda1
badblocks is part of the e2fsprogs package in Ubuntu. The first command will find all bad blocks that you may have on /dev/sda1 and the second one will try to move data found in bad blocks to another place. If it can't then the file may be corrupted and lost.

Ni komentarjev: