Subject: Re: i386 booting, take 2
To: Phil Nelson <email@example.com>
From: Charles M. Hannum <firstname.lastname@example.org>
Date: 09/22/1998 12:52:08
> >Then how in the Hell do you expect it to calculate the CHS address of
> >the partitions correctly? It *has* to know the geometry of the disk.
> Currently, sysinst uses output of fdisk to find out the BIOS
> geometry of the disk. fdisk tries to make a good guess about it from
> the MBR. If there is no MBR then it just uses the disklabel
> default information. This is the step I asked to have replaced
> by being able to get BIOS information from another source.
...and that other source is the disklabel. How hard is this to
If you introduce a new mechanism, then you also have to introduce a
new way of changing the geometry. There's no reason to create a new
interface when we already have disklabel(8).
> What I had proposed earlier is that there be an IOCTL that returns
> the BIOS geometry for the first n disks the BIOS knows about. That
> way, the install tools can have what the BIOS thinks is the geometry.
And so this only works with with sysinst, and with any of the
traditional utilities, like fdisk(8), installboot(8), disklabel(8).
It doesn't even allow me to change the partition table later with
fdisk(8) -- something that everyone expects to be able to do.
> Also, an IOCTL that tells whether the BIOS
> supports the `large disk' model.
That's what sysctl(2) is for.
> Then you wouldn't have to
> do the match in autoconfiguration every time you boot. You just
> use the disklabel that the install system put on a disk.
So now you've constructed a universe in which the only thing that can
correctly create a bootable NetBSD partition is sysinst. It should be
obvious why that's not acceptable.
> If this is ok with you, [...]
No, it doesn't even come close.
I don't understand why you're having so much trouble with this. The
concept is very simple:
* The kernel makes a best guess at finding the BIOS geometry and
sticks it in the prototype disklabel.
* The user then edits this, with either disklabel(8) or sysinst, to
get the `right' geometry and create partitions.
* fdisk(8) uses the disklabel to do the CHS translation for the MBR
partitions (just like the DOS FDISK asks the BIOS for the geometry).
And now that I've wasted a tremendous amount of time repeating myself,
it's time to bow out of this discussion. If someone is willing to do
the work in a reasonable fashion, please contact me privately.