Installation Solaris Sparc 2.6 (SunOS 5.6) on Qemu – Part1 Qemu Installation on x86 and x86-64 architecture

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:

http://brezular.wordpress.com/2012/02/17/installation-solaris-2-6-sparc-on-qemu-part2-solaris-installation/

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.

About these ads

About brezular
"True freedom is an inner thing. It is a state of mind. It is a deliberate exercise of choice. Thus, if we think we are bound by external forces, we are deceiving ourselves. It is our willing acquiescence to these outer demands that imprisons. Free yourself today. Take control of your thoughts."

17 Responses to Installation Solaris Sparc 2.6 (SunOS 5.6) on Qemu – Part1 Qemu Installation on x86 and x86-64 architecture

  1. amir says:

    Excellent

    but , this guide also works for Windows version of qemu ?

    how to patch qemu on windows ?

  2. gov says:

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

    • brezular says:

      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!

  3. Pingback: Installation Solaris 2.6 Sparc on Qemu – Part2 Solaris Installation « Brezular's Technical Blog

  4. atar says:

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

    • brezular says:

      yes, I know but I wasn’t successful with SS-20. Anyway, thanks for your blog, it helped me a lot.

      • atar says:

        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. :)

      • brezular says:

        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

  5. Pingback: Installation Solaris Sparc 2.6 (SunOS 5.6) on Qemu – Part3 iou2net.pl Installation « Brezular's Technical Blog

  6. r2d2 says:

    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

  7. Pingback: 折腾Qemu版IOU的相关资源下载 | Xrong

  8. Imran says:

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

    • brezular says:

      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?

  9. suale says:

    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

  10. Pingback: Installing Olive 12.1R1.9 under Qemu « Brezular's Technical Blog

  11. Pingback: GNS3 on Fedora « Brezular's Technical Blog

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Follow

Get every new post delivered to your Inbox.

Join 61 other followers

%d bloggers like this: