Hacker News new | past | comments | ask | show | jobs | submit login
Running SunOS 4 in QEMU (Sparc) (john-millikin.com)
112 points by zdw on April 14, 2023 | hide | past | favorite | 40 comments



Im not going to name names, but i know of a system still using sunos 4 in prod...

I really loved solaris. Its such a shame how sun worked out. Oh well. FreeBSD has some of the features we had in 2005 on solaris 10...


Sun's attempt to build a massively multi-thread system failed at that time, it's interesting to see the direction we have moved, almost 20 years later again (I say this whilst building a "new" 2nd hand epyc system with 32 cores...)


Sun did this because they had a lot of issue building faster cores. The were very late on out of order processing and generally their CPU were never all that good.

And massive multi-thread system that doesn't even have FPU and is a slow in-order core isn't actually useful. Sun CPU deserved to fail.


Would there have ever been a pivot to the consumer market, or would it be stuck behind big iron like with IBM and whatever they have hiding under the hood?


> FreeBSD has some of the features we had in 2005 on solaris 10...

Yeah, it really does feel like FreeBSD is the best successor:

* ZFS built in

* boot environments

* dtrace

* zone^wjails

(I feel like there was more that I'm forgetting?)

Although I do feel like it's less polished and the desktop support is comparatively lackluster. Oh well.


+ A clean, stable base system


Which meant that on this Unix system you had to compile a completely new Unix system (with the GNU tools and libraries) to be able to use any software that wasn’t hopelessly outdated.


Nothing will be as good as Solaris because the codebase was proven with years upon years of enterprise use at scale with a support organization behind it. Big-ass paying customers will find more/less all of the edge cases and want their systems fixed with a patchset now.

One example of how things from Solaris aren't as good: tldr: ZFS. Solaris' was good, all others are fragile and unproven.

FreeBSD ported ZFS first from OpenIndiana. They threw that away and adopted ZoL (OpenZFS). ZoL morphed from the OpenIndiana code into an largely untested, hacky manner. Each OS should've thrown it away a long time ago and started with a clean room implementation for each OS, sharing only comprehensive disk specification, user documentation, unit and integration tests, and fuzzing. The OpenZFS initiative tries to serve too many masters, has too many cooks, and no one's validating code adequately.

On Linux, for anything real, I'll take XFS on mdadm. At least I won't lose an array because of shitty ZoL code and lack of support for said shitty code.


https://utcc.utoronto.ca/~cks/space/blog/solaris/Solaris10X8...

Here's someone comparing Solaris 10 to Linux:

> the sysadmin experience on a modern Linux is much better than on Solaris 10. There really is no comparison between, say, apt-get and the official Solaris patch management tools.

> there is much more useful software conveniently available for your average Linux distribution (either as prepackaged binaries or as easy to build source code).

> Solaris's driver support seems lacking. Some things (eg, jumbo frame capable Ethernet drivers) are backwards compared to Linux; others that I would like are just missing, such as drivers for 3Ware Escalade controllers.

> (Note: 'supported in Nevada' doesn't count, except as an indication that it might show up in Solaris 10 at some indeterminate time.)

> I don't know how well Solaris 10 x86 runs on non-Sun x86 hardware, especially recent hardware.

> (Of course, it runs fine on Sun x86 hardware and Sun has competitively priced x86 stuff these days, so this may not matter to you.)

The blog has a whole section for solaris, but the past few years it's just ZFS stuff because Solaris is no longer interesting to them compared to modern Linux.


Yeah well Solaris died. Of course it can’t compete with Linux anymore.

I’m not buying the network complaints though. I did some really weird networking stuff with Solaris boxes that I still can’t easily do again today. I mean, can you control bandwidth of individual processes from right within systemd? With a single command? We had that in 2011… can you apply vlan tags to a single docker container based on which user started it? Jumbo frames when you talk to the emc array for iscsi but Normal for your db traffic?

Nope. Well, maybe. But nowhere near as easy [0]

0: https://en.wikipedia.org/wiki/Solaris_network_virtualization...


Thouroughly enjoyed working with Sun and Solaris back in the day, but I don't follow your logic.

> years upon years of enterprise use at scale with a support organization behind it

Isn't this just as true of enterprise Linux, for coming on twenty years now?


Linux evolves really fast and in an unplanned chaotic way. So it partly applies to linux for sure but there are also forces in other directions.

Also, linux isn't an OS, its a kernel. The OS is built out of bits and pieces of open source software flying around.

With Solaris you get a kernel and a user-land portion of the OS in one package designed together and for each other.


I’ve heard this argument for years but come on how many Linux systems do you have in prod where awk isn’t gawk, sed isn’t gsed, libc isn’t glibc (okay, alpine with musl has a bit of market for containers). I think the Linux userland is pretty much identical across the distros and tbh I only deploy Ubuntu server when we need Linux vms anymore.


Yeah but for a long time there were many different init systems. There are different packaging systems. There are a huge amount of difference above the very basic tools.

And I didn't say Linux was bad or anything, its just that there are a lot of hands in the pudding, both in the kernel and in the users space.


> how many Linux systems do you have in prod where awk isn’t gawk

All default Ubuntu installs? Maybe also Debian, I’m not sure.


What features are missing from freebsd?


Kern features were integrated in unexpected places. Like, for instance, I could run some command on my Solaris server and create a resource pool of processors and memory; and it was so integrated that this contract could be applied to individual network connections. I could allocate half a processor or some memory to, say, an oracle process for licensing reasons right within the smf, one command. Sure, I can do these things on modern Linux and bsd, and I make my living doing complex things with k8s these days, but it all seems like such a hacked together mess compared to what we had.


Is OpenWindows on SunOS 4 as mentioned in the article the closest one can get to running NeWS, or is there an actual NeWS environment you can convince to run in an emulator? (I searched for this some months ago and didn’t have much success, but then I never saw the physical thing and have little idea of what to look for.)


Sort of.

OpenWindows was supposed to combine x11, SunView and NeWS protocols into one environment but in practice it killed NeWS because there were few applications that targeted it after OpenWindows was releases. I think the document layout program FrameMaker was about the only thing that used NeWS but I could be wrong about that.

The original NeWS environment seems like a holy grail item but it wasn't that impressive in period.


I just remember everything getting much, much slower when all that showed up. Then we got the faster sparcs and it wasn’t as bad. Then I wound up with a job coding in XView, ironically enough. I never did code for Motif. Anyway it’s all fast compared to Electron


The most common use of NeWS was probably the various printers Sun sold in the early to mid 90s that used an sbus raster card and NeWS to generate an image for the laser to put on the drum.


I used the old HotJava browser (in Solaris, not SunOS) to do initial file transfers when I was playing with QEMU, but both operating systems should have a working install of tftp that you can use instead. https://smackeyacky.blogspot.com/2021/10/time-machine-solari...


So many great memories. My first sysadmin job was a dev shop ruled by Sun Sparcstation 5, 10, and 20 pizza boxes. My mentor gifted me a Sun 3 workstation and I spent many hours installing and reinstalling SunOS 4 and later Solaris 2.x. Ahhh. I guess I have a project for next weekend!


This brings back memories. It's simplicity and elegance was awesome. I really view Linux as the ultimate successor to SunOS4 (as opposed to Solaris / SunOS 5).


>This brings back memories. It's simplicity and elegance was awesome. I really view Linux as the ultimate successor to SunOS4 (as opposed to Solaris / SunOS 5).

I take your point, but I'd say that the various BSDs are more the successors to Sunos(1-4) than is GNU/Linux.

Since (and it pissed me off at the time) SunOS5+ (Solaris) has a sysV admin/userland (as does GNU/Linux), whereas the BSDs are much closer to what SunOS 4 and its predecessors (based on various Unix/BSD codebases. IIRC, SunOS 4.4 -- the last version that wasn't "Solaris" was based on BSD4.3[0])

All that said, Solaris had some pretty impressive features that Linux is still catching up with. E.g., Zones[1], ZFS[2], etc.

At the same time, there was much more of the "hacker" dynamic with SunOS4 (and its predecessors) than Solaris. Which has also been the case with GNU/Linux.

The former because before Linux (not to mention 386BSD[3]), Unix OS licenses (let alone the hardware it ran on) were way too expensive for widespread use. As such, it was mostly college students using their Sun Boxen to hack on.

But once there was free (as in libre and --well, mostly-- as in beer) Unix (386BSD) and Unix-like (Linux) available for commodity hardware, many, many more folks could access *nix systems to hack on.

From a technical standpoint the BSDs are the real successors to SunOS, but from a Dev/hacker culture standpoint, Linux is (as you point out) a successor as well.

[0] https://en.wikipedia.org/wiki/Berkeley_Software_Distribution

[1] https://en.wikipedia.org/wiki/Solaris_Containers

[2] https://en.wikipedia.org/wiki/ZFS

[3] https://en.wikipedia.org/wiki/386BSD [4]

[4] As an aside, I'm enormously grateful to Lynne and Bill Jolitz for 386BSD. It was a joy to be able to own and use it on my own hardware back then. Especially since $job at the time was mostly on Sun/SPARC. With an additional shout out to Yggdrasil Linux[5], the first Linux distro I ever installed and enjoyed that a lot too!

[5] https://en.wikipedia.org/wiki/Yggdrasil_Linux/GNU/X


Sun first big mistake was doing the deal with AT&T to do Solaris. Sun should have continued to champion BSD derived software.

This hurt them in a few ways, literally every other player in the ecosystem was unified against Sun/AT&T and where there could have been a lot more cooperation, now there was the opposite.

It also massively hurt them in that Solaris was basically shit for a very long time. Many costumers held on to SunOS 4.x for a very long time. Solaris was not popular but that where all the semantic multiprocessor stuff was done. There were people inside of Sun that even in the early 90s still wanted to switch back to SunOS.

Had Sun simply continued to improve SunOS, added multi-processor stuff there, open-sourced things like NEWS (something literally everybody in the company expect a few lawyers wanted) and continued to distribute their compiler for free, it would have become the standard and preferred Unix. They also should have continued with the i386 series of machines.

They put themselves on the path of incredibly proprietary OS and incredibly proprietary CPU that were very high priced as PC compatibles got cheaper and cheaper and x86 got faster and faster.


Yes, I worked at an early ISP and SunOS was popular for "shell" servers. The users did not want Solaris 2.x, mainly because open source software was tough to compile on it. SunOS 4.x was basically the standard open source target at that point (early to mid 90's.)

Solaris was pretty bad up until the >2.5 days. 2.5.1 and above were pretty solid releases. I ran 2.5.1 and 2.6 on my personal desktop (Sparc 10) for a while.


>and incredibly proprietary CPU

This is the opposite of true. sparcv8 is an IEEE standard. You might have to pay a license fee to Sparc International for certification and logo compliance, but that's it. Sun couldn't and didn't stop you from making them.


That only true for SPARCv8 and the first SPARCv9 was interceded in 1995. The IEEE standard was from 1994.

So practically speaking, Sun did move to proprietary CPUs. First when they interceded SPARC and then again when they switched to SPARCv9.

Granted a few years in between when there was a slight amount of competition but that was over by the mid-90s before x86 ever took off fully.


Please look up what "interceded" means.

Even if v9 isn't an IEEE standard, you can still pay Sparc Intn'l for a license. Try going to intel with a request to make x86 chips.


> Please look up what "interceded" means.

That was an Autocorrect issue ...

One can say that 'incredibly proprietary' was wrong, it was less proprietary then many other CPU at the time. It doesn't really change the analysis. Practically speaking that gave most Sun costumers very few option, and increasingly less as the 90s went on. There were just to many RISC ISAs competing for to little market. Sun tried to play the vertical integration walled garden game and in that game its really, really damn hard to win.


I was introduced to UNIX via Xenix, the system was so expensive at the time that the teacher would bring 486 PC tower into class, that we timeshared in groups of 15 minute slots.

We were supposed to prepare our samples as much as we could in Turbo C 2.0 for MS-DOS. When doing UNIX stuff not available in Turbo C, prepare the code, hopefully the right way.

Then at the university, the system we had on the campus was DG/UX, and Solaris.

They eventually got replaced by Red-Hat Linux around 1997.

During the .com wave until 2005, most of the UNIX stuff I used in production was Solaris, HP-UX and Aix, outside my stay at CERN (which was moving away from Solaris around 2002), GNU/Linux was mostly for private stuff at home.

From all the UNIXes, NeXTSTEP derivates, and Solaris are my favourites, as they are/were more than just yet another UNIX clone (Irix as well, but I only know it from articles and legacy docs).


I miss OpenSolaris! (I know about OpenIndiana)


Apparently Oxide is using a Solaris derivative for their systems, naturally given the founders.


At this point with SmartOS and whatever Oxide is using, its basically a hypervisor OS. That is great because it means a lot of the underlying bits are still getting updated and maintained and you some of it gets up-streamed.



This does bring back memories! I remember installing SunOS 4.x on a real Sparc, back in 1995 or so. I eventually did move to Solaris (2.x, SunOS 5.x kernel) Solaris 2 wasn't really much good until 2.5, IIRC.


Those installation profiles remind me of `archinstall`. Of course, the choices there are more about the fragmented linux userspace than one's vocation.


Nice! Can it run Sunview?


Yes, it comes in bundle with SunOS, since that one part of it it's implemented in the kernel IIRC. I've also been able to run NeWS 1.1 (which was before the X/NeWS merg) inside QEMU, although the keyboard input is not working (and for some reason the patch to add the Sun Type 4 breaks everything).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: