Revisiting a Solaris on Qemu install

Since I had written about it the last time, quite a bit of the emulation on Qemu has improved significantly since then.  As always you’ll need to create and prepare a disk image, and I’m using an old SUN Station 5 PROM.

qemu-system-sparc -L . -m 64 -M SS-5 -bios ss5.bin -drive file=36G.disk,bus=0,unit=0,media=disk -drive file=solaris_2.6_598_sparc.iso,bus=0,unit=6,media=cdrom -startdate “1999-04-19”

One nice thing is that now you can boot off the CD-ROM.  And you can boot Solaris 2.6 directly into single user mode to format and label the disk.  It’s very convenient.  All you need here is

boot cdrom:d

And from there you can either kick off the disk partitioning, or the installer will boot up.

Booting from Prom to CD-ROM

And now to the graphical welcome screen!


And then off to the ‘graphical’ installer.  Yes, it’s not that graphical at all.  Like before, it’s important that you don’t let it reboot on completion, you have to make changes to the system so it’ll boot up correctly, and make changes to the network config.  At least in graphical mode vi works.


It is absolutely critical that you make this change or the disk will not boot at all.

cd /a/etc
# cat >> system
set scsi_options=0x58

For networking:

And you will want a default route…

# cat > defaultrouter

Then in the file /etc/nsswitch.conf change the following:

hosts: files


hosts: files dns

Then to ‘fix’ up your /etc/resolv.conf

# cat > resolv.conf

And then I like to add the following hosts to speed up telnet…

# cat >> hosts qemunat qemudns

And then hit Control+D and it’ll reboot back to the PROM.  Now all you have to type in the PROM monitor is:

boot disk0:

And in a minute you’ll be at the login screen.

Login Window

I went ahead with CDE, and over on the old SimCity for UNIX versions are over there.  One nice thing about being able to use CD-ROM’s is that Qemu can finally auto-mount the disk images.  It’s great.


There is no license for SimCity, and after 5 minutes the city goes into a ‘meltdown’ mode.  It’s a shame that back in the day the upstart x86 Linux was largely ignored by the UNIX market.  But Qemu has come quite a bit where you can run some of this proprietary VAR software.

16 thoughts on “Revisiting a Solaris on Qemu install

  1. Yes, I can confirm there’s still plenty of QEMU SPARC development going on 😉

    You should find with the latest QEMU release (2.10) that the -startdate parameter is no longer required, and also that the included OpenBIOS PROM can now boot Solaris fine on the QEMU SS-5 machine if you don’t want to have to manually type the boot command each time.

    Also I’ve rewritten the sun4m IOMMU/DMA code for the upcoming 2.11 release to use the proper QEMU APIs (instead of the legacy “manual” implementations) and I’ve had reports that this improves disk performance by ~20%.

    • Thank you for your work on the DMA code! Any chance you or anyone else will be finishing up sun4u so it can boot 64-bit Solaris versions? Or another alternative: adding QEMU PCI support to the niagara architecture so it can emulate a network card?

      • The main outstanding issue for sun4u preventing Solaris from running is to implement the sun4u MMU IE (invert endian) bit which is used to configure PCI MMIO devices (it’s also used in OpenBSD which is much easier to test with).

        I had an outline from one of the TCG developers as to how to make this work, however I ran into issues with recursive calls into the memory API causing the byte-swaps to be incorrect, so it will need some more thought.

        On the plus side you should find with a recent QEMU that all of NetBSD, OpenBSD, FreeBSD and Linux will boot fine in -nographic mode so I feel that 64-bit Solaris is getting closer…

  2. awesome to hear! I’ve always loved the SPARC more in emulation than in real life for some reason… I was using the SUN Prom as I wanted that look & feel of the old machine, no real reason beyond that, you are right, as I know there was so much work in OpenBIOS to get it to the point where it too can load Solaris.

    Faster disk is always a good thing… especially in emulation.

    Have you tried to install NeXTSTEP?

    • Yes I did, which was the reason I reworked the sun4m IOMMU/DMA code as I thought it might be a DMA coherency issue, but I’m fairly sure it’s not now.

      FWIW you can boot/install NeXTSTEP on Linux if you run QEMU like: taskset –cpu-list=1 qemu-system-sparc …. which restricts QEMU only to use a single CPU – not sure if there’s an equivalent utility for Windows?

      The only remaining differences I can see between the normal/CPU restricted modes are differences in the async ESP IO requests and timers, so still some more digging to do I’m afraid!

  3. I just found a 5.25 set of PC-NFS 3.0 disks and spent most of this evening archiving them. Maybe I can set up a virtual NFS client if I can figure out if there are any supported NICs in there.

Leave a Reply

Your email address will not be published. Required fields are marked *