Subject: Re: i386 booting, take 2
To: None <email@example.com>
From: Phil Nelson <firstname.lastname@example.org>
Date: 09/21/1998 13:57:37
>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.
>> Do you want the kernel to present these to the user at boot?
>Of course not; that would be completely obnoxious. I want them to be
>presented as options in the installation program's partitioning tool
>-- if needed.
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.
Your suggestion was that the first sector be used to help make the
association. I agree, that would make the association more reliable.
So suggest we had an IOCTL that returned BIOS geometry and first sector
for the first n disks. Also, an IOCTL that tells whether the BIOS
supports the `large disk' model.
Since it would be the install tools that would make the disambiguation,
why not just have the install tools do all the work. They can
then set the disklabel at install time. 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.
I suspect it would be no harder for the install tools, given the
first sector and the BIOS geometry, to make the match than the
autoconfiguration code. And there would most likely be a user
available at install time to help disambiguate the disks if the
methods described didn't work. This would require no other changes
in the kernel to do this and it should easier than modifying all
the disk autoconfiguration code and work as well. From what I
understand, the only place where the C/H/S numbers really make
a difference is for getting the MBR set up so the boot program
can correctly get to the NetBSD partition. The disklabel can then
be set properly by install system. Also, fdisk can be told the
correct geometry by the install system.
If this is ok with you, then I'm sure it can get done without
you having to do it.
email@example.com (NetBSD/pc532 machine)