Installation Solaris Sparc 2.6 (SunOS 5.6) on Qemu – Part1 Qemu Installation on x86 and x86-64 architecture
February 12, 2012 17 Comments
Introduction
The goal of this article is to describe patching, configuration, compilation and installation Qemu 0.14.1 1.x in order to emulate x86 and Sparc architecture. I choose Qemu version 0.14.1 as it has been the highest version with written patch for UDP tunnels and multicast and it is known to work with GNS3. As you know GNS3 uses UDP tunnels to connect Qemu instances each other. Thanks to one of GNS3 developers – Benjamin Marsili, patches for UDP tunnels and multicast are officially included in Qemu version 1.1 and above. No need to patch Qemu anymore.
The tutorial also shows configuration, compilation and installation Qemu 1.x for sparc-32 architecture. Be aware that installation of Solaris 2.6 hangs up shortly during boot from installation CD when Sparc SS-20 is emulated by Qemu 0.14.1. For this reason I recommend to use Qemu 0.15.x and higher for Sparc emulation when no such a problem occurs.
Unfortunately I managed to install Solaris on Sparc SS-5 only which allows to use maximum 256 MB RAM. To avoid this limit, it is better to use the latest Qemu version 1.x for SS-20 emulation. Unlike SS-5, SS-20 can be started with 512MB RAM. If you need to use more than 512MB RAM, the only way is to make SWAP partition bigger during Solaris installation. I would recommend 4GB SWAP partition in order to run complex network topology with multiple IOU instances.
The tutorial describing Solaris 2.6 Sparc installation is here:
As the newer IOU images available on the Internet are compiled for Solaris platform, Sparc SS-20 emulated by Qemu is perfect environment for testing those images without need to buy real Sparc machine.
1. Requirements
- Host System - x86-64, Linux Fedora 17
- Guest system - Solaris 2.6 (sunOS 5.6) Sparc
- Emulator - Qemu 1.2.0
- BIOS - proprietary Sparc BIOS for Solaris
2. Installation Qemu 1.x for x86 and sparc support
It is very likely that your Linux OS already has Qemu 1.x installed from repository. In this case, you do not need to build Qemu 1.x for the guest x86 architecture. Just omit parameter i386-softmmu and and use only parameter sparc-softmmu during Qemu configuration for step 2b). It builds Qemu binary for sparc support and preserve existing Qemu binary for x86 guest architecture.
Check your Qemu x86 version with command:
/usr/bin/qemu-system-i386 --version
QEMU emulator version 1.1.0, Copyright (c) 2003-2008 Fabrice Bellard
2a) Install required Fedora packages for Qemu compilation
sudo yum install ncurses-libs ncurses-devel zlib-devel SDL-devel libpcap-devel glib2-devel
2b) Download and extract Qemu sources
wget http://wiki.qemu-project.org/download/qemu-1.2.0.tar.bz2
tar jxvf qemu-1.2.0.tar.bz
cd qemu-1.2.0
./configure --target-list=i386-softmmu,sparc-softmmu
make
sudo make install
Qemu binary for the guest x86 architecture is /usr/local/bin/qemu-system-i386. Check the version with command:
/usr/local/bin/qemu-system-i386 --version
QEMU emulator version 1.2.0, Copyright (c) 2003-2008 Fabrice Bellard
Qemu sparc binary is /usr/local/bin/qemu-system-sparc.
/usr/local/bin/qemu-system-sparc --version
QEMU emulator version 1.2.0, Copyright (c) 2003-2008 Fabrice Bellard
3. BIOS
The last step consists from copying particular BIOS to /usr/local/share/qemu/ directory.
3a) BIOS for Sparc machine
As it is shown in this How-To, default BIOS - openbios-sparc32 – distributed with Qemu is not working well for Solaris.
http://tyom.blogspot.com/2009/12/solaris-under-qemu-how-to.html
We have to use the proprietary BIOS rom that you can download from here:
http://home.earthlink.net/~reif/
or alternatively from here:
http://www.4shared.com/file/6gJgTCQ6/ss10_v2.html
http://www.4shared.com/file/3DAMJAcy/ss10_v2_2.html
http://www.4shared.com/file/axFQXBJR/ss5-170.html
http://www.4shared.com/file/IglwTwUA/ss5.html
http://www.4shared.com/file/-7TR5cCC/ss10-20_v225r.html
http://www.4shared.com/file/05hZGv8d/ss20_v2.html
Qemu can emulate several types of Sparc machines (SS-5, SS-10 etc.) For each Sparc machine you have to use particular BIOS. Following command download particular BIOS to /usr/local/share/qemu directory
sudo wget http://home.earthlink.net/~reif/ss20_v2.25_rom -P /usr/local/share/qemu/
sudo wget http://home.earthlink.net/~reif/ss10_v2.25_rom -P /usr/local/share/qemu/
sudo wget http://home.earthlink.net/~reif/ss5-170.bin -P /usr/local/share/qemu/
3b) BIOS for JunOS
This step is only needed if you run Olive – JunOS installed on the top of FreeBSD. Qemu version above 0.12.0 contains a bug in SeaBIOS which causes JunOS hangs up during boot. Simple workaround is described here:
Here is a download link with working BIOS I compiled by myself.
http://www.4shared.com/file/BJw1Ik2x/bios.html
sudo cp /home/brezular/Download/bios.bin /usr/local/share/qemu/
According to my findings, actual BIOS in Qemu 1.1 and above appears not to have this bug so you can omit this step.

