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!

Welcome

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.

installation

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
^D

For networking:

And you will want a default route…

# cat > defaultrouter
10.0.2.2
^D

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

hosts: files

to

hosts: files dns

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

# cat > resolv.conf
nameserver 10.0.2.3
#

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

# cat >> hosts
10.0.2.2 qemunat
10.0.2.3 qemudns
^D

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 archive.org 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.

Meltdown

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.

Author: neozeed

I live in SE Asia, doing generic work, enjoying my life & family

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%.

    1. 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?

      1. 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…

        1. Do you have some kind of status blog or something to point to for exciting updates like this? the Qemu master site has always been… lacking in the behind the scenes ongoings and the day to day mailing list is…well drinking from a firehose.

            1. I guess I hadn’t checked it often enough, I just remember it being more sparse. My mistake!

              Thanks for all your hard work!

  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?

    1. 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.

    1. I’ve only used the ‘ftp software’ client back in the day, and after that, the WATTCP package which was the basis for getting Quake/QuakeWorld/QuakeII on MS-DOS.

      IS there a SDK in there?

Leave a Reply

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

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