Subject: Re: Partitioning the disk with OS X
To: Nick Vanderweit <nickv_111@yahoo.com>
From: Henry B. Hotz <hotz@jpl.nasa.gov>
List: port-macppc
Date: 03/21/2003 10:48:10
At 4:30 PM -0800 3/20/03, Nick Vanderweit wrote:
>	Are there any equivelents to Drive Setup that will work for 
>Mac OS X? I need to partition my hard drive for NetBSD. Disk Utility 
>can't partition it into certain formats, like A/UX root.
>	I also wanted to know if I would just create an A/UX root 
>partition and install NetBSD there. Would I have to put ofwboot.xcf 
>in a partition? What partition? Would I put it in the NetBSD 
>partition or on its own hfs+ partition? Please, I am only a beginner 
>to NetBSD.
>~~~
>Nick

As noted elsewhere pdisk from the OSX command line is useful.  If 
nothing else you can see the actual partition number to use in OF 
that matches your HFS+ partition so you can load ofwboot.{xcf,elf}. 
What I would recommend if you really want to dual boot is to create 
an OSX UFS partition and use install a snapshot of -current (which 
understands the NeXT-modified flavor of ffs they use).  That way you 
can just mount your netbsd root and edit etc/rc.conf and friends 
inside OSX before you boot.  You will still need to boot from an 
installer kernel in order to run the MAKEDEV script in dev since the 
device nodes are not compatible.

As for the original question of how to partition the disk.  I seem to 
recall using the Disk Utility from either the OSX 10.1 installer or 
the 9.2 installer when I first got my TiBook.  I just created a MacOS 
partition, an A/UX root, and an A/UX swap partition the way I always 
had under MacOS 7.0 for NetBSD/mac68k.  If they took those options 
away I wouldn't sweat it much.  Just use any old partition type that 
isn't regular MacOS and the *BSD command line tools in both OSX and 
NetBSD will let you do what you want.  At worst if you don't fix the 
types with pdisk they will wind up being e.g. wd0f/wd0g under NetBSD 
and you can modify your etc/fstab accordingly.

 From memory (forgetting something I'm sure)
0) reread regular installation instructions so you understand the process
1) partition disk and install OSX
2) use OSX command line to newfs and mount UFS partition for NetBSD
3) DL e.g. Feb 10 -current snapshot from releng.netbsd.org
4) copy ofwboot.xcf and gzipped install kernel to root on OSX partition
5) unpack (preserving permissions) the distribution tarballs, 
including a regular kernel into your netbsd partition
6) reboot with boot hd:{OSX partition #},ofwboot.xcf {netbsd install 
kernel name}
7) disklabel wd0 (or sd0 or whatever hard disk you have)
8) copy down the NetBSD view of the partitioning
9) mount your NetBSD root on /mnt
10) cd /mnt/dev; sh MAKEDEV all
11) reboot to OSX, remount netbsd partition
12) cd netbsd/etc
13) vi (or emacs) rc.conf and fstab and fix them appropriately
14) reboot with "boot hd:{OSX partition #},owfboot.xcf hd:{netbsd 
partition #},/netbsd"
15) if that doesn't work because the kernel can't find /etc/fstab 
then use "boot hd:{OSX #},ofwboot.xcf hd:{netbsd #},/netbsd -r 
{disk/partition name from step 8}
-- 
The opinions expressed in this message are mine,
not those of Caltech, JPL, NASA, or the US Government.
Henry.B.Hotz@jpl.nasa.gov, or hbhotz@oxy.edu