Subject: Re: new laptop drive
To: <>
From: David Laight <david@l8s.co.uk>
List: port-i386
Date: 05/27/2002 13:03:00
On Sun, May 26, 2002 at 06:35:03PM -0400, Perry E. Metzger wrote:
> 
> David Laight <david@l8s.co.uk> writes:
> > On Sun, May 26, 2002 at 03:34:19PM -0400, Perry E. Metzger wrote:
> > > As the author of part of our current bootloader, let me note that I
> > > believe we probably do have enough space for this, but that doing the
> > > check reliably might be a bit tough.
> > 
> > I have looked at (and fixed) some issues in the mbr_bootsel code.
> 
> It wouldn't be done in the mbr_bootsel code. That should be quite
> obvious to anyone who understands how the boot blocks work.

But this is the first bit of code that needs to know.....

> 
> > > > It would actually be better for the kernel to determine what
> > > > the BIOS can do, and tell the bootloader.
> > > 
> > > Er, the kernel isn't running when the bootloader runs.
> > 
> > I was thinking of having 2 bootloaders, 1 for LBA BIOS and 1
> > for CHS BIOS....
> 
> That's very very silly, considering that we have one that does both
> right now. Why should you want to DEGRADE the system?

I was thinking that fdisk could install the appropriate one for the
system - without the user really needing to know.

The current one has a rather large hack - looks like some one made
it detect LBA and use it by defaulat (if present), then found
that didn't work right and added a second test to use it 'if
available and necessary'.  Seems to me that the 'necessary'
check is the only one actually required.
Maybe the CHS limit could be writtent to the info at the end of
the mbr code - saving the mbr code from doing the (horrid) sum.
If LBA were known to work, that could be set to 0 - ok until
the disk is moved to a different controller!
But it would save all the problems of multiple faked geometries.
> 
> The question at hand is one of whether we should pass information
> about the BIOS's peculiarities up to the kernel on boot. It might not
> be a bad idea, all things considered.

You don't need them beyond the point where bios calls are likely
to be made - and that code can work it out for itself.
(Unless fdisk wants to tell the mbr code.)

	David

-- 
David Laight: david@l8s.co.uk