cos

(or: running SunOS 4 on an emulated SPARCstation in 2025 with QEMU 10.1.)

A colleague from one of my previous jobs recently wrote about running VMS on an emulated VAX 11/780. I figured I'd give it a go, as I'd passed up the opportunity early in my career to spend more time with VMS (twice, in fact). I didn't get very far, but something caught my eye at the end of his blog post – he'd also been playing with emulating a SPARCstation. Ooh. That thoroughly nerd-sniped me for the weekend.

Why?

At my first job, in the early 1990s, I found myself working on a SPARCstation 10 writing software in C for a project our company did with a local telco. It was my first time using SunOS, as my university was a DEC shop. Over time, I took it upon myself to maintain the fleet of SPARCstations and its surrounding network – keeping the software on them in sync, introducing new, useful open source software, and solving problems our developers had while using them. I just couldn't help myself – it needed doing, so I did it. The company eventually noticed, so one day our boss asked me, “How about you focus on just doing this? We'll call you a System Administrator.”

So, then – SunOS has a very special place in my heart as the first Unix I used for work. Running actual old hardware is something I don't have enough room for, though. So emulation it is!

Aren't there already instructions to do this?

Blog posts about stuff like this seem to age like milk – inevitably different things go wrong as the years progress and emulators get tweaked. There was nothing out there that just worked in this, the year of 2025.

Here's what I've discovered in order to get it working, then, building on posts from nonspecialist and a few others.

While my final instructions focus on macOS, I'd also experimented with running QEMU on Ubuntu 24.04 and 25.10 VMs, just in case it helped. You should be fine with them too, keeping in mind the tweaks around display and network connectivity.

Getting to the initial installation

John Millikin's post is probably the most useful one I've found across the internet. Among other things, it reminds us about keeping the RAM sized under 100MB unless you can be bothered tweaking the size of the swap partition on disk. 96MB of RAM works fine, for instance.

I had trouble using QEMU's default OpenBIOS to try and boot off the CD image – it said No valid state has been set by load or init-program.

nonspecialist's second post covers getting it to use the Sun ROM. I also had that emotional feeling of seeing that font and that Sun logo popping up on a white screen. Woah.

Since 2023, though, something has changed in QEMU and you won't see that “Wrong packet length” error in his screenshots – instead, you'll see a “Timeout waiting for ARP/RARP packet” message repeating.

If you've used Sun hardware in the past, you'll remember being able to press Stop-A on the keyboard to get into the boot monitor. How do you do that in QEMU? Well, if you've connected the monitor somewhere, you can!

I added -monitor stdio to the end of my sprawling qemu command (see below). That lets me type a command like this in the terminal / shell (pty if you want to get technical) where I ran the qemu command:

QEMU 10.1.0 monitor - type 'help' for more information
(qemu) sendkey stop-a

From here, a boot cdrom at the Sun OpenBoot PROM (OBP) prompt worked, enabling me to:

  • boot from the CD image to install the miniroot
  • boot from the miniroot and install the OS from the CD image by running suninstall

Steps to follow on macOS to get this far

Assuming you've installed Homebrew on your Mac, you can do this:

  • brew install qemu
  • fetch the SPARCstation 5 ROM image and SunOS 4.1.4 CD image – yep, SunOS 4 was retrospectively named “Solaris 1”, and Solaris 1.1.2 / SunOS 4.1.4 was the final release
  • qemu-img create -f qcow2 disk1.qcow2 2G to make the disk image
  • put the script just below into a file called run-sparc5.sh
    • if you're not on macOS, you'll need to customise the -display and -nic sections
  • boot the VM by running ./run-sparc5.sh – it should then say QEMU 10.1.2 monitor - type 'help' for more information and the cursor should be next to (qemu)
  • when you see “Timeout waiting for ARP/RARP packet”, enter sendkey stop-a in that same window where you'd typed ./run-sparc5.sh (ie. just next to (qemu))
  • pop over to the VM's window and boot cdrom
  • when it reboots, do the same sendkey stop-a but this time boot disk
  • you'll be dropped at a root prompt (starting with a #) where you can type suninstall and follow the prompts to install the OS to the disk

run-sparc5.sh

