NetBSD Success on Powermac 9600
Posted on June 20th, 2005
In late December 2004 I took a stab at installing NetBSD on my old Powermac 9600 (see NetBSD on a Powermac 9600/350). It didn't go very well (see NetBSD Plans Cancelled). So the machine was just sitting around doing nothing. But then I decided to take apart an external SCSI drive and see if I couldn't put it in the 9600. Somewhere along the way I decided to give NetBSD another shot, miraculously it worked!
I think my initial problems revolved around my insistence on booting the NetBSD installer from the CDROM drive. I mean I have one, and it works, so what's the problem? That kind of thinking doesn't get you very far when you're dealing with OpenFirmware. Either it works or it doesn't, so unless you want to learn OpenFirmware in depth, you're better off figuring out Plan B.
For me, that was booting from floppies. Maybe the problem with my CDROM drive had to do with improper SCSI termination; maybe something was out of whack (or at least different than when I tried in December) with respect to the two SCSI buses the 9600 has. All I know is that I got the installer to boot by following the instructions for a floppy-based bootup.
Once I got the installer running, it was able to talk to the CDROM drive properly and things went swimmingly from there. Following installation, I ran into two problems however. The first time I would start up the machine (a "cold boot", as they say), OpenFirmware would give me a message about not being able to access scsi-int/sd@0:0. After a restart, the boot process continued normally.
This ended up being a timing problem. As in, the hard drive wasn't ready fast enough. The solution was to add a delay at the very beginning of the boot process so the disk had enough time to spin up. I did that by following some instructions I found in the NetBSD/macppc FAQ:
0 > setenv boot-command catch 5000 ms boot 0 > reset-all
The second problem was also of the it-only-happens-once-but-not-after-I-reboot variety. The machine seemed to hang while attempting to acquire a DHCP lease. It would succeed after rebooting, but then I'd randomly see these messages on the console:
tlp0: transmit underrun; new threshold 128/512 bytes tlp0: transmit underrun; new threshold 160/1024 bytes
The culprit was too many ethernet devices. In addition to the one I had an ethernet cord plugged into, there was also a LocalTalk-style port plus a PCI add-in card. NetBSD was trying to bring those interfaces up and running into difficulty. After a bit of reading, I added this to /etc/rc.conf:
dhclient_flags="mc0"
which translates into "get a DHCP lease on the mc0 device and no other." Problem solved.
For my own future reference, the 9600 has OpenFirmware version 1.0.5. The output device needs to be set to pci2/@F. The CDROM drive should be at scsi-int/sd@3:0. When I booted from floppy I was using fd:0. After the first boot, I added hostname, domainname, sshd=YES, and dhclient=YES to /etc/rc.conf.