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