Date: Mon, 13 Nov 1995 13:16:25 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: jkh@time.cdrom.com (Jordan K. Hubbard) Cc: inkari@snakemail.hut.fi, hackers@FreeBSD.org Subject: Re: install trouble on 1104 SNAP Message-ID: <199511132016.NAA17829@phaeton.artisoft.com> In-Reply-To: <14116.816149027@time.cdrom.com> from "Jordan K. Hubbard" at Nov 11, 95 08:03:47 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > "Fdisk" editor reported all sorts of drive geometries varying from > > 4076 cylinders to 200000 cylinders. The values that it did not > > complain to be incompatible with BIOS were 14703/13/44 > > (cyl/heads/sectors). The drives "natural" geometry is 4076 cyls, 20 > > heads, and average 103 sectors per track. > > > > With the fdisk editor, I tried one slice, two slice and totally > > dedicated disk partitions (with different geometries) and run into > > trouble with the disk label editor. > > Well, hang on now. You're trying to have your cake and eat it too! :) > > If you're going to use partitions, then you MUST MUST MUST use the > *right* geometry, and that rarely has anything to do with the > "natural" geometry. Read the docs (and don't use expert mode - you've > just disqualified yourself :-) that say how to determine the correct > geometry using the various DOS utilities provided in the tools/ > directory, or install a small DOS partition (as recommended by > those same docs) and let FreeBSD "snoop" on it. > > If you don't want to think about geometry then use the "(A)ll" disk > feature and choose the "dangerously dedicated" option to really and > truly use the *entire* disk for FreeBSD. Then geometry becomes > irrelevant. You only need to use the "*right*" geometry because of the sector offsets for the partition starts in protected mode being calculated by multiplying the geometry vs. the C/H/S offsets in the partition table. The Partition table has 32 bit absolute sector offsets as well. Only you can't really trust them. So the souloution is to *EITHER* use the "*right*" geometry, *OR* ensure that the absolute sector offsets are correct, and use them instead. The problem will occur if you can't do an LCF calculation of the geometry from the C/H/S vs. the absolute sector offset when creating the partition for the BSD, since the BIOS based MBR must have a correct C/H/S to load the second stage boot, and the BIOS-based second stage boot must have a correct C/H/S to load the kernel. But there *are* two ways to "skin the cat". I'd prefer if one of the two BIOS based boots ensured that the absolute sector offsets were correct. Since no one else really uses them, and since they have defined values in any case, retrofitting the values for older FDISK programs that didn't properly maintain the absolute sector offset portion of the partition table should ba an acceptable thing to do prior to going to protected mode. In fact, using the absolute sector offset in the second stage boot seems like the right thing to do in any case, even if the C/H/S is then divided out to get INT 13 parameters for BIOS I/O. This would make it much easier to include "LBA" in the second stage boot at some later time. It seems to me that the main screwups occur when the BIOS translation changes from the default once the BIOS using OS has been booted. Like when OnTrack is there, or when non-linear translation occurs in BIOS (like on the WD1007). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511132016.NAA17829>