From owner-freebsd-hackers Mon Jan 15 23:41:21 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id XAA19425 for hackers-outgoing; Mon, 15 Jan 1996 23:41:21 -0800 (PST) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id XAA19372 for ; Mon, 15 Jan 1996 23:40:39 -0800 (PST) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id SAA28537; Tue, 16 Jan 1996 18:12:11 +1030 From: Michael Smith Message-Id: <199601160742.SAA28537@genesis.atrad.adelaide.edu.au> Subject: Re: location of bad144 table To: bde@zeta.org.au (Bruce Evans) Date: Tue, 16 Jan 1996 18:12:10 +1030 (CST) Cc: bde@zeta.org.au, miff@spam.frisbee.net.au, hackers@freebsd.org In-Reply-To: <199601160549.QAA02316@godzilla.zeta.org.au> from "Bruce Evans" at Jan 16, 96 04:49:09 pm MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org Precedence: bulk (dig my home address out of the cc:'s 8) Bruce Evans stands accused of saying: > > >It would appear that the bad144 program still uses the 'c' partition, or > > No. > > >divines the end of the disk in a fashion different from the kernel code. > > Maybe. It attempts to screw up by always reading the label directly off > the disk (like the -r option to disklabel), but this is supposed to be > handled by modifying the label sector as it is read and written. The problem (?) here is that the label _on_the_disk_ has the "right" geometry in it, but the in-core disklabel has been screwed with to use the geometry reported by the controller (which is bogus). In this specific case, 'disklabel wd0' reports 1023 cylinders (wrong) but 'disklabel -r wd0' reports 1022 cylinders (right because I put it there). > >At least, bad144 runs without a slew of error messages, whilst attempting > >to read the disklabel once bad144 has been run results in much unhappiness. > ^^^^^^^^^ bad sector table? 'disklabel wd0' generates a plethora of errors. I expect that this is because the bad sector table is being read on first open of the device. Yes, it's complaining about not reading the bad sector table properly. Sorry for being obscure. 8( > Can bad144 read what it wrote? Yes. (this is why my comment about initialising the table, bad144 complained about a bad magic number on the table, and then went on to complain about a pile of duplicate replacements (its interpretation of the disk virgin value I expect) > Bruce The other reason I was pondering the whole 'c' partition thing was to do with autogenerating labels for slabs (of sectors) on FAT slices; the 'c' partition isn't actually terribly relevant there but I wasn't quite sure how I should implement it. What I have currently looks like this : - at the end of dsinit() a new function is called. This function walks the list of slices that dsinit has just assembled and looks for BIGDOS slices. - for each BIGDOS slice, the function looks for slabs. Slabs names are currently read from a file on the FAT filesystem. I don't like this, and will be moving to having a directory (BSD.PAR probably) that contains files called 'a', 'b' and so on. There will be limits on this directory, most likely that nothing else can live there and that the directory entries to be used must be in the first cluster of the directory. (This is bad, and would be on the 'fix this' list) - each slab is checked for contiguity, and if contiguous, is added to a disklabel structure - If no 'b' slab is found, the code looks for a /386spart.par file, and uses this, subject to validation. - If any partitions were found, the label is attached to the slice. Now you're all welcome to flame the crap outa me for this approach, but I think that this is worth the effort. Anyway, the relevance here is "what to do with the 'c' partition" in such a label? Should it refer to the whole FAT partition? Should it point to a small file that can be used for other purposes? Should it be zeroed out? -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] "Who does BSD?" "We do Chucky, we do." [[