Subject: Re: Trying to add a partition to filesystem...
To: Jell-O <wookie@us.net>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 06/26/1996 11:48:02
> 
> Hi,
> 
> I'm attempting to add a second partition (not including swap) to my
> filesystem.  It seems that although my Mac partitioning software
> recognizes the partition, disklabel does not.  I've heard that a couple of
> things are "broken" with disklabel.  Maybe it's part of the problem.
> Anyway, here's the info:
> 
> Partitions read with MacOS Silverlining software:
> 	
> 	Apple 			(partition map)		31k
> 	Macintosh_SL		(Driver434)		32k
> 	root&usr		(UNIX_SVR2)		185606k
> 	Swap			(UNIX_SVR2)		20480k
> 	Free Unix slice 3	(UNIX_SVR2)		220000k
> 	Big Bad Disk		(HFS)			640994k

The problem is that disklabel, at present, only looks at flags in
the parition description; the partition name doesn't matter.

I've run into this before. There's some byte at offset 140 or so which
has these flags. something like 0x80 is "root" partition, and 0x40
is "usr". If you found this byte and added the 0x40 to it, then
you'd be set.

That's a crude hack. One of the things I'd like to do, and mention as I
won't be able to for a while, is add an option to the mac side mkfs.
If it sees the partition isn't a root or usr partition (fails whatever
criteria the kernel uses to include it or not), it will ask if you want
to make it a valid NetBSD partition, and if so, what kind (root, usr,
root&usr, or swap). It would change the names as needed (I think it'd need
to make the type UNIX_SVR2), and then let you quit if you like (or continue
mkfs'ing).

Last time I used mkfs, it seemed to recognize all the partitions, and
gave a dialog box to choose them from. With this hack added, we could
forget about using special partitioning software. Just use any old
partitioner and make HFS partitions where you eventually want NetBSD
ones. Then use mkfs to make them into NetBSD partitions.

Just a thought. Someone want to do it?

Take care,

Bill