Hacker News new | past | comments | ask | show | jobs | submit login
Time machine: Solaris 2.6 on QEMU (smackeyacky.blogspot.com)
57 points by smackeyacky 3 months ago | hide | past | favorite | 64 comments

My favorite part of Solaris was hidden within initsvc file in /etc .. there you would find this this comment:

  # Run inetd in "standalone" mode (-s flag) so that it doesn't have
  # to submit to the will of SAF.  Why did we ever let them change inetd?
  /usr/sbin/inetd -s
I think of that poor soul who wrote that cynical, almost pleading comment often. Somehow they got it in past the peer review (or at least, the review(s) must have agreed enough to let their dirty laundry air out). Why? What did they change, and who is the "them" !? Will I ever know? And yet, I have a particular soft feeling for the commentator, because I know I've let my innermost thoughts and feelings leak out into my code sometimes. We're only human.

Reminds me of PSD and this comment:

    // At this point, I'd like to take a moment to speak to you about the Adobe PSD format.
    // PSD is not a good format. PSD is not even a bad format. Calling it such would be an
    // insult to other bad formats, such as PCX or JPEG. No, PSD is an abysmal format. Having
    <snip... many more lines>
    // PSD is not my favourite file format.
from https://github.com/kjk/xee/blob/master/XeePhotoshopLoader.m

(I have many GB of scanned photos in this format from a canon scanner)

Reading the comment reminds me of how I feel about the AWS APIs.

This predates Solaris. SAF came from AT&T and was replaced by SMF eventually. This is essentially an ancient systemd-like protest lol

Had a UUCP to BBS networks hub running on a SunOS system via dialin. Custom little mail tosser script that were the fugly result of ignorance and persistence.

Then they switch to a brand new server running Slowlaris. Utter disaster. Even if I had understood my script well enough to port it, the UUCP was not going to work and the one i was relying on was not going to be ported and... boom; those networks were unlinked.

I later heard that they brought the old server back online after a couple months and ran it for several more years for other, similar "the old system just worked and no one has time to port to the new" things. AFAIK it took Solaris another couple versions to really get back the serial hardware support they had under SunOS, and there was some hardware that just went unsupported.

Another person who knows "Slowlaris" - I thought it was maybe just my ex-colleague. Turns out it's in the jargon file!


It's definitely widespread. Having worked with it extensively in the past in a large company selling software to people who were still running Solaris in the early 2010s, I heard it constantly.

The author describes using HTTP and a stub page to copy a file from host to VM. I've found Netcat (nc) to be a better option -- it's widely available and easy to use as a simple pipe. You can combine it with tar to copy directories.

  [guest]$ nc -l -p 1234 > some_file
  [host]$ cat some_file | nc $GUEST_IP 1234

If Netcat isn't installed, many older UNIXes have Perl available to DYI a simple TCP server.

In the limit, some shells (GNU Bash for sure, and I think also Korn shell?) support connecting to a remote TCP endpoint via the /dev/tcp/ special prefix. In this configuration you'd have the host listen and the guest initiate.

Another trick with QEMU is bundling files into a disk image and then mounting them (as a CD-ROM or SCSI). Somewhat more cumbersome, but works even for guests that don't have a working network.

Unfortunately Solaris 2.6 doesn't have netcat installed. I should probably have kept on trying to get NFS working but I got the nostalgia trip bad when I found hotjava and couldn't resist trying to do something useful with it, since it was useless the day it was released.

You could get rsh on the host machine, it's probably available from the package manager. And already there on the guest os. Not the most secure thing, but works.

I did think about rsh and rcp but if NFS doesn't work, likely those bad boys are toast as well. Will fiddle and see what is easiest.

> In the limit, some shells (GNU Bash for sure, and I think also Korn shell?) support connecting to a remote TCP endpoint via the /dev/tcp/ special prefix.

EDIT: I'm wrong; Solaris has a `/dev/tcp` but it doesn't do that (details below courtesy of the person who corrected me)

Original (incorrect) comment:

Forget the shell: I'm 90% sure Solaris implemented that exact feature directly in the operating system, so you should absolutely be able to do this without any additional software, assuming that it was implemented by this version.

What's the syntax to test it? I definitely have a /dev/tcp inside the Solaris VM, is there a way to point it to a particular port?

Some light Googling[1][2] shows that Solaris's /dev/tcp is some sort of pseudo-device for configuring the system's network settings.

For both the Bash and Korn shells, the syntax looks like this:

  $ cat < /dev/tcp/localhost/1234
with traffic being uni-directional. More complex (bi-directional) examples documented at <https://tldp.org/LDP/abs/html/devref1.html#DEVTCP>.

Tested on macOS:

  # in one terminal
  bash$ nc -l 1234

  # in second terminal
  bash$ cat </dev/tcp/localhost/1234

  # lines typed into the 'nc' terminal will be printed to
  # the other.
[1] https://docs.oracle.com/cd/E19857-01/817-1836-10/perfplat.ht...