#! /bin/bash
qemu-system-sparc \
    -name mysparc5 \
    -L . -bios ss5.bin \
    -machine SS-5 \
    -m 96 \
    -drive file=disk1.qcow2,if=scsi,bus=0,unit=3,media=disk \
    -device scsi-cd,channel=0,scsi-id=6,id=cdrom,drive=cdrom,physical_block_size=512 \
    -drive file=sunos4.iso,if=none,id=cdrom,media=cdrom,readonly=on \
    -nic vmnet-bridged,model=lance,mac=52:54:00:11:22:33,ifname=en0 \
    -vga cg3 \
    -display cocoa \
    -monitor stdio

Hiccup number one

At this point, I was excited to boot into the working OS but instead, it only got a little further before QEMU crashed with a Trap 0x29 (Data Access Error) while interrupts disabled, Error state error.

I found some discussion in this issue in the qemu repo which led to a second issue that gave me some further help when someone suggested:

One thing I remember from using real Sun systems is that if you do a “Stop-A” while it's trying to boot (from the net, or whatever), you can leave the device environment in a bad state, and you typically had to fix up your NVRAM environment to get the boot device you wanted and issue a “reset” to the PROM monitor and start again.

Making that work, though, needs us to stop it trying to boot off the net when it resets., so that we don't need to press 'Stop-A'. A quick refresher on Sun OpenBoot PROM commands reminded me that I could type this:

setenv auto-boot? false
reset

It'd then reset the VM, and I could boot disk from there.

Hiccup number two

Reading a bit further down issue 2015 I saw someone say:

Unfortunately, at this point it's currently freezing having mounted root, swap, and dump.

which matched what happened to me. Ugh.

sad trombone - it hangs right here after mounting the filesystems

Randomly trying things until they work, part 1

I tried other SPARCstation types – I could get a SPARCstation 20 partially booting if I added -machine SS-20 -cpu TI-SuperSparc-60 and used the appropriate ROM, but it crashed in other ways and I still haven't got it completely working. I also couldn't get it to make more than 1 CPU visible, but that's no big deal – Solaris 2 used multiple CPUs much more effectively, I seem to remember.

Randomly trying things until they work, part 2

At this point, I could've gone and built QEMU from source, trying some of the patches mentioned in that repo issue. I was feeling a bit lazy, though, and figured I'd try a few other things before giving up and going that way. One experiment was to swap out the Sun ROM for QRMU's default OpenBIOS...

...which worked!

The finally-working QEMU script for macOS, then

#! /bin/bash
qemu-system-sparc \
    -name mysparc5 \
    -machine SS-5 \
    -m 96 \
    -drive file=disk1.qcow2,if=scsi,bus=0,unit=3,media=disk \
    -device scsi-cd,channel=0,scsi-id=6,id=cdrom,drive=cdrom,physical_block_size=512 \
    -drive file=sunos4.iso,if=none,id=cdrom,media=cdrom,readonly=on \
    -nic vmnet-bridged,model=lance,mac=52:54:00:11:22:33,ifname=en0 \
    -vga cg3 \
    -display cocoa \
    -monitor stdio

ie. I've just removed the “roms” line from the one above.

So all of this means that you should:

  • use the first script (with SPARCstation 5 ROM) for initial installation
  • use the second script (without the ROM line) for running it normally

Hurrah!

Ok, so I could boot up, enter boot disk3:a at the OpenBIOS prompt to get into the installed OS, do that final configuration, and make the network work per John Millikin's post.

I have a weird netmask on my network for historical reasons, so I had to add an entry to /etc/netmasks and configure /etc/defaultrouter.

How do I get files onto it?

You might notice John Millikin's post talks about compiling recv.c on the VM to get a basic program to receive files over a bare network connection from elsewhere. I was going to use this, but had another thought, about using ancient internet technology that still works today.

I remembered that SunOS 4 has a bunch of network services accessible by default (a security nightmare if you connected it up to the Internet, unexposed!). One of these is FTP, the venerable File Transfer Protocol. Checking /etc/inetd.conf confirmed my memory that an FTP server would, indeed, run on demand.

On my Mac, Homebrew still has lftp available, so I installed that, and could transfer stuff by running lftp -u username _host or IP_ and then put file (or mput file* to send a few at once).

Netscape works per John's post, and when looking for stuff earlier in my adventures, I'd found a copy of Lucid Emacs(!) on archive.org, which seems to run.

a working desktop!

Historical artefacts

What was truly useful, though, was suddenly remembering that I still had these books on my bookshelf – a few issues of Rich Morin's Prime Time Freeware for Unix from the mid-90s. These were from the days when people had slow, or even only occasional internet access. Having local copies of software was super useful. The CDs still work, and I was able to copy the source for two pieces of software – gzip and zsh – that were essential way back then, onto my VM and compile them.

