Subject: Re: mapping out bad blocks?
To: Stefan Jeglinski <jeglin@4pi.com>
From: Frederick Bruckman <fb@enteract.com>
List: port-mac68k
Date: 03/09/2001 10:29:49
On Fri, 9 Mar 2001, Stefan Jeglinski wrote:
> So I reinitialized the whole drive as Mac OS and used Techtool's
> media scan, which found bad blocks. It maps them out, but I think
> that may be a volume bitmap thing that is wiped out on this drive
> when I reinitialize it to a mac partition and a couple of bsd
> partitions. IOW, the problem returns somewhere when I go through the
> bsd install procedure.
The disk is probably trash. In my experience, once you start to find
mutiple bad blocks on a disk drive, it's days are numbered. I used to
partition around the bad areas to get a little more out of them, but
it's hardly worthwhile to do that, now that disks are so cheap.
> With all that as background, what I'm really looking to do is use a
> bsd utility to map out the bad blocks. I note that the MacOS Mkfs
> program seems to have no such capability. And I find in the initial
> installation, there is no mkfs in bsd? (I come from Linux, I'm pretty
> green with bsd). What would I use to do this in bsd?
You could use "scsictl" for that, but you really should set up the
mode pages to replace bad blocks automatically. You lose the data if
you replace on read errors, but the disk has a better chance of
continuing to work after a "newfs". There's no reason not to replace
blocks on write errors, but some formatters don't anyway (perhaps for
the benefit of less capable OS's).
I don't know of any open source utility to edit mode pages. The
stored-on-disk mode pages seem to be visible at the beginning of block
0 of the drive, with say, "dd if=/dev/rsd0a count=1 | hexdump -C
/dev/stdin", but I don't think it would work to change them with "dd".
If you've already marked the bad blocks with TechTool, and you're
still getting new ones, it's hopeless! If you're getting the same
blocks over and over, that's probably because the _replacement_ blocks
are bad, too. Also hopeless.
> My idea is to mount the bad hard drive as another disk on the good
> IIcx, map out the bad blocks while in bsd, and continue. Any other
> suggestions welcomed. I may junk the drive in the end, but I'm
> interested now in just going thru the process for the education.
Frederick