Running Solaris 5.9 (sparc) on qemu-system-sparc in Linux x86_64 (Mint 19)

This is going to be a straight forward continuation of the last Solaris article about qemu-system-sparc emulation (32bit SPARC) which I have covered here 

Good source of information is Artyom Tarasenko’s blog entry about Solaris SPARC and qemu

We are going to continue with the Solaris 5.9  or better known as Solaris 9 for SPARC architecture emulation on x86_64 Linux and qemu-system-sparc

I will describe how I got the system to install using the previous Solaris 5.6 installed disk images, in order to save time creating the disk partitions from scratch (which was a bit of a challenge with 5.6)

My version of Qemu is as follows

$ qemu-system-sparc --version
QEMU emulator version 3.0.91 (v3.1.0-rc1-16-g83c496599c-dirty)
Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers

What we will obviously need is the Solaris 9 SPARC installation ISO media.  Here you can get the Solaris 9 9/05 DVD ISO -> (Thanks Ron for hosting it)   or you can get individual pieces from there and create your own ISO from them here

My QEMU 32bit SPARC environment looks like this  and I will explain exact steps that I took to install it

-rw-r--r--  1 user user 2386624512 Jan 27 01:25 disk2.6.img
-rw-r--r--  1 root root 1261174784 Sep 25 00:15 disk2.7.img
-rw-r--r--  1 user user 3733192704 Feb 23 01:42 disk2.9.img
-rwxr-xr-x  1 user user        195 Sep 24 21:40
-rwxr-xr-x  1 root root        195 Sep 24 22:30
-rwxr-xr-x  1 root root        134 Feb 23 01:07
-rwxr-xr-x  1 user user        134 Feb 23 01:07
-rw-r--r--  1 user user  565862400 Feb 21  2010 solaris-2.6-sparc.iso
-rw-r--r--  1 root root  647471104 Feb 21  2010 solaris-2.7-sparc.iso
-rw-r--r--  1 root root 3104112640 Feb 22 23:26 solaris-2.9-sparc.iso
-rw-rw-r--  1 user user     262144 Sep 19 21:24 ss5.bin

Next we will configure the networking and the /etc/qemu-ifup script.  Networking script can be saved in the emulation directory and needs to be executed with root privileges prior running qemu (you should adjust to your needs here -> enp0s25 is eth0 and wlp9s0 is wlan0 )  lets call this

#Setup tap and bridge 
tunctl -t tap0 -u user
ifconfig tap0 up
brctl addbr br0
brctl addif br0 enp0s25 vboxnet0 
brctl setfd br0 0
ifconfig enp0s25 up 
ifconfig br0 netmask broadcast up
brctl addif br0 tap0 vboxnet0 
ifconfig tap0
sysctl net.ipv4.ip_forward=1
iptables -A FORWARD --in-interface enp0s25 -j ACCEPT
iptables --table nat -A POSTROUTING --out-interface wlp9s0 -j MASQUERADE

Here is my slightly modified /etc/qemu-ifup script

#! /bin/sh
# Script to bring a network (tap) device for qemu up.
# The idea is to add the tap device to the same bridge
# as we have default routing to.

# in order to be able to find brctl
ip=$(which ip)

if [ -n "$ip" ]; then
ip link set "$1" up
brctl=$(which brctl)
if [ ! "$ip" -o ! "$brctl" ]; then
echo "W: $0: not doing any bridge processing: neither ip nor brctl utility not found" >&2
exit 0
ifconfig "$1" up

