Subject: Re: MBR and wedges without BSD disklabel?
To: Scott Ellis <scotte@warped.com>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 08/16/2007 20:33:33
On Thu, Aug 16, 2007 at 11:30:41AM -0700, Scott Ellis wrote:
>
> First, looking at dkwedge_mbr.c, it looks like there's no support for
> the NetBSD partition type in there. A quick glance at
> dkwedge_bsdlabel.c shows that it looks for the BSD partition entry in
> the MBR, and then looks for a disklabel to parse.
Hmmm, I bet it doesn't look as hard for the disklabel as a non-wedge
system does.
> My question is: Given a non-EFI machine that's required to have an MBR,
> what's the point of also having a disklabel? Couldn't we just have
> multiple MBR_PTYPE_NETBSD partitions, and let those get mapped directly
> to wedges (similar to how GPT works)?
A 'normal' i386 system does let you have multiple netbsd mbr partitions.
And, in the absence of an on-disk disklabel will generate one from the
mbr information.
History also play a part since the disklabel scheme pre-dates the
existance of the mbr by many years (and the extended partition by
many more).
> I guess there's an issue with picking which one to boot from, but aside
> from that, why require a disklabel also?
Actually the netbsd mbr boot select code will (try to) use the filesystem
at the start of the mbr partition as the root filesystem - regardless
as to the contents of the disklabel.
David
--
David Laight: david@l8s.co.uk