Other useful options for badblocks are the ability to store/read a list of bad blocks in/from a file.
1) Store list of bad blocks in file:
Run badblocks and store the list of broken blocks in a file:
Code: Select all
badblocks -o bad_list.txt -vs /dev/hda
2) Speed up scanning for bad blocks:
If you run badblocks again, you might want to skip testing blocks you already know to be broken:
Code: Select all
badblocks -i bad_list.txt -vs /dev/hda
3) Format partition and mark bad blocks:
If you have bad blocks, you might want to tell the format tool about them.
Example for ext3:
Code: Select all
mkfs.ext3 -l bad_list.txt /dev/hda
Example for fat32 (=vfat):
Code: Select all
mkfs.vfat -l bad_list.txt /dev/hda
4) Compare different runs:
If you run badblocks on the same device in the future, you can compare the list with previous runs to see if the number of bad blocks is increasing (which usually means that your harddisk is about to die)
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!