Subject: Installing on G4 (Cube)
To: None <port-macppc@netbsd.org>
From: Andrew White <awhite@arc.corp.mot.com>
List: port-macppc
Date: 03/27/2001 14:13:40
I've used a slightly different technique to charles, but it works fine up to
the point where I try and newfs the rwd0a filesystem.

# newfs /dev/rwd0a
[snip]
newfs: ioctl (WDINFO): Invalid argument
newfs: /dev/rwd0a: can't rewrite disk label

Any ideas?  I'm using the NetBSD 1.5 "Official" CD distro and the boot.fs
kernel.


Here's what I've successfully done thus far:

-----
Step 1 - Partition your hard drive

I used 2 Mac OS partitions (9 and X) and 3 BSD partitions, as follows:

#1: HFS+
#2: BSD Root
#3: HFS+
#4: BSD Swap
#5: BSD User

Note that #1 corresponds to partition 9 on the device, and so on.


Step 2 - Install bootstrap file systems

Copy "ofwboot.xcf" and "macppc/installation/boot.fs" to the root of an HFS+
device, preferably the first partition of the first device.


Step 3 - Reboot into Open Firmware

Reboot, holding down Cmd-Opt-O-F as the machine boots.
At the OF prompt ("0 >"), enter "setenv auto-boot? false".
"reset-all" stores this and reboots the machine.  It should automatically
enter open firmware.


Step 4 - Boot the install kernel

In open firmware, enter "boot hd:9,ofwboot.xcf hd:9,boot.fs".  This boots
the bootloader ("ofwboot.xcf") from hard drive 0, partition 9.  The
bootloader then boots the kernel image "boot.fs" from hard drive 0,
partition 9.

Partition 9 is usually the first usable partition of an Apple formatted HD. 
If you put it on another partition, you will have to figure out yourself
where it went.  The "pdisk" utility under OS X is useful for this.


Step 5 - Installing NetBSD

The system will present a whole lot of boot data, then prompt for a terminal
type (with a default of 'vt100').  'vt100' is fine, so just press 'return'.

The system will then ask you if you wish to "Install", "Shell" or "Halt". 
If you select "Install", it will drop you into SysInstall.  Unfortunately,
SysInstall will happily clobber your partition map but will not preserve
your HFS+ partitions.

Instead, go into the shell.  If you type "disklabel /dev/wd0a" you will see
what NetBSD thinks of your partition map.  Among other things, your NetBSD
root partition will be at partition A, your swap partition at B and your
user partition somewhere down the list (probably G).
-----

-- 
Andrew White                Andrew.E.White@motorola.com