[2] https://www.ibm.com/docs/en/was-nd/8.5.5?topic=systems-tunin...

The modern incarnations (appending server and port numbers) to /dev/tcp in Solaris doesn't work.

No matter. Very curious as to why ftp doesn't work, I think I have missed something on the Debian side of things to enable old school ftp clients. You can log in, but even setting the system to PASV does nothing. 500 Port Rejected is the error you get.

Solaris also had TFTP and RCP for quick and dirty transfers.

Leaving this comment here for posterity: tftp I had completely forgotten about - it works (I installed the tftpd-hpa package on Debian). This is much easier than trying to transfer stuff with HotJava. FTP is harder, the supplied ftp client for this version of Solaris doesn't support passive mode so you need to configure the network to your QEMU VM as...something. I think at this stage I would like to set up a bridge on my second ethernet card and run all the VM's out of that, which would likely fix everything to do with networking.

Regardless, tftp is perfectly good for bootstrapping Solaris 2.6 into something gnuseable.

Nostalgia is weird. I started my professional career on Solaris machines and spent like 20% of my time for the first few months compiling a GNU ecosystem, Emacs, vim, and replacing Sun window manager with IceWM.

Yep nostalgia is weird. Some of the software from that time just feels weird and constricting (Windows 3.11 or the contemporary Mac operating systems). Solaris doesn't quite feel modern but it sure is a lot closer to modern than Windows 3.11

Also some percentage complaining about yp/nis.

Why bother with compiling when there used to exist a Solaris package repository for most of them?

I admin'ed other machines at the time (DEC Alphas), but the guys who cared for the Sun systems ignored the package repo. I think it was because the packages were out of date. It also could have been because disk space was expensive, and they preferred to keep open source stuff in NFS to save space on the individual workstations.

As I recall, our locally compiled packages were kept in NFS, and there was a giant symlink tree that pointed to the latest version, but left the old version intact for backwards compat. Eg /opt/pkg/bin/gcc pointed to /opt/pkg/gcc-2.95.2/bin/gcc, but used to point to /opt/pkg/gcc-2.95.1

I see, actually I don't recall how much up to date that repository used to be.

Just found it out, after some Google-fu,


Still online, amazing.

1. Not all packages were available. 2. Versions were quite old. 3. I did not have admin at first and when I did I did not want to mess with this 4. The disk where / was mounted was on a smaller side and most of my stuff was on a secondary mounted large disk. 5. Work practice as I was responsible for maintaining the build of our product on several Unix platforms.

Trying to turn Solaris into Linux was a mistake back then. Most of their stuff worked better than the gnu equivalents if you put in the effort to learn it.

At the time of 2.6 that was not the case. Cpio, tar could open archives created on other platforms. bash had readline. awk, sed, find, xargs - handing no ills spaces newlines etc. Dd would let you handle errors. Pretty much every gnu tool was more flexible and allowed you to do things that the sun tools just wouldn't.

This! Readline, bash completion, GNU Screen, reasonably modern C++ supported by a compiler, familiar environment that I used in Linux at home, and ls with colors! No, I knew even back then that SunOS and Solaris are famous for their reliability, admin tooling, and SMP support, but I have never cared about that.

Learning Solaris-specific stuff felt like a waste of time back then already and so it was.

The funny thing about my journey with Linux since the 1990s was that I wanted something to run X-Windows on so I could access the Sparc boxes at work. Here I am in 2021 still using Linux to access a sparc box, although it's just for fun now and sparc is being emulated.

At least in the early 90s, most of the support programs on the commercial unixes were ancient BSD stuff from 10 years previous and just sucked. No command line editing, limited functionality, etc. This is why GNU became so incredibly popular. From the top of my head

- GNU tar did compression in one step with the "z" flag, native tar did not

- gzip compressed produced smaller compressed files than "compress" did, was usually faster, and understood stuff compressed via the vendor compress.

- gdb was much more usable that dbx or adb

- gcc was free, and supported much newer standards than the vendor compiler. And you had a much better shot at compiling stuff you found on the web without tweaking Makefiles to adjust compiler flags.

On the other hand, properly knowing UNIX/POSIX meant being confortable dropping into any random UNIX box at customer site and being able to sort out their problems without any kind of extra tooling.

That is very true if it was the part of yours job description. For me it was not. I was face with a clean slate Solaris maybe twice during that period and each time I just had enough knowledge of BSD stuff, csh, and bare bones vi to bootstrap into the familiar environment (which was kind of fun, sort of like moving into a new home and making it cozy).

My job description was more of the kind "make customers happy". :)

Oh good; at the end of the article the author did discover that CDE is alive and well:) I spent most of the article thinking "yes, you most certainly can do all of this today - Illumos is still around, and CDE runs on modern *nix"

Author here: I really should have checked about the availability of CDE. I I wrote the blog while I was fiddling around with Solaris and the strange way a lot of it came back to me was like dredging an old car out of a swamp. I got so involved in getting a compiler on there and trying out the tools that I forgot about the outside world for a while.