Excellent
but , this guide also works for Windows version of qemu ?
how to patch qemu on windows ?
Hi,
I’ve never compiled Qemu on Windows. Here is something you can use:
http://blog.gns3.net/2009/10/olive-juniper/2/
have you tried the iou2net.pl script in sparc qemu? im trying to atleast use the ‘much improved’ switching feature in “new” iou, use 4 switches, then interface it in gns3 maybe via udp and use the routers there. bunch of missing libraries and net modules in perl..
So far I haven’t tried it but it is on my TODO list ;-) Sure, that’s not easy job to get iou2net.pl ruuning on 2.6. If I have any update I’ll post it as How-to. Good luck!
Pingback: Installation Solaris 2.6 Sparc on Qemu – Part2 Solaris Installation « Brezular's Technical Blog
>Unfortunately I managed to install Solaris into SS-5 only so we are restricted to maximum 256 MB RAM
SS-20 should be no problem either. Then you would have 512 MiB.
yes, I know but I wasn’t successful with SS-20. Anyway, thanks for your blog, it helped me a lot.
I guess mostly not for the blog, but rather for the actual contributions to qemu which made it possible ;-) .
Does SS-20 fail early or late? Using SS-20 is a bit more tricky than SS-5, because you would need to switch off scanning for missing devices and do a reset before booting the OS. Are 256 MiB too few for your use case?
For my use case it even was too much, so, I had to implement booting with 32 MiB, afair. The SunOS 4.something didn’t like too much memory. :)
Yes, I did it before booting.
ok setenv sbus-probe-list f
ok reset
I tried to boot in both single and multi user mode but the display freezes here:
ok boot disk2:d -vs
Boot device: /iommu/sbus/espdma@f,400000/esp@f,800000/sd@2,0:d File and args: -vs
Size: 243560+176918+41926 Bytes
SunOS Release 5.6 Version Generic_105181-05 [UNIX(R) System V Release 4.0]
Copyright (c) 1983-1997, Sun Microsystems, Inc.
Using default device instance data
Pingback: Installation Solaris Sparc 2.6 (SunOS 5.6) on Qemu – Part3 iou2net.pl Installation « Brezular's Technical Blog
im doing some test with netbsd and -m 2048 of memory but i need some library’s from solaris to continue pls if you can share those lib`s i will apreciate.
SUNWcsu
usr/lib/ld.so.1
SUNWcsl
usr/lib/libdl.so.1
usr/lib/libnsl.so.1
usr/lib/libc.so.1
usr/lib/libmp.so.2
usr/lib/libsocket.so.1
Pingback: 折腾Qemu版IOU的相关资源下载 | Xrong
I am following the steps described in the document, but i am getting the following error.. while Patch Qemu source for UDP tunnels and multicast
[imran@localhost qemu-0.14.1]$ cp /home/imran/Downloads/0018-qemu-0.14.1-mcast-udp.patch /home/imran/Downloads/GNS3-files/Qemu/qemu-0.14.1
cp: cannot create regular file `/home/imran/Downloads/GNS3-files/Qemu/qemu-0.14.1′: No such file or directory
[imran@localhost qemu-0.14.1]$
[imran@localhost qemu-0.14.1]$ patch -p1 -i 0018-qemu-0.14.1-mcast-udp.patch
bash: patch: command not found…
Install package ‘patch’ to provide command ‘patch’? [N/y]
* Waiting in queue..
* Running..
* Resolving dependencies..
* Waiting for authentication..
* Running..
* Resolving dependencies..
* Downloading packages..
* Testing changes..
* Installing packages..
* Scanning applications..
patch: **** Can’t open patch file 0018-qemu-0.14.1-mcast-udp.patch : No such file or directory
Brezular help me on this..
It seems that you are trying to copy patch to non-existing directory.
Are you sure that all directories in path /home/imran/Downloads/GNS3-files/Qemu/qemu-0.14.1 exist?
am new to Linux world, am trying to configure the operating system and it it asking for Solaris loin and password.Berezul help me out
Pingback: Installing Olive 12.1R1.9 under Qemu « Brezular's Technical Blog
Pingback: GNS3 on Fedora « Brezular's Technical Blog