bad blocks

Brett Worth brettw at cray.com.au
Wed Feb 20 09:35:18 EST 2002


On Tue, 19 Feb 2002, Antony Stace wrote:

> > And if you're looking for bad blocks and are not just wanting to check the
> > filesystem (?) integrity then use "dd".  e.g. 
> > 
> > 	dd if=/dev/hda2 of=/dev/null bs=256k conv=noerror
> 
> This sounds like what I want.  I want to see if the disk has physical errors.  I
> do not want to destory the data on the partition at the moment.  Will this command
> be ok to run once I have unmounted the partition? ie it will not delete any data?

Yes.  You can just run this on an unmounted partition.  It just reads
blocks directly from the device and writes to /dev/null.

if = input file
of = output file 
bs = block size
conv=noerror means dont stop when you hit an error.

"man dd" is worth a look.  It can even do EBCDIC <> ASCII conversion!
-- 
Brett

  /) _ _ _/_/ / / /  _ _//
 /_)/</= / / (_(_/()/< ///

 Cray Australia.
 brettw at cray.com +61 2 6295 4023

PGP: 1024R/27EB604F  22A9 A85A 22BD 496B 2443  
                     35E5 46F7 0712 27EB 604F





More information about the linux mailing list