three Prime Time Freeware books with CDs

What's next?

Well. I'll probably:

  • dig up a 3-button mouse, as Sun's OPEN LOOK Window environment really just doesn't work without one
  • compile a few more memories that I can find on the PTF CDs – olvwm for one, and probably a heritage version of GNU Emacs – maybe 18.59 for real nostalgia
  • make it look more colourful!
  • see how much semi day-to-day stuff I can do from it
  • wonder if I can make it properly boot automatically (ideas welcome!)

...and what else is next?

Beyond getting back to that VMS emulation, I'm also wondering how easy it is to emulate a DECstation, so I can relive my student days? Definitely tasks for some other time, though.

Final thoughts

SunOS existed in a time before journaling filesystems, so make sure you shut the VM down properly (via a su -c 'shutdown -h now') rather than just switching it off, or you'll find yourself needing to learn how fsck works.

#SunOS #Unix #Emulation #RetroComputing #SPARCstation


This was a post from Cos.

You can follow this blog on the Fediverse at @cos@apintandaparma.club or subscribe in your RSS reader.

It was day two in Kunming, and the rain had eased up. I walked around the streets of the old town area, looking for somewhere to try one of the famous local dishes (过桥米线 – Cross the Bridge Noodles), and building up the courage to cross my own, internal bridge – making myself walk into a restaurant and order something in my extremely nervous Mandarin.

3 layers of plates containing assorted vegetables, slices of meat, and two eggs, waiting to be poured into a large bowl of noodles.

A bit of wandering and AMap'ing later, I found myself seated at the back of a restaurant, which was just as well – as soon as I'd ordered, my nose suddenly erupted with blood, and I spent about 15 minutes waiting for it to stop before I could eat.

IMG_6717.jpg

The bowl was huge – I found myself cursing my aging body that just doesn't have the inner space for food that it once did, but it really hit the spot. Lovely rice noodles, flavourful broth, and a tiny amount of regret that I'd let the waitress talk me into ordering some “side dishes” that turned out not to be side-dish-sized. Oops.

IMG_6719.jpg

Full, happy, and a bit short of blood, I wandered back out into the streets of the Land of Mushrooms, and walked until I was tired. Nothing makes me happier than the chance to wander a brand new (to me) city.

IMG_6722.jpg

#travel #China #August #Kunming #昆明 #Yunnan #云南 #food #过桥米线


This was a post from Cos.

You can follow this blog on the Fediverse at @cos@apintandaparma.club or subscribe in your RSS reader.

We rented a Ford Mustang and hit the road out of town. When we accelerated onto the freeway, the look on Pond’s face was priceless as she exclaimed “oooh!”

side mirror view, pylons in the distance

I queued some appropriate songs. The landscape sped past. Moving onto some side roads, we pulled the top down and enjoyed feeling like ... somebody else.

Pond at the wheel

We had a quiet lunch in a popular country town and, returning home, felt like the world had taken on a slightly different quality – just for a day.

Pond wearing a hat, crouching near the front of the car

I hadn’t considered just how different it would feel, though, and I wonder how we might experiment like this in other ways to bring other little sparks of joy into our life.

Pond looks back at the car, a little out of focus

#Travel #RoadTrip #Photography #Drive #Moments


This was a post from Cos.

You can follow this blog on the Fediverse at @cos@apintandaparma.club or subscribe in your RSS reader.

The “morning person” part of my brain never lets me sleep too long – it was up and out of the house each morning of this long weekend, onto a tram or a train or a bus, and off to some other part of town while everything was still peaceful. I took photos with numerous devices, and would've walked over 25km in total.

one thing leads to another

One morning, I spotted somebody's Christmas remnants and heard Fleetwood Mac leaking out of a popular cafe before resting in a park while a pair of masked lapwings patrolled the grass near me. Another morning, a wafting smell of food grabbed me as I crossed a railway bridge, and just nearby, a friendly cat talked to me from somebody's garden. The cat had so much to tell me, in fact, that it jumped the fence into a neighbouring garden to continue meowing to me as I walked away.

Untitled

The streets remained quiet, though, for which I'm grateful. My restless mind craves a chance to breathe, to listen, to explore without the stress of a crowd. Sometimes, I'm revisiting memories; Sometimes I'm thinking about conversations I need to have, and it's all part of a never-ending battle to Remain Present. Music helps, and often it's the soundscapes that really help.

Untitled

