Reviving a Sun Ultra 5 workstation
I recently got an old Sun Ultra 5 working. It wasn’t too difficult, but I needed to dig up a few old serial cables…
It already had SunOS 5.8 installed, but I put OpenBSD 6.1 on it, since I need a modern OS to actually do anything with it.
The first boot
The first step was obviously to just turn it on and see what happened. This went well, it turned on, the CD drive and floppy drives made some noises, then it stayed on. Of course, I didn’t have access to a Sun keyboard anymore, so this is basically all I could do at this point.
I decided to connect a monitor to it and see what it said.
No keyboard detected. Redirecting output to ttya
Then the screen went blank.
Of course, how could I forget! Sun workstations aren’t piece of crap i386 machines, they’re right and proper workstations, designed to work properly over serial ports.
I consulted the OpenBSD faq page for serial consoles. There was a bit about sparc64 machines:
These machines are designed to be completely maintainable with a serial console. Simply remove the keyboard from the machine, and the system will run serial.
I don’t have a keyboard, so this is perfect. The serial port on the back of a Sun Ultra 5 is DB25. There is a DB9 port, but it’s ttyb, so isn’t used automatically. I dug up a DB25 to DB9 adapter and a USB to DB9 cable, connected it and hey presto, it worked!
I was able to boot into SunOS! I was greeted with a curses-type setup screen, I was asked about the network (it failed to connect) and the hostname. Then I booted into SunOS 5.8!
This was great, but since I had no network, I had to get a modern OS on it, one I knew how to use.
Getting OpenBSD install media
There are a couple of options here:
I tried to find a CD-R to no avail. I went to a nearby OpenBSD mirror to download the install61.iso for sparc64, but since I could only find already-written CD-Rs (useless) and CD-RW, I decided to give it a shot with a CD-RW. It didn’t work:
ok boot cdrom Resetting ... Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 270MHz), No Keyboard OpenBoot 3.11, 512 MB memory installed, Serial #1653024. Ethernet address 8:0:20:19:39:20, Host ID: 80193920. Rebooting with command: boot cdrom Boot device: /p...@1f,0/p...@1,1/i...@3/cd...@2,0:f File and args: Can't read disk label. Can't open disk label package Evaluating: boot cdrom Can't open boot device
As I suspected, I couldn’t get the drive to read a CD-RW.
Next up was floppy. I got the floppy61.fs from there and tried it out:
ok boot floppy bsd Resetting ... Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 270MHz), No Keyboard OpenBoot 3.11, 512 MB memory installed, Serial #1653024. Ethernet address 8:0:20:19:39:20, Host ID: 80193920. Rebooting with command: boot floppy bsd Boot device: /p...@1f,0/p...@1,1/e...@1/fdthree File and args: bsd Bad magic number in disk label Can't open disk label package Evaluating: boot floppy bsd
So what option did I have left? miniroot61.fs, of course.
On my laptop:
$ ftp http://mirror.bytemark.co.uk/OpenBSD/6.1/sparc64/miniroot61.fs $ uuencode -o miniroot61.fs.uue miniroot61.fs miniroot61.fs
On the Ultra (using cu as a serial terminal):
Then I hit
~> which is the cu command to send a file. I choose
miniroot61.fs.uue, which is then uudecoded and placed into the file
miniroot61.fs where I ran uudecode.
Now I write it to the disk. Just in case it doesn’t work, I decided to write it to swap. This way, if it fails to boot, I haven’t hosed my system.
# dd if=miniroot61.fs of=/dev/rdsk/c0t0d0s1
Then enter the ok prompt:
# init 0 ...some output... ok boot disk:b Resetting ... Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 270MHz), No Keyboard OpenBoot 3.11, 512 MB memory installed, Serial #1653024. Ethernet address 8:0:20:19:39:20, Host ID: 80193920. Rebooting with command: boot disk:b bsd Boot device: /pci@1f,0/pci@1,1/ide@3/disk@0,0:b File and args: bsd OpenBSD IEEE 1275 Bootblock 1.4 ..>> OpenBSD BOOT 1.9 open /pci@1f,0/pci@1,1/ide@3/disk@0,0:b/etc/random.seed: No such file or directory Booting /pci@1f,0/pci@1,1/ide@3/disk@0,0:b/bsd 4045496@0x1000000+1352@0x13dbab8+3251904@0x1800000+942400@0x1b19ec0 symbols @ 0xfff62300 120 start=0x1000000 console is /pci@1f,0/pci@1,1/ebus@1/se@14,400000:a
From here I saw the usual OpenBSD installer output. The network was detected without a hitch, the installer downloaded the sets and everything worked perfectly.
It’s almost a bit disappointing how well it works, I wanted to have to solve some problems.
Anyway, now I have a real big-endian system to test my software on! Of course I could have picked up an old macppc powerbook, but that would be even less fun than this!
Here is the
hw.machine=sparc64 hw.model=SUNW,UltraSPARC-IIi (rev 1.3) @ 269.804 MHz hw.ncpu=1 hw.byteorder=4321 hw.pagesize=8192 hw.disknames=wd0:0d5853015d2b2605,cd0: hw.diskcount=2 hw.cpuspeed=269 hw.vendor=Sun hw.product=SUNW,Ultra-5_10 hw.physmem=536870912 hw.usermem=536854528 hw.ncpufound=1 hw.allowpowerdown=1
And here is the dmesg.
I hope I can get my hands on a 440 MHz CPU at some point to give it an upgrade, but it is already fast enough for daily use.