Add info for bad block remapping on ESDI drives.

Submitted by:	 Ted Mittelstaedt <tedm@toybox.placo.com>
This commit is contained in:
Doug White 1998-11-18 21:40:32 +00:00
parent f33e2614ae
commit 497749de04
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=3811

View file

@ -1,4 +1,4 @@
<!-- $Id: troubleshoot.sgml,v 1.5 1998-06-27 01:13:49 hoek Exp $ -->
<!-- $Id: troubleshoot.sgml,v 1.6 1998-11-18 21:40:32 dwhite Exp $ -->
<!-- The FreeBSD Documentation Project -->
<sect>
@ -25,23 +25,72 @@
ARRE (Auto Read Reallocation Enbld): 1
</verb>
<p>For other drive types, you are dependent on support from the
operating system. Unfortunately, the ``bad144'' command that
FreeBSD supplies for this purpose needs a considerable amount
of work done on it. In other words, it doesn't work. If you're
lucky, you can create a file that contains the bad blocks and
stuff it away with a name like ".BADBLOCKS". This is how I got
386BSD Patchkit 24 completed. <tt/NOTE/: don't do this unless
your time is effectively free.
<p>The following paragrahs were submitted by
<url url="mailto:tedm@toybox.placo.com" name="Ted Mittelstaedt">:
<p>IDE drives are <em/supposed/ to come with built-in bad-block
remapping; if you have documentation for your drive, you may want
to see if this feature has been disabled on your drive. However,
ESDI, RLL, and ST-506 drives normally do not do this.
<p>For IDE drives, any bad block is usually a sign of potential trouble.
All modern IDE drives come with internal bad-block remapping turned
on. All IDE hard drive manufacturers today offer extensive
warranties and will replace drives with bad blocks on them.
<p>If remapping is enabled and you are seeing bad blocks, consider
replacing the drive. The bad blocks will only get worse as time
goes on.
<p>If you still want to attempt to rescue an IDE drive with bad blocks,
you can attempt to download the IDE drive manufacturer's IDE diagnostic
program, and run this against the drive. Sometimes these programs can
be set to force the drive electronics to rescan the drive for bad blocks
and lock them out.
<p>For ESDI, RLL and MFM drives, bad blocks are a normal part of the
drive and are no sign of trouble, generally. With a PC, the disk drive
controller card and BIOS handle the task of locking out bad sectors.
This is fine for operating systems like DOS that use BIOS code to
access the disk. However, FreeBSD's disk driver does not go through
BIOS, therefore a mechanism, bad144, exists that replaces this
functionality. bad144 only works with the wd driver,
it is NOT able to be used with SCSI. bad144 works by entering all bad
sectors found into a special file.
<p>One caveat with bad144 - the bad block special file is placed on the
last track of the disk. As this file may possibly contain a listing for
a bad sector that would occur near the beginning of the disk, where the
/kernel file might be located, it therefore must be accessible to the
bootstrap program that uses BIOS calls to read the kernel file. This
means that the disk with bad144 used on it must not exceed 1024
cylinders, 16 heads, and 63 sectors. This places an effective limit
of 500MB on a disk that is mapped with bad144.
<p>To use bad144, simply set the "Bad Block" scanning to ON in the
FreeBSD fdisk screen during the initial install. This works up through
FreeBSD 2.2.7. The disk must have less than 1024 cylinders. It is
generally recommended that the disk drive has been in operation for at
least 4 hours prior to this to allow for thermal expansion and track
wandering.
<p>If the disk has more than 1024 cylinders (such as a large ESDI drive)
the ESDI controller uses a special translation mode to make it work
under DOS. The wd driver understands about these translation modes,
IF you enter the "translated" geometry with the "set geometry" command
in fdisk. You must also NOT use the "dangerously dedicated" mode of
creating the FreeBSD partition, as this ignores the geometry. Also,
even though fdisk will use your overridden geometry, it still knows the
true size of the disk, and will attempt to create a too large FreeBSD
partition. If the disk geometry is changed to the translated geometry,
the partition MUST be manually created with the number of blocks.
<p>A quick trick to use is to set up the large ESDI disk with the ESDI
controller, boot it with a DOS disk and format it with a DOS partition.
Then, boot the FreeBSD install and in the fdisk screen, read off and
write down the blocksize and block numbers for the DOS partition. Then,
reset the geometry to the same that DOS uses, delete the DOS partition,
and create a "cooperative" FreeBSD partition using the blocksize you
recorded earlier. Then, set the partition bootable and turn on bad
block scanning. During the actual install, bad144 will run first,
before any filesystems are created. (you can view this with an Alt-F2)
If it has any trouble creating the badsector file, you have set too
large a disk geometry - reboot the system and start all over again
(including repartitioning and reformatting with DOS).
<p>If remapping is enabled and you are seeing bad blocks, consider
replacing the drive. The bad blocks will only get worse as time goes on.
<sect1>
<heading>FreeBSD does not recognize my Bustek 742a EISA SCSI!</heading>