atom feed12 messages in org.freebsd.freebsd-currentRe: newfs: sectors per cylinder (4096...
FromSent OnAttachments
Julian Howard StaceyFeb 19, 1995 12:45 pm 
Ollivier ROBERTFeb 20, 1995 3:58 pm 
Rodney W. GrimesFeb 20, 1995 5:25 pm 
Poul-Henning KampFeb 20, 1995 5:53 pm 
Rodney W. GrimesFeb 20, 1995 6:22 pm 
Poul-Henning KampFeb 20, 1995 6:25 pm 
Gene StarkFeb 21, 1995 4:27 am 
Stefan EsserFeb 21, 1995 7:03 am 
Julian Howard StaceyFeb 21, 1995 3:33 pm 
Bruce EvansFeb 22, 1995 12:57 am 
Gene StarkFeb 22, 1995 3:48 am 
Bruce EvansFeb 23, 1995 8:12 am 
Subject:Re: newfs: sectors per cylinder (4096) disagrees with disk label (36)
From:Bruce Evans (bd@zeta.org.au)
Date:Feb 23, 1995 8:12:33 am
List:org.freebsd.freebsd-current

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