Subject: Re: Support for starting NetBSD partitions with sector 0
To: None <toddpw@best.com>
From: Wolfgang Solfrank <ws@tools.de>
List: port-i386
Date: 10/09/1998 10:10:53
Hi,

> Not just the BIOS -- our boot code assumes that there will be a valid
> partition table at block 0 also. We have to, as the BIOS passes us a
> device number but no partition information. Our boot block always reads
> block 0 and searches for a NetBSD partition, and loads the next bootstrap
> from that partition.

Of course you are correct here.  Should have been more specific.

> Um, we do still use the BIOS geometry because we issue C-H-S BIOS calls to
> load the kernel. But the boot code queries the kernel before it does anything
> that requires geometry knowledge. I think we assume that no disk will have
> less than 3 or 4 sectors per track in order to get away with this, however.

Hmm, you mean the boot code queries the BIOS for the geometry before
requiring it.  And no, this does not assume that there are any number of
sectors per track.

However the change I made assumes that there are at least 16 sectors per
track, but this is only relevant for the few bioses that actually do this
partition table dance (and those wouldn't have worked with the old code
anyway).  Besides I've yet to see any hard disk with less that 17 sectors
per track (and I do remember one of those :-)).

BTW, before you ask, I choose the rather arbitrary number of 16 sectors
for the fact that this is the number of sectors that are read using only
the mbr partition table as a reference.  Anything else is read by using
the NetBSD disklabel as the source for the partitioning information.

> > Could people interested in installing NetBSD with this setup please
> > test this on their machines and report back any problems they might
> > have?  Thanks.
> 
> Will do.

Thanks.

Ciao,
Wolfgang
-- 
ws@TooLs.DE     (Wolfgang Solfrank, TooLs GmbH) 	+49-228-985800