How To: Check For Bad Sectors On Your Disks

Rate this post

Today, we’re going to examine one way to check for bad sectors on your disks. Once again, it won’t be a particularly taxing article, but it’s something everyone should know how to do. This being Linux, I’m sure there are alternative tools.

Hard drives, from spinning platter to solid-state, are divided into sectors. Sometimes, these sectors go bad. The disk’s software manages this to some extent, and actually has more space available than listed so that it can make up for bad sectors as time passes.

Related Post:

But, you still get bad sectors. It’s just the nature of the game, and no disk drive is immune to this. All you can do is accept them and, in some cases, repair them.

See, there are two types of bad sectors. The first is a hard bad sector, which is hardware related and can’t be fixed. The second is a soft bad sector, which is a software issue and it can be fixed. I’ll someday write an article about how to fix soft bad sectors, but I won’t bother getting into that today.

With all that in mind, the tool we’ll be using is appropriately named ‘badblocks’, which describes itself thus:

badblocks – search a device for bad blocks

Badblocks has a variety of uses, so you can always get a head start on this article by reading the man page. 


So, with that already covered, let’s just jump into the article.

Check For Bad Sectors:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With your terminal now open, you should probably identify your drives with the following command:


The output of this may look a bit like this:

Images: How To: Check For Bad Sectors On Your Disks 814x272

You can see your drive’s identification with the output of fdisk -l.

As you can see,  it’s listed as /dev/  and that’s the information you want to hold onto.

Sometimes, it’s a lot more complicated, and will look something like this:

Images: How To: Check For Bad Sectors On Your Disks 838x548

This is a bit more complicated than the first one – plus the drives are all ‘sd*’ in nature.

As you can see, they’re all start with ‘dev/sd*‘ and end up as /dev/. The system I ran badblocks on is quite a bit more complicated than the output from the laptop I used in the first instance.

Now, you want to scan your individual device to check the for bad sectors. That’s actually just a simple command. You can use:


The -v ensures the output is verbose and sent to the screen. You can also write that data to a text file for reference. To do that, you just use a command similar to this:


Then, you’ll have a badblock.txt file you can refer to, showing you information about any bad blocks. I wanted to show you the output from a disk with bad blocks, but I don’t appear to have any to show you. I tried quite a few, but it was a no-go. Ah well… You’ll figure it out easily enough. It’s not even a little hard to check for bad sectors!


Yup… You have another article. This time you learned how to check for bad sectors, a pretty handy tool – especially if you’re finding corrupt files on your disks. If you are facing corrupt files, this would be the first step I’d suggest taking.

Anyhow, the show does go on and you got a new article. I am more or less feeling just fine now, just some lethargy and not a whole lot of energy. Sweet!

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x