switch=$(ip route ls |
awk '/^default / {
for(i=0;i<NF;i++) { if ($i == "dev") { print $(i+1); next; } }


# only add the interface to default-route bridge if we
# have such interface (with default route) and if that
# interface is actually a bridge.
# It is possible to have several default routes too
for br in $switch; do
if [ -d /sys/class/net/$br/bridge/. ]; then
if [ -n "$ip" ]; then
ip link set "$1" master "$br"
brctl addif $br "$1"
exit # exit with status of the previous command

echo "W: $0: no bridge for guest interface found" >&2

I usually setup the internal network in emulated Solaris as follows then:

  • interface:
  • gateway :
  • nameserver:


The script is as follows

qemu-system-sparc -L . -m 256 -M SS-5  -hda ./disk2.9.img -cdrom ./solaris-2.9-sparc.iso -net nic -net tap  -boot d  -display vnc=:1

Use your VNC client to connect to :1 to interact with the emulation then

The disk2.9.img is a QCOW2 image from the previous Solaris 2.6 installation which we can use (please follow the to create one or start from scratch…

# qemu-img info disk2.9.img
image: disk2.9.img
file format: qcow2
virtual size: 36G (38654705664 bytes)
disk size: 3.5G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

We are not using the ss5.bin firmware file anymore, since qemu-system-sparc can handle Solaris 9 SPARC quite well without it, for GUI we will use qemu inbuilt VNC

The installation is again straight forward (do not upgrade the system from 5.6 to 5.9 but rather initialize the disk during setup and use default options)

Once we get this installed (takes some time, be patient) we can use the following script to boot the system from disk  – Use your VNC client to connect to :1

qemu-system-sparc -L . -m 256 -M SS-5 -hda ./disk2.9.img -cdrom ./solaris-2.9-sparc.iso -net nic -net tap -boot c -display vnc=:1

So now we should have a fully working latest Solaris 9 9/05 which can be reachable via for example with ssh or telnet or ftp … and operated via VNC :1

A default installation of Solaris 9 of course leaves many “unsecure” and obsolete daemons exposed, so just for the heck of it here is an Nmap scan

Solaris9 is way much better to work with than any other Unix systems I came across :)

Also do not forget to configure your DNS resolver as follows (Google and Cloudflare DNS)

# echo "nameserver \nnameserver" > > /etc/resolv.conf

# vi /etc/nsswitch.conf
hosts: files dns

# pkill -HUP inet

Here is a short video of the actual emulation


About astr0baby

Please run Adblock or similar... we have been told to do so since Carl Sagan wrote the Contact .
This entry was posted in Uncategorized. Bookmark the permalink.

28 Responses to Running Solaris 5.9 (sparc) on qemu-system-sparc in Linux x86_64 (Mint 19)

  1. Ron Economos says:

    Download link for the Solaris 9 9/05 DVD ISO has expired (for free download).

  2. Ron Economos says:

    Thanks. Here’s the link.

    BTW, I want to thank you for these QEMU tutorials. I’ve been able to run some ancient but extremely useful SPARC code that I’ve been thinking about for years.

  3. Josh Williams says:

    Hi! Me again. Would there by any chance be a way to get that solaris 2.7 iso off you? I would be hugely appreciative!

    P.S. I gave up on the networking (too complicated for poor old me) and decided to use a share drive instead. Thanks for your help!

      • Josh Williams says:

        Thank you! I assume it follows the installation process for 2.6/2.9 pretty similarly? I’ll give it a try later today.

        Also, from your name I assume you’re into/employed in some sort of astronomical field? The reason I’ve been trying to hard to get a solaris SPARC install is because I have some data from an old satellite mission for which the data and processing program were both encoded and compiled by SPARC. Just FYI! :)

      • astr0baby says:

        Yes, its pretty much the same – hint you can use the Solaris 2.6 disk image to skip the partition creation ;) it will save you tons of time.
        I love astronomy and it has been my lifetime interest, although Im not employed in this field – thus my nickname.

  4. William C says:

    How do you take the zip files and combine them as a single iso? Do you just unzip them and add them all do a single mkisofs command?

    • astr0baby says:

      1. Mount each cd in turn. If you just have the iso image you can mount it as a loopback filesystem:

      mount -o loop -t iso9660 /mnt/tmp

      2. Copy all of the files to your hard drive.
      3. Use mkisofs to create a new ISO image

      mkisofs -o dvd_iso_image.iso /path/to/files

      • William C says:

        Got you. Thanks! I just finished following your 2.6 setup on my MacbookPro. Very handy. Thanks so much!

      • astr0baby says:

        Use the 2.6 disk image for the 2.9 setup, it will save you tons of time preparing the environment

      • William C says:

        When you say “use the disk image” do you mean to just use a copy of the qcow as your starting point and install over the top of it? I’m a little confused :)

      • astr0baby says:

        Yes, just copy the disk image you created for 2.6 and use that for 2.9 setup

      • William C says:

        So I noticed that I must have used a different tutorial (not as thorough as yours) for creating the Solaris 2.6 qcow. I may have to go back and follow your steps now since yours actually sets up the internal network tunnels :)

        Thanks so much for your help!

      • William C says:

        Thanks for your help, but after this I get an error saying the image is not bootable. Any suggestions?

        Trying cdrom…
        Not a bootable ELF image

      • astr0baby says:

        I have created it a while ago and asked W6RZ to host it @ so compare the contents and check what you are missing .. I cannot remember how exactly I merged the ISOs .. but I believe I have just copied the contents and appended the other ISOs to the first CD directory …

  5. William C says:

    Don’t we want the qemu-system-sparc64 for solaris 8/9 ?

  6. Rocktor says:

    what about solaris 10 on 64 bit it can be possible ?

  7. Andre says:

    Thanks for the writeup. Very informative and able to run Solaris 9 SPARC under qemu32. A question if you don’t mind. Have you done Solaris 10 32bit on it? Thanks in advance!

  8. Andre says:

    Researching more, 2 punch problem running solaris 10 in qemu:
    1. Solaris 10 is purely 64bit kernel, it does support 32 apps via libraries.
    2. Solaris 10 sun4m(best supported architecture) is deprecated.

    I’ll stick with Solaris 9 32bit then. Thanks again.

  9. DD75 says:

    Hello, Are there any Solaris Sparc version which I can use with Qemu to have more RAM say 2 to 4 GB. I want to install Oracle 8 or 9i or 10g on the emulated Sparc machine and run some legacy c++ binaries which uses the database. Is it at all possible? I have followed your articles on Windows and unable to bring up the environment with higher Ram say 2G. Any help is much appreciated.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.