Subject: Re: handling NetBSD partitions in the Apple Partition Map [was Re:
To: Darrin B. Jewell <dbj@netbsd.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: port-macppc
Date: 10/08/2002 11:27:42
On 8 Oct 2002, Darrin B. Jewell wrote:

> Bill Studenmund <wrstuden@netbsd.org> writes:
> > There are two things we really want to encode. We want to encode the
> > partition type (4.2BSD, 4.4LFS, CCD, swap (, boot?), RAID, CGD) and if
> > it's a macppc root, (mac68k root,) or usr. How do we want to do both?
> > "_<FS_type>" and "_root"? "_rootppc" and "_root68k"?
>
> Encoding root/usr in the typename is just wrong.

Well, where else do we encode it? If we're trying to make Apple tools work
with our partitions, as I understand it, the partition type is all we have
to play with. Or could we get Apple's tools to add the root vs usr flags?

> In fact, i'm very unhappy with the forced partition
> reordering that currently happens.  I don't plan to undo it
> yet, but lets not make it worse by forcing the order of any
> new partition types we are adding.

For better or worse, we have the two-tier reordering, which we inherited
from A/UX.

I don't think we can ever undo it, as it makes a lot of sense to have some
reordering so we get a partition 'a' that we can use.

One thing we could do is make all NetBSD_<fstype> partitions be "root"
ones.

> I do hope to fix the boot loader's & kernel's screwed up
> handling of bootpath.  This includes correctly reading the
> booted partition to determine which to mount as root by
> default.  With that fixed, there is no absolute requirement
> to mark any particular partition in the disklabel as the root
> partition.

Note that "root" and "user" only really help determine ordering in our
synthetic disklabel. Which partition is mounted as root is in principle
(and will be in practice once you complete the work you mention above)
different.

> For now, lets just use NetBSD_ followed by one of the strings
> from the fstypenames array in disklabel.h

We still need to map them into root and usr somehow, since those are key
concepts for our APM code. If we aren't going to let the type deterine it
("NetBSD_42BSD" vs. "NetBSD_42BSD_root" or "NetBSD_42BSD_usr"), then I
think we need to make them root, so that we will get partitions at letter
a.

Take care,

Bill