From owner-freebsd-current Wed Feb 22 03:50:02 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id DAA06828 for current-outgoing; Wed, 22 Feb 1995 03:50:02 -0800 Received: from sbstark.cs.sunysb.edu (sbstark.cs.sunysb.edu [130.245.1.47]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id DAA06820 for ; Wed, 22 Feb 1995 03:50:01 -0800 Received: from starkhome.UUCP (root@localhost) by sbstark.cs.sunysb.edu (8.6.9/8.6.9) with UUCP id GAA29289 for current@FreeBSD.org; Wed, 22 Feb 1995 06:46:41 -0500 Received: by starkhome.cs.sunysb.edu (8.6.9/1.34) id GAA12743; Wed, 22 Feb 1995 06:48:53 -0500 Date: Wed, 22 Feb 1995 06:48:53 -0500 From: starkhome!gene@sbstark.cs.sunysb.edu (Gene Stark) Message-Id: <199502221148.GAA12743@starkhome.cs.sunysb.edu> To: bde@zeta.org.au CC: regent.e-technik.tu-muenchen.de!jhs@sbstark.cs.sunysb.edu, current@FreeBSD.org In-reply-to: Bruce Evans's message of Wed, 22 Feb 1995 19:57:50 +1100 <199502220857.TAA02348@godzilla.zeta.org.au> Subject: newfs: sectors per cylinder (4096) disagrees with disk label (36) Sender: current-owner@FreeBSD.org Precedence: bulk >It already looks at /etc/disktab (if a disktab entry is specified) and at >the label. I wouldn't want it replacing values in the label with values >in the disktab entry for the disk type givel in the label when a disktab >entry is not specified. When I first saw the "parameters don't match those in disk label" errors, I looked at the newfs code briefly. It looked to me like what had been done is that some parameters that normally were zeroes had been #define'd to 4096, etc. The normal behavior of newfs was to look in the disklabel or in the disktab entry for stuff only if these parameters were zero (indicating they had not been overridden by command line arguments). #define'ing them to nonzero values seemed to break the normal searching that newfs does, and this is what I was referring to as kludgy. >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 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. >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. - Gene