From owner-freebsd-hackers Mon Jan 15 04:07:21 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA10060 for hackers-outgoing; Mon, 15 Jan 1996 04:07:21 -0800 (PST) Received: from lovely.spam.frisbee.net.au (spam.apana.org.au [202.0.75.1]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id EAA10055 for ; Mon, 15 Jan 1996 04:07:09 -0800 (PST) Received: (from miff@localhost) by lovely.spam.frisbee.net.au (8.6.12/8.6.12) id WAA19910; Mon, 15 Jan 1996 22:47:02 +1030 Date: Mon, 15 Jan 1996 22:47:01 +1030 (CST) From: michael smith To: hackers@freebsd.org Subject: location of bad144 table Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org Precedence: bulk (*grumble*) how does one get Pine to add a Reply-To: ? 8( A question I would ask of those who Might Know The Answer 8) 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: 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. 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. 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( ) - The calculation above could be modified to check the 'c' partition on the disk first. This would facilitate using the sizing of the 'c' partition to lie about the size of the disk (what I was trying before). NOTE: this is consistent with the way that the bad144 program operates; I was quite fooled by its success 8(. 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) So, any comments? Mike (ps. I'm posting from home 'coz the link to my 'normal' acount is spammed. You may also know me as msmith@atrad.adelaide.edu.au)