my continued existence, etc

#walks #photography #weekends #wandering #restlessness #music #ambient


This was a post from Cos.

You can follow this blog on the Fediverse at @cos@apintandaparma.club or subscribe in your RSS reader.

I don't often have the energy to write anymore, but I'll ride it while it's suddenly here. My listening this year wasn't particularly exploratory – I let my sub to The Wire lapse a few years back, and I miss the serendipitous references it brought me. With that, here we go:

Favourite things released this year

  • TindersticksSoft Tissue – I’m calling it a comeback, as this grabs me somehow more than other recent and not-unpleasant work. It hits a definite groove, and it's a masterpiece.
  • Cindy LeeDiamond Jubilee – A box full of experiments, some of which work, and a couple of which are transcendent – Not unlike a Guided By Voices album of old in that respect, except that it’s a two-hour behemoth with a bit more 60s-inspired fuzz/reverb. Glorious.
  • DIIVFrog in Boiling Water – Warm, familiar, and making the sounds they’re so good at, but the feeling that Something’s Not Right is unavoidable. A strangely unsettling album.
  • Jessica PrattHere in the Pitch – when I inevitably wake up from whatever dream this life is, I expect to hear Jessica Pratt's music softly playing, before the grand revelation that my existence was all part of some late-60s experiment.
  • Adam WiltzieEleven Fugues for Sodium Pentothal – what I'd probably be listening to just before I wake up from that dream.
  • Kleinmarked – Definitely the kind of album I’d only hear about from one of two places – The Wire magazine, or one of Boomkat’s e-mails. I heard about it purely by chance, but it's the kind of discovery I relish – someone's out there pouring themselves into slabs of noise like this, and it's beautiful.
  • Snarski vs SnarskiWaiting for the Bell – Two musical brothers take their turns with each others’ songs through the ages, giving a bit of new life to familiar tunes via each of their lovely voices. Come for Crossing off the miles, stay for Be careful what you put your name to.

Pleasant Discoveries from other times

  • The Sorcerers' Ethiojazz-inspired tunes. I saw this video playing silently in the window of a shop in Northcote one evening. Not long afterwards, I saw some other reference to the band, which led me to In Pursuit of Shai-Hulud. Sometimes the universe sends you signals, I guess.
  • Tony Molina (thank you acb!) who reminds me of Elliott Smith, Guided by Voices and something else.
  • Hollie CookHappy Hour in Dub which I found hard not to enjoy.
  • Voice ActorSent from my telephone – what if your stoner friend popped in every now and then with some random dream memories or other observations? I've listened through the whole album, but this feels like the perfect kind of source material to drop into a mixtape or two.

Continuing Earworms

  • Drab Majesty gives us the 80s of our dreams.
  • Spunsugar gives me one take on the 90s in my dreams.
  • Night Tapesdrifting felt like a fine slice of dream-poppy excellence.

Recent releases I'll take into next year

I need to spend some time with these to form proper opinions.

Late 2023 releases I brought into this year

  • bdrmmI don't know – nice fuzzy noise that hits the spot. I see the next album's on the way in February, too.
  • Blonde RedheadSit Down for Dinner – if you're looking for a soundtrack to feeling overcome by wistfulness, this might be it. Had I seen them play back in June, I may well have drowned in my own tears.
  • Hermanos GutiérrezEl Bueno Y El Malo – currently replacing Khruangbin as the band you'll hear in many inner-suburban situations, and rightfully so – a second example of brotherly excellence in this list, too.

Three albums I keep coming back to

No notes on these three – I encourage you all to find out for yourselves.

#music #EndOfYear #NowPlaying


This was a post from Cos.

You can follow this blog on the Fediverse at @cos@apintandaparma.club or subscribe in your RSS reader.

winter sounds

Dreary #winter; time for some dreamy, drifty #music.

the loneliness of concrete

  • Shinjuku Thief's Bloody Tourist – so many years since I listened to it, but with Paul Schütze popping up again recently it's a short jump to this album that he'd produced at the start of the 90s, back when I was a nervous Young Person buying CDs from the very same Darrin Verhagen as he worked in a CBD music shop, and listening to a show on 3PBS FM that he sometimes played music on. The languid, slightly feverish Open Wound nicely fit my morning walk, as Preston struggled out of bed on a cold morning.

  • Bill Callahan’s Have Fun With God – a so-called “dub” reworking of the Dream River album – stops my mind from getting caught up in Other Things this afternoon. “I wonder if I'll ever wake up?


