Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 1996 13:37:19 +0100
From:      Poul-Henning Kamp <phk@critter.tfs.com>
To:        michael smith <miff@spam.frisbee.net.au>
Cc:        hackers@freebsd.org
Subject:   Re: location of bad144 table 
Message-ID:  <582.821709439@critter.tfs.com>
In-Reply-To: Your message of "Mon, 15 Jan 1996 22:47:01 %2B1030." <Pine.BSF.3.91.960115222713.19883A-100000@lovely> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Currently, the bad144 code in kern/subr_dkbad.c looks for the replacement
> table on the last track of the unit, as specified by the disklabel, to wit:
s/unit/slice/

>                bp->b_blkno = lp->d_secperunit - lp->d_nsectors + i;
> 
> (for i 0,2...8)
> 
> Unfortunately I have a disk controller here (Adaptec 2320D) that lies about
> how big the disk is (advertises one more cylinder than there is), and so
> this dies in a heap.
This is the dreaded "diagnostic cylinder"

> I've tried just about everything I can think of to force the label to 
> reflect the true size of the disk rather than its advertised size, but
> I suspect that I'm at a bit of a disadvantage in that I can't have these
> disks visible to the BIOS because I'm booting from a SCSI disk.
Just make your slice 1 (or to be safe: 2) cylinders less than the disk.

> There would appear to be several possible options.  
> 
> - I can check the ESDI ID string that the controller reports and adjust
> the cylinder count accordingly.  This would require a small change to wd.c
> that I'm quite happy to implement and test, providing I can find someone
> else using one of these controllers.  (Wilko, BTW, this guy only does
> 35s/t as well 8( )
This is a problem with (almost) all ESDI and ST506 disks.

This these are disappearing as fast as they can, we are not too eager to
add code to handle them, when the above mentioned work-around exists.

> As an aside, bad things happen if the bad sector table is not initialised
> before it is used the first time.  (IIRC, the invocation was 
> 'bad144 -a -v wd0'.  This is non-obvious from the manpage)
bad144 is non-obvious :-)

--
Poul-Henning Kamp           | phk@FreeBSD.ORG       FreeBSD Core-team.
http://www.freebsd.org/~phk | phk@login.dknet.dk    Private mailbox.
whois: [PHK]                | phk@ref.tfs.com       TRW Financial Systems, Inc.
Future will arrive by its own means, progress not so.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?582.821709439>