Subject: Re: Some questions about disklabeling.
To: <>
From: David Laight <david@l8s.co.uk>
List: port-i386
Date: 04/03/2002 22:36:37
On Thu, Mar 28, 2002 at 05:54:50PM +0100, Ib-Michael Martinsen wrote:
> 
> I am not booting from the disk, but if I were would it then be
> impossible to boot after disklabeling the disk?

no problem...

> Where execatly is the disklabel written on the disk? In the
> Master Boot Record or some place else?

For x86 PCs the 2nd sector of the netbsd partition.

> And what is the difference between the disklabel and mbrlabel
> commands?. In which situations would you prefer the one for
> the other?

As far as netbsd is concerned, the netbsd 'partition' (as
defined in the mbr - sector 0) is only used to locate the
netbsd disklabel, and as part of the booting process.

The code that reads / writes the netbsd label is in
sys/arch/i386/i386/disksubr.c.  There is code that sets
partitions e/f/g/h to the mbr partitions, however I think
the tests are all in the wrong order to make that work!
If you fiddle with it, ensure you stop the disklabel
being written when a netbsd partition doesn't exist.


	David

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