"Linux Gazette...making Linux just a little more fun!"

The Answer Guy

By James T. Dennis, tag@lists.linuxgazette.net
Starshine Technical Services, http://www.starshine.org/

(?)Bad cluster in HDD

From Thomas Vavra on Wed, 15 Apr 1998

Hi there!

I got a neat, fast 1,6GB HDD (WD IDE) with one "bad cluster" as DOS calls it. Is there any way in using it for linux(marking the cluster as bad or something like that?)

(!)No problem. Linux distributions come with a program named 'badblocks' it handles this for you. The best way to do it is to let 'mkfs' call badblocks using its internally supported switches.

For ext2 filesystems you'd use mke2fs or mkfs.ext2 (usually links to the same file). Just add the -c switch to the command when you invoke it (and read the man page for details).

If you already have an ext2fs on a drive and you suspect that new bad blocks have developed (for example you've dropped the drive or the machine's been through an earthquake) you can run e2fsck (or fsck.ext2 as it may be linked) with the -c switch.

Like I said, easy!

(Naturally I suggest you do these from single user mode, and do proper backups).

Copyright © 1998, James T. Dennis
Published in Linux Gazette Issue 28 May 1998

[ Table Of Contents ] [ Front Page ] [ Answer Guy Index ]