How to test disks for bad blocks?

Posted on: November 8, 2011

Badblocks: is used to search for bad blocks on a device. 🙂
Assuming the faulty disk is: /dev/sdb1

# badblocks -o output_bad_blocks /dev/sdb1

If the disk is healthy, the output_bad_blocks file will be clean. If not, it will have a list of bad blocks. Which is very useful, because you can pass that file as parameter on mkfs tool to say it wont use it on time of creating filesystem 😉


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


  • None
  • analialorenzatto: Buzz is just a host name for this example, it doesn't have any relation to the topic. Instead of being "Buzz", could be whatever name.
  • fridelain: >buzz What's the story behind this host name? Actully running buzz, once running buzz and upgraded many times since, or unrelated to debian naming
  • Pratik: Nice, but I would change it to include more directories. Like my .mozilla and .kde4 by using .{config,mozilla,kde4} instead of just .config .


%d bloggers like this: