Subject: Re: sysinstall changes
To: None <perry@piermont.com>
From: None <rvb@sicily.odyssey.cs.cmu.edu>
List: tech-install
Date: 09/18/1998 16:52:55
"Perry E. Metzger" <perry@piermont.com> writes:
> rvb@sicily.odyssey.cs.cmu.edu writes:
> > > with something like pfdisk, and then runs the install script, one of
> > > the suggested geometries is through the roof because the cylinder
> > > geometry has been translated to the LBA geometry but the number of
> > > cylinders didn't change accordingly.
> > I fixed this in disklabel, but Charles unfixed this, because of
> > gratuitous printouts. You divide the secperunit by the new H/S and
> > all it well.
Let me be very clear here. (This is in disklabel.) The kernel has a
C/H/S that it has gotten from the disk itself. Then it reads the MBR.
If it finds a BSD partition, it resets the H/S from the info as to
where the BSD partition ends, viz:
lp->d_ntracks = dp->dp_ehd + 1;
lp->d_nsectors = DPSECT(dp->dp_esect);
lp->d_secpercyl = lp->d_ntracks * lp->d_nsectors;
Before my change it did not reset d_ncylinders. So when sysinst got
this info, via parsing fdisk, it had the same stupid d_ncylinders.
This is wrong. It also needs to recalculate d_ncylinders. I would
argue for d_ncylinders = d_secperunit / d_secpercyl
So fdisk would report the correct info.
If you want to argue that sysinst should not parse ever and should do
ioctls, make the case.
The reason the kernel did a print out was so I could see the results
and check it and get some feedback -- big mistake.
> I am very adamant on the following:
>
> sysinst must stop parsing dmesg output to get information for
> installation. This is non-negotiable.
>
> ioctls to get the same information are easy for us to implement and use.
>
> Perry