Subject: Re: new laptop drive
To: <>
From: David Laight <david@l8s.co.uk>
List: port-i386
Date: 05/26/2002 22:55:42
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.
There is no space in the version in 'current', nor in the
pbr code - IIRC there was 1 free byte.

The non-bootsel mbr code might be re-writeable to have space,
but only by basing it on the 16bit code of the mbr_bootsel version.

The 'problem' is that it all has to be done in the initial sector
(IIRC 450 bytes for the mbr)
> 
> > 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....

> Also, the
> kernel isn't capable of making 16 bit BIOS calls (at least not at all
> easily).

Although a little 'chicken and egg' maybe the 2nd stage bootloader,
(or the very early kernel code - where switching to 16bit isn't
too painful) could determine what the BIOS supports (for each disk).
At least then a floppy or CD bootdisk could install the correct
boot code.

Perry - have you looked at my versions of mbr_bootsel.S and
start_bootsect.S? (code on www.l8s.co.uk then netbsd)
I fixed a few bugs (as well as allowing the mbr_bootsel code
to select between entirely different netbsd installations on
the same physical disk).

	David

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