Subject: Re: handling NetBSD partitions in the Apple Partition Map [was
To: Bill Studenmund <wrstuden@netbsd.org>
From: Neil Ludban <nludban@columbus.rr.com>
List: port-macppc
Date: 10/08/2002 16:28:03
Bill Studenmund wrote:
> 
> 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?

This is my current understanding of the available bits (picked up from
working with NetBSD, take with a large grain of salt):

  pmPartName ( "Extra", "MacOS", "A/UX Root", "A/UX User", "Swap" )
  pmPartType ( "Apple_Free", "Apple_HFS", "Apple_UNIX_SVR2" )
  bzbFlags ( FS, SWAP )
  bzbType ( ROOT, USER ) // if bzbFlags==FS

pmPartName is never referenced by NetBSD (1.6-RELEASE), but looks like
the proper place for partition letter (implied by root, swap, usr, ...
or explicitly a-h).

pmPartType is the kind of filesystem (NetBSD_4.2BSD, NetBSD_4.4LFS, ...)
and not what it's used for (unless being mounted on / makes some change
to the on-disk structure ???).

The use of USER means non-swap and non-root, not /usr.  NetBSD assigns
the first USER partition as /usr (g).  Do Mac utilities allow unsetting
the user bit on all but the real /usr?

Can the Mac utilities be used to create partitions with arbitrary NetBSD
compatible pmPartNames and pmPartTypes, and use NetBSD kernel/utilities
to set pmBootArgs overlay (replace bzb, for block/frags/cpg)?

-Neil