This was a post from Cos.

You can follow this blog on the Fediverse at @cos@apintandaparma.club or subscribe in your RSS reader.

I spent the weekend mostly stuck at home, through a combination of priorities – both current and impending – and the relentless heat after what we'd considered a fairly damp summer.

morning light

A public holiday today gave me something to aim for, though. I forced myself up and out into the cool, reasonably early morning air for breakfast somewhere long forgotten and a walk through some less-remembered streets.

protection

It's lovely to be up so early that you can have some space, even in the inner suburbs. There are people, but not all the time; not so many to invade your thoughts.

regrowth

Near Carlton Gardens I found a single light pole full of seemingly sociable birds – none of the other nearby ones were like this.

chat

Reaching the core of the city I felt the heat rising, and figured it was a good time to close the loop by hopping on a tram towards home. Stopping for a coffee just near home, I couldn't quite overcome my shyness around asking the staff how to order a long black coffee in Mandarin (is it a 美式咖啡 or something else?). Next time, I swear.

#walks #photos #Leica #digital #Melbourne


This was a post from Cos.

You can follow this blog on the Fediverse at @cos@apintandaparma.club or subscribe in your RSS reader.

For my birthday walk I found myself drawn, without even really thinking too hard about it, to an old suburb I briefly lived in twenty years ago. Music in ears, camera in hand, it was glorious wandering down random streets with older buildings – no need to hurry, no need to stress about a dozen errands to take care of. The journey through these streets is as much a journey through my memories, and it feels different each time.

My regular Chinese practice has me seeing things – this sign reminded me of 哭:

FKIQE9054.jpg

Whilst taking one quick photo of an old car, a lady walking past told me “He's a bit of a recluse. He collects Renaults.” At the other end of the same street, I found a lovely old Chevy ute with headlights like giant eyes that'd stare straight through you.

determined headlights

Further south, I found a light pole completely overrun with plant life – the kind of thing I'd be more likely to see from a train window in South East Asia...

Parkville's creeping horror

This felt like it must've been someone's forgotten labour of love, left parked on the street:

"dunrovin"

The afternoon was a whirlwind of sociability and conversations – the kind of thing I find enjoyable but draining. I need another long walk to recover!


This was a post from Cos.

You can follow this blog on the Fediverse at @cos@apintandaparma.club or subscribe in your RSS reader.

I like drone music. I'm trying to get to like drone photography but it feels like a harder slog so far. My resting father, a glider pilot, may have enjoyed it moreso, but only if he couldn't do the real thing.

East

I did the necessary registering and certification stuff, which wasn't too onerous for Australia, but moreso in Thailand when I took it along just in case I'd be able to use it. The 150m limit (generally, around where I am) doesn't feel like an issue – I've never gone higher than 100m so far, and still had pleasant-enough results. It feels like I have to go through that “the first 10,000 photos are going to be terrible” process all over again in order to feel like it's part of my overall mission.

I love the vistas I see from travellers like Yan, but accept that I probably won't be travelling that much or that far. There've been occasional moments, though:

Lake Tyrrell, Feb 2022

It'll be a slow burn, this one. The hard part is finding a diversity of times and places to practice – it's much less immediate than the camera in my hand, but the payback is the opportunities that I'm hoping it will open up. All said, I'm grateful to my prior employer for the 10-year tenure gift card that prompted me to consider this at the start of last year.

Mt Cooper, a year ago

(click through to see the original photos in their full panoramic glory, BTW – they're getting squeezed in this blog)

#drone #photography #learning #relearning #confusion


This was a post from Cos.

You can follow this blog on the Fediverse at @cos@apintandaparma.club or subscribe in your RSS reader.

The transcendent nature of hearing a strange old robotically buzzy 20 year old song as the bus crested the hill on Punt Rd and, a little later, I stepped off and walked to the office; it fit the cold morning air so well.

When did I first hear this song? I’d bought the CD in Singapore and listened to it on this train trip to Kuala Lumpur in early 2004, in very different weather to this wintry morning:

the view out of the opposite window on a train, with a single person sitting to the right. You can see a pole outside, and some greenery.

I learnt so much on that trip, and saw so many things:

IMG_0263

As we get older, it’s harder and harder to fight the pull of nostalgia. What would I have done differently? Plenty of things, but also nothing.

#music #memories #Malaysia


This was a post from Cos.

You can follow this blog on the Fediverse at @cos@apintandaparma.club or subscribe in your RSS reader.