Subject: Re: install, newfs kills system
To: Jonathan Essex <jonathan.essex@iquality.co.uk>
From: Timo Schoeler <timo.schoeler@macfinity.net>
List: port-macppc
Date: 05/31/2005 15:12:34
Jonathan Essex schrieb:
> Hello all,
> 
> Apologies and all, I have been until now a NetBSD virgin.
> 
> I'm trying to install 2.0.2 on a G4 (sawtooth) from an CD blown from the
> standard iso image as downloaded from /pub/NedBSD/iso/2.0.2 on
> ftp.netbsd.org
> 
> I have two IDE drives.
> 
> The system boots fine off the CD, pdisk seems to create partitions OK,
> but every time I try to run newfs on any of my freshly created
> partitions (/dev/wd1a, for example) the system just restarts after a
> couple of seconds. I can see some kind of error messages appear but they
> are not visible for long enough to actually read them... :-(
> 
> I have tried creating partitions of different sizes on my two drives,
> but always with the same result (excepting one time where the system
> just hung... no unusual messages beyond the unable to change label name
> which I gather is normal.
> 
> I have been using 'newfs /dev/wd1a' as an example command line
> (substituting wd0a, wd1g, or wd0g depending on cirumstances)
> 
> It seems likely that I am doing something stupid. I would be humbly
> grateful if anyone could point me in the right direction...
> 
> Thanks
> Jon.

hi jon,

maybe you can try my 'version' of putting NetBSD onto my G4 (yip, also a
Sawtooth); however, it requires a Mac OS <X boot cd to partition the HD.
afterwards, it works with NetBSD, Mac OS 9, and Mac OS X in multi-boot
config.

NetBSD/macppc Installation

(OpenFirmware 3 — all coloured Macs)



• boot from Mac OS 9 Install CD

• run 'Drive Setup' ('Laufwerke konfigurieren' in German) and create
following enlistet partitions:

- ~250MByte if you want to install Mac OS 9 (e.g. for maintenance) or
~10MByte for booting into NetBSD (HFS+ format)

- a root partition for NetBSD (~60MByte, choose 'A/UX-Root' format)

- a swap partition for NetBSD (≤512MByte RAM swap should be RAM * 2,
'A/UX-Swap' format)

- a /usr partition for NetBSD (if you want to build a system at least
2GByte rec'd, 'A/UX-User' format)

- optionally, you might want to create own partitions for /var, /home
etc. (all in 'A/UX-User' format)

• install a copy of 'ofwboot.xcf' (the bootloader for NetBSD) and
'netbsd' (the NetBSD Kernel) to the HFS+ partition; you may also install
Mac OS 9

• enter the OpenFirmware by pressing 'Alt' + 'Option' + 'o' + 'f'

• having inserted the NetBSD iso CD, you are now able to boot from it:
'boot cd:,ofwboot.xcf' or 'boot hd:, ofwboot.xcf' to boot from HFS+
partition

• being in the installer tool, choose 'execute /bin/sh' from Utility
Menu and execute the following steps:

- 'disklabel wd0' (or another HD ID such as wd1, sd0 etc., this depends
on your machine) — HD information is printed on the screen

- do 'newfs /dev/wd0a' (or another partition ID, see above) for all
4.2BSD-type partitions (fyi: the 4.2BSDs are the former A/UX partitions)

- now 'mount /dev/wd0a /mnt' (or whatever is intentioned to be / after
installation)

- create a fstab file according to your partition layout:

- 'mkdir /mnt/etc'

- 'cat > /mnt/etc/fstab' (enters interactive mode!)

- '/dev/wd0a / ffs rw,softdep 1 1' [enter]

- '/dev/wd0b none swap sw 0 0' [enter]

- '/dev/wd0g /usr ffs rw,softdep 1 2' [enter]

- '(...)' (quit interactive mode and write to fstab: 'ctrl + c')

- now create the directories needed to mount your given mountpoints,
e.g. 'mkdir /mnt/usr' (and, if you have them, the same for /var, /home…)

- unmount all by doing 'cd /' and 'umount /mnt'

- re-join the installer tool by exiting /bin/sh with 'ctrl' + 'd'

• now go ahead but use the option re-install to keep your current
partition scheme!

• after installation again go into the shell and edit /etc/rc.conf the
way that rc_configured *is* set to YES -- otherwise you will end up in
single user mode because /etc/rc.conf says 'rc_configured=NO' which has
to be changed to 'YES'

• after installation and rebooting, you may now boot directly into
NetBSD via OpenFirmware by 'boot hd:,ofwboot.xcf'

• welcome to NetBSD/macppc :)

NB: Compile a new kernel with 'options OFB_ENABLE_CACHE' set (it's #ed)
to speed up console output!

-- 
Timo Schoeler | http://macfinity.net/~tis | timo.schoeler@macfinity.net
//macfinity -- finest IT services | http://macfinity.net
Key fingerprint = F844 51BE C22C F6BD 1196  90B2 EF68 C851 6E12 2D8A

There are 10 types of people in the world. Those who understand binary
and those who don't.