From owner-freebsd-current Tue Sep 30 22:50:45 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id WAA18923 for current-outgoing; Tue, 30 Sep 1997 22:50:45 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id WAA18908 for ; Tue, 30 Sep 1997 22:50:40 -0700 (PDT) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id HAA12273 for freebsd-current@FreeBSD.ORG; Wed, 1 Oct 1997 07:50:34 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.7/8.8.5) id HAA11590; Wed, 1 Oct 1997 07:26:48 +0200 (MET DST) Message-ID: <19971001072648.MU20136@uriah.heep.sax.de> Date: Wed, 1 Oct 1997 07:26:48 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-current@FreeBSD.ORG (FreeBSD Current Users' list) Subject: Re: Geometry weirdness with sysinstall/libdisk References: <19970930223542.44057@keltia.freenix.fr> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <19970930223542.44057@keltia.freenix.fr>; from Ollivier Robert on Sep 30, 1997 22:35:42 +0200 Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Ollivier Robert wrote: > Why is tst01 (bundled with libdisk) getting my geometry 1) wrong and > 2) differently for each of my disks ? Because it has sometimes too few hints what geometry the BIOS is using? > sd0 is an IBM DCAS UW 4.3 GB with 2 DOS slices and my booting FreeBSD > slice. If there are existing slices, libdisk's guesswork is IMHO easy. > tst01 sd2 gives this absolutely false geometry: > > --==##==-- > Debug_Disk(sd2) flags=0 bios_geom=13045/54/6 = 4226580 Certainly no slices present yet. > The right one is obtained by using sd2c as a device : > > --==##==-- > Debug_Disk(sd2c) flags=0 bios_geom=2063/64/32 = 4225024 They are not `right' in the sense of FreeBSD either, since they are useless for the BIOS. 2063 > 1024. 13045/54/6 is probably close to the actual drive geometry (except that for an actual geometry, it's more likely that the 54 is something like `some value between 35 and 70' or such). Actual drive geometries are uninteresting. > And where is this 13045 coming from ? >From the drive itself, i'd say. Well, no, this drive has 8205 cylinders and 6 heads: uriah # scsi -f /dev/rsd1.ctl -m 4 Number of Cylinders: 8205 Number of Heads: 6 ... uriah # scsi -f /dev/rsd1.ctl -m 3 ... Sectors per Track: 171 But again, these values are largely irrelevant. If you need to make a disk DOS-compatible, it's never a bad idea to create the DOS partition first. If you don't want it DOS-compatible, why caring for a ficticuous geometry at all? -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)