This is a collection of solutions to OpenFirmware and hardware issues for which I had difficulty finding answers as a first-time user of Sun hardware.

The Sun Blade 150 is rather similar to the Sun Blade 100, and probably other PC-like SPARC hardware from Sun.

Problem 0: accessing the OpenBoot prompt

The internet’s common solution is a key combination using the "Stop" key on your Sun keyboard.

If, like me, you don’t have the privilege of owning such a device, waiting until your Sun beeps and then quickly pressing the power button twice works just as well.

This should allow you to configure the boot device and solve the "no keyboard detected" display output problems (see below).

Problem 1: using a PC USB keyboard

The Sun is rather picky about the keyboard it uses. The firmware refused to detect my USB keyboard and then automatically switched to serial console mode, meaning NetBSD wasn’t able to initialize the framebuffer. If I didn’t want graphics, I wouldn’t have bought a workstation!

First of all, get a USB to DB-9 serial adapter, you will need one eventually if you’re a nerd working with "enterprise" gear.

Connect to the Sun:

# cu -l /dev/ttyU0

Issue the following OpenBoot commands:

ok setenv input-device ttya
ok setenv output-device screen

This puts OpenBoot into a rather strange mode where the serial console is the keyboard but all the output goes to the VGA screen. However, it allows NetBSD to initialize the framebuffer. Once NetBSD finishes booting, the USB keyboard works just fine.

Problem 2: hanging on "boot cdrom", etc

While the Sun passed its memory test, any attempt at booting a OS would hang. Opening the case and reseating the RAM allowed it to continue as normal.

Problem 3: It sounds like a banshee!

Suns are known for being loud, but I suspect the fans are showing their age and beginning to need lubrication. The CPU fan in particular is tiny (50mm) and squeals horribly.

I got some replacement parts:

  • Noiseblocker NB-BlackSilentFan XS1 50x50x10mm 3000rpm

  • Generic 80mm ATX case fan

  • Molex to 3-pin adapter

The 50mm CPU fan plugs in to the 3-pin jack on the CPU board, which seems the same as the standard ATX connector. I reversed it to use it as an exhaust fan, but when turned on the blades get stuck on the heatsink. To avoid this, I increased the fan’s height (by maybe 1mm) using some cable-tie wire wrapped around the screw holes.

The 80mm case fan cannot be plugged into the power distributor board - the Sun has a tiny 3-pin jack which seems non-standard. Instead, I repurposed one of the spare molex connectors from the Sun’s PSU.

It might be wise to get a molex splitter, since the PSU has at least some non-standard connectors, so can’t easily be replaced with a new PSU that has more.

My next mission will be to open up the PSU and replace the fan in that, but this at least made the noise tolerable.

Problem 4: Using a CompactFlash card as an IDE disk

Spinning rust IDE disks are getting old and will be unreliable, but they’re also really heavy and add to the Sun’s weight.

CompactFlash cards are basically small solid-state IDE disks, and are still being manufactured for high-end photography and industrial uses.

The most convenient solution seems to be using a "male-to-female" IDE disk adapter with a separate molex power connector on it, combined with a small "laptop IDE" adapter to your CF card. These adapters are widely available on eBay.

Problem 5: Using X.Org

The NetBSD sparc64 kernel defaults to securelevel=1. This is a pretty sensible configuration for headless servers, and also useful on x86 and ARM where X.Org can often run with a high securelevel using DRM/KMS.

On sparc64, with the machfb(4) driver, X.Org cannot run with securelevel=1.

You can recompile your kernel with options INSECURE uncommented to allow X.Org access to the video chip:

$ cvs -q -danoncvs@anoncvs.netbsd.org:/cvsroot co -P -d netbsd-10 -r netbsd-10 src
$ cd netbsd-10
$ vi sys/arch/sparc64/conf/GENERIC
# uncomment options INSECURE here
# then build the kernel...
$ ./build.sh -O obj -U -m sparc64 -j2 tools
$ ./build.sh -O obj -U -m sparc64 -j2 kernel=GENERIC
# copy the kernel into place
# cp obj/sys/arch/sparc64/compile/GENERIC/netbsd /netbsd

Tired of using X.Org and want to run your system with a high securelevel again? It’s pretty easy:

# echo kern.securelevel=1 >> /etc/sysctl.conf
# sysctl -w kern.securelevel=1

Extra note: broken CD/DVD-ROM drive?

Initially, I assumed that the Sun’s drive was broken, since it wouldn’t boot from it (it was actually the RAM issue, see above). There is a non-netboot alternative - installing to the disk using QEMU.

First, create a raw disk image file with dd:

$ dd if=/dev/zero of=./disk.img bs=1m count=119000

Then boot the NetBSD installer in QEMU:

$ qemu-system-sparc64 -m 512m -cdrom NetBSD-10.1-sparc64.iso -hda disk.img -boot d

Run the installer as usual and safely poweroff.

Once the virtual machine is powered off, dd the image to your CompactFlash card using a USB card reader:

# dd if=disk.img of=/dev/rsd0d bs=1m

Congratulations, you’ve installed NetBSD on a Sun without using a CD-ROM or setting up network boot. :)

Unfortunately, Solaris/illumos struggle to run in QEMU.

Obligatory dmesg?