Coming back out of there to a Debian desktop is so much nicer, but boy is it fun to play in that little sandbox again. Sparc workstations were awesome and the emulator is a great way to revisit things.

Oh yeah, archeology is a noble end unto itself:) I just would have felt bad if you didn't discover that most of these old toys can still be found in the modern world

There are a lot of old toys which cannot be find in the modern world. Apollo Domain OS for example. Or DEC OSF/1. Or VMS.

Apollo! We had one of those workstations floating around. It had a unique windowing system, shame its no longer available to play with.

I meant specifically the software from this particular article; Illumos and CDE are active open source projects. I'm painfully aware of all the cool tech we've lost over the years, unfortunately.

> CDE is alive and well

wow. That's a blast from the past. That was the desktop environment on our unix boxes back when I started asic design. I think it was hpux. But CDE...those screenshots immediately took me way back.

I'm going to have to get that installed at work now.

Unless things have changed recently, I'm not sure I'd call it "well"

I tried CDE a year or so ago, and it was badly broken on both multi-monitor and 3840x2160 resolutions.

Well preserved, then:) I admit I don't recall trying multi monitor, and most X11 takes some work to manage hidpi, but under similar screens as it was born on CDE still works, which is far more than I'd say for most nontrivial software of that vintage.

> most X11 takes some work to manage hidpi

The bigger problem was that CDE refused to place/draw windows outside of an area of 1600x1200 or so. That the panel couldn't be moved to the screen edge might have been slightly annoying, but it actively worked against having _any_ window outside of what is a small area on my screen.

Ew, yeah, that's a pain

CDE is alive, well, not so. Some things do not work. But it is slowly getting better.

"At one point, the Adafruit article says you need to "set the scsi options" and shows a cryptic code that pushes a hex number into a file on the disk image of your half-built machine. I skipped that. Not only do I not know what the hex number is or represents, the thing boots fine without that part."

It's cryptic in the Adafruit article, but they are documented. Used to turn on/off support for FAST, WIDE, TAGGING, SYNCHRONOUS, some debugging flags, etc.


Nice find! I might fiddle with it to see if it changes anything. The VM had no trouble booting without that step.

Thanks for the memories! Every time I try and recreate my old Solaris environment from the 90's I discover that I'm missing the Fortran shared library that much of my code was linked with. I saved my Solaris CDs over the years but as you point out, languages were all add-ons. Anyone know where I can find the old Solaris Fortran shared libs?

I did not get it from the article: did he run Solaris x86 or he emulated SPARC under QEMU?

Sorry my bad. Sparc under Qemu. Running the x86 version of Solaris just seemed too boring.

Are there any browsers for Solaris 2.6?

I take pride in striving to live up to the "any browser" dream, but I've yet to test any on that platform.

You could search for an archived mirror of ftp.netscape.com. Like for example https://ftp.nluug.nl/netscape/communicator/english/4.77/unix...

HotJava (and an early version of Java itself) are available in the base system.

I haven't found Netscape on the installation CD yet, still digging through the available options.

HotJava doesn't like SSL/TLS so you can't do much with it other than attach to very, very simple websites that aren't encrypted. Using it as a jury-rigged file downloader works OK though.

I do support HTTP, although currently it has to be HTTP/1.1. It came about around the same time as HotJava, 1997, so the earliest versions may not support 1.1, but I'd guess the later ones do.

If you have an opportunity, the URL is in my profile.

It would be amazing if you found the time to read and write something using that platform.

I'm planning to set up a 1.0-compatible node, if only for Mosaic and IE 2.0.

Not gonna lie, the URL frightens me :-)

Extreme compatibility exercises are not for the squeamish... Many tables and even un-closed <p> tags.

I got as far as the login page. How do I register?

Please use the username and password specified in my profile.

It is less of a login and more of a captcha-like device to keep out agressive crawlers, which have been a problem.

I do plan to improve on it so that it is not so opaque.

Would https://github.com/tenox7/wrp work with it?

Trying it now. Seems a bit slow to be useable with hotjava (hotjava is a complete dog though). Been digging around looking for a binary of Netscape Communicator but no luck so far.

There is also IE5 and Outlook available. It apparently came with a primitive Windows compatibility layer: https://youtu.be/_AoyQeUzbEU

It is supposed to have a couple of emulations on it: Macintosh Application Environment and the WABI thing.

Waaaay back then I don't ever remember getting the MAE working and double clicking the icon just gets you a dead windows with a static watch icon.

WABI I can't even remember where to start looking for that. It should be able to run 16 bit versions of Excel although back then I was sure we had alternatives, Lotus 1-2-3 and maybe something called WingZ which I think came from the mac but was ported to Solaris and was hideously expensive. I might be misremembering that.

Solaris 2.6 came with Netscape Navigator on a CD.

I remember using HotJava.

Time travel back to 1999, when Solaris was my main UNIX.

Yet another toy for my todo list. :)

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