Build Your Own SPARC With QEMU and Solaris
Build Your Own SPARC With QEMU and Solaris
https://learn.adafruit.com/build-your-own-sparc-with-qemu-and-solaris
Overview 3
Set up QEMU 5
Install Solaris 7
User Setup 13
Back in the late 80s and through the 90s, Unix workstations were super powerful,
super cool, and super expensive. If you were making 3D graphics or developing
applications, you wanted a high-performance workstation and Sun made some of the
best ones. But unless you worked for a huge company, university, or government,
they were probably too expensive.
More than twenty years later, we have much more powerful and affordable
computers, so let's emulate the old systems and see what it was like to run some of
the coolest computers you could buy in the 90s.
The first version of Solaris was actually Solaris 2, and to try and make sense they
went back and named SunOS Solaris 1, but in the operating system it still refers to
itself as SunOS. So Solaris 1 is SunOS 4, and Solaris 2 is SunOS 5, and Solaris 2.6 that
we'll run is SunOS 5.6. Confused yet?
Ignore the naming conventions and just know that we'll run Solaris 2.6 from 1997. For
comparison, at that time a PC would be running Windows 95 and Apple released Mac
OS 8 the same year.
You'll need:
• The latest version of QEMU, for this guide version 3.1.0 worked well.
• A system to run it on - Windows, Linux, or Mac
• Solaris 2.6 ISO
• For added fun, a Sun Type 5 keyboard converted to USB with Drakware's
Sun2USB or DIY with the SPARC keyboard specification and a small Arduino like
the Trinket M0
Rather than using a virtual machine to run the x86 version of Solaris, we'll use QEMU
to emulate the actual SPARC hardware used by Sun machines back in the 90s. SPARC
stands for Scalable Processor Architecture and is a RISC (reduced instruction set
computing) design.
For Windows, you can download the latest binary from the QEMU site (). I used the
20190218 build.
If you're running Linux, your distribution might have an older version of QEMU so
you'll need to get the source and compile it. That goes a bit beyond this guide so take
a look at the download page () for more info.
Disks in Solaris need to be labelled before they can be used, so we can't install just
yet. First we need to boot into Solaris to format and label the disk we just made.
Once you run that, the OpenBIOS ROM should start first and bring you to a prompt,
type:
The system should boot into single user mode and bring you to a root prompt (#).
First we run a few commands to prep the system, then we'll format the disk.
# drvconfig
# disks
# format
Solaris only knows about a few specific disk types, so we need to specify our own
geometry.
format> label
Ready to label disk, continue? y
All set. Now type q to quit the format utility and type reboot to restart the system. It's
time to install!
Install Solaris
The reboot should take you back to OpenBIOS. Boot from the CD again but this time
into the installer:
boot cdrom:d
When you reach the networking options, pick a hostname and check Yes for
Networked. Use 10.0.2.15 for the IP address, QEMU has its own internal network.
Part of a subnet: No
Choose how much you want to install. End User is enough to run it, Developer will let
you build things, and Entire Distribution will just install everything. If you really want
to, you can Customize the installation but it's easy to break things so it's best to stick
with the available software groups.
When it asks about preserving data you can click continue. Click Auto Layout and con
tinue, the defaults are fine. Click continue on the remote file systems page.
Now you can review the last few options. If it looks good click Begin Installation.
Make sure you choose Manual Reboot when prompted - we need to change some
settings or else it won't boot.
# cd /a/etc
# cat >> system
set scsi_options=0x58
^D
#
Next we need some network settings. Let's add a default router, the address that
QEMU uses is 10.0.2.2.
Next we tell it what nameserver to use by adding a line to the resolv.conf file.
All set! Time to reboot, just type reboot and hit enter.
The root account has full access to everything, so it's a very good idea to set a
password. It's also a good idea to set up a normal user account. We'll do that next.
Here's the login screen, go ahead and log in as root with the password you just set.
Once you push enter or click OK, it will ask which desktop environment you'd like. CD
E is the default and a good choice, OpenWindows is the older environment.
A bunch of windows will open, you can close them all or take a look if you like. The H
elp Viewer will give you an introduction to the CDE desktop.
The panel on the bottom has everything you need, each icon will launch something or
the arrow on top will expand a tray with more things to run. We want to create a new
user, so open up Applications, go to System_Admin, then run Admintool.
You'll get all the windows opening again, plus one that wants you to register. You can
just click Never Register.
When you want to shut down, click Exit again, then go to Options and Command Line
Login. Press enter to get a console login prompt, login as root, then type shutdown
now. After that you can quit QEMU.
Next time you start you can leave out the CD part: