Subject: Re: Only One NetBSD Partition Allowed?
To: <>
From: David Laight <david@l8s.co.uk>
List: netbsd-help
Date: 03/21/2004 14:10:14
On Sun, Mar 21, 2004 at 08:20:25AM -0500, James K. Lowden wrote:
> On Sun, 21 Mar 2004, David Laight <david@l8s.co.uk> wrote:
> > NetBSD current does support multiple installations, and you can use the
> > mbr bootselector to select which one to run.  In this case the two
> > installations will share the same NetBSD disklabel 
> 
> If I wasn't confused before, I surely am now.  Where is the disklabel
> stored on an i386 box?  

In the second sector of the mbr partition.

> I had thought it was stored at the beginning of the 169 MBR partition
> assigned to NetBSD.  But that can't be right, if there can be two such
> partitions and only one label.  

The NetBSD current kernel (but not disklabel -R) writes the same disklabel
to the 2nd sector of all type 169 partitions (including any in the
extended partition).

The label is read from the first 169 mbr partition found.

Having more than one (different) disklabel causes serious grief...

> The other obvious place is in track 0, after the MBR.  But AIUI that's
> where boot managers install themselves, and I'm sure NetBSD wouldn't place
> its disklabel at the mercy of random boot managers.  

I actually thought the rest of track zero was reserved for the bios.
 
> McKusick says the disklabel is placed "out of the way of the vendor label
> but within the area that is read in by the hardware bootstrap code".  He
> doesn't mention boot managers. ;-)

He probably didn't write the code either!
The NetBSD bootselect sits entirely within sector 0 of the disk.

	David

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