From owner-freebsd-current Thu Feb 23 08:17:33 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id IAA05587 for current-outgoing; Thu, 23 Feb 1995 08:17:33 -0800 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id IAA05560 for ; Thu, 23 Feb 1995 08:16:01 -0800 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id DAA01627; Fri, 24 Feb 1995 03:12:52 +1100 Date: Fri, 24 Feb 1995 03:12:52 +1100 From: Bruce Evans Message-Id: <199502231612.DAA01627@godzilla.zeta.org.au> To: bde@zeta.org.au, starkhome!gene@sbstark.cs.sunysb.edu Subject: Re: newfs: sectors per cylinder (4096) disagrees with disk label (36) Cc: current@FreeBSD.org, regent.e-technik.tu-muenchen.de!jhs@sbstark.cs.sunysb.edu Sender: current-owner@FreeBSD.org Precedence: bulk >>I think the correct solution is to put the geometry that you want newfs >>to use in the label. The geometry in the label isn't used for many >>things other than newfs. It is used for booting and by fdisk. Disk >No, this won't work for IDE drives, which in my experience seem to be very >particular about what geometry is stuffed into the controller. If you put According to the ATA standard, IDE drives accept any possible geometry (sectors < 256, heads <= 16, cylinders < 65536). >some geometry in the disklabel that has nothing to do with the geometry >reported by the controller, then when that geometry is stuffed into the >controller when the disk is first opened, it will likely hose things badly. Problems occur when people put impossible geometries (heads > 16) in the label and perhaps for nonstandard drives. >>slicing will provide separate labels for the whole disk and the BSD >>slice (even when the BSD slice is the whole disk) so it will be possible >>to have separate geometries for booting/fdisk and newfs. >If this scheme uses the "native" geometry to initialize the controller, >and the BSD geometry for "soft" operations (like newfs) only, then it >should work. Yes. The driver still has to have complications to handle drives that don't have a (correct) "native" geometry. MFM drives don't report their geometry, and ESDI drives may report an unusable geometry (with more cylinders or sectors than can be used). These are currently handled by a 3-step bootstrap: stuff the controller with a minimal geometry; use this geometry to read the MBR, guess another geometry and stuff the controller with it; use the previous geometry to read the label and stuff the controller with the geometry in the label. It would have been better to get a usable geometry from the BIOS and never change it. However, the complicated method works for drives that aren't supported by the BIOS and/or don't report their geometry correctly (provided the mbr and/or the label is correctly initialized), and recent BIOSs may report physically impossible geometries (heads > 16). Bruce