Subject: Re: disklabel(8) and machdep on-disk structures issues
From: David Laight <email@example.com>
Date: 11/12/2003 14:33:51
On Wed, Nov 12, 2003 at 12:09:17PM +0100, Manuel Bouyer wrote:
> On Wed, Nov 12, 2003 at 03:16:47AM +0700, Robert Elz wrote:
> > [...]
> > This may seem weird, but can't the NetBSD label just go in some
> > other block? There must be some blocks on the drive that NetBSD
> > can write in, or no-one would want a NetBSD label there in the
> > first place.
> > I understand the attraction of having the kernel write labels, rather
> > that user code, but I'm not sure how that's supposed to work when
> > drives are moved from system to system - different architectures, and
> > we really want NetBSD to be able to find, use, and update, the drive
> > contents, regardless of which system the drive is currently connected to.
> I think this should be the job for a userland tool (a la mbrlabel(8)).
> The kernel needs to know about native partitions maps for the port, to be
> able to find the root partition, but we probably don't want to put the
> knowledge of each partition map of the world in the kernel.
The code wouldn't be that big, a NATIVE_LABEL_ONLY option could be used for
really small kernels.
A bigger problem is that you need to be able to tell the kernel to write
a new label in a specific format, rather than update the existing label(s)
in the current format.
David Laight: firstname.lastname@example.org