On Mon, Sep 24, 2001 at 11:59:49AM +0200, Piet van Unen wrote:
> Dear All,
> 
> I would like to put linux on a Samsung harddisk with a lot of bad sectors.
> Testing with tomsrtbt installed on a 100MB partition of the disk learned
> that more than 2.2 GigaByte  of 2.4 can be used without problems.
> I could not find a low level format program to be used. So I used Ontrack
> under DOS. This utility puts the bad clusters in the FAT table and marks
> them. Then I can use the DOS partition as clean partition. But the FAT table
> is on the partition!!!
> Under tomsrtbt I used e2fsck -cf . It tells me about a lot of bad sectors
> and says: Unrecoverable error.
> Is there for linux a utillity that works like the Ontrack program  to
> isolate the bad sectors? Then I could use the disk to put a linux
> distribution on it.
> 
> --Piet

Use badblocks to create a list of bad blocks, then mke2fs to create
the file system using the list. The gory details are in the man pages.

Here's a stanza from a script I use to do this automatically:

echo
echo formatting and checking /dev/sda5
badblocks -c 128 -o /tmp/dev.sda5 /dev/sda5
mke2fs -l /tmp/dev.sda5 /dev/sda5

/tmp is on a ram disk (on tomsrtbt, anyway), so I don't even bother to
delete the temporary file.

For more thorough testing, add the -w option, which will write test
the drive.

That said, I don't trust a hard drive with that many bad
sectors. Don't put anything on it that isn't expendable. And check for
new bad blocks from time to time. That drive has probably run out of
spare sectors & is going to die on you.

-- 

                -- C^2

The world's most effective anti-virus software: Linux.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley

PGP signature

Reply via email to