Installation Solaris 2.6 Sparc on Qemu – Part2 Solaris Installation
February 17, 2012 51 Comments
Introduction
In the previous tutorial we showed the exact steps needed for configuring, compiling and installing Qemu for Sparc32 support on Fedora Linux.
The goal of this article is to describe detailed steps of installation Solaris 2.6 Sparc (SunOS 5.6) into Qemu image. The Qemu image may be used for quick testing of Cisco IOU binary images compiled for Sparc platform.
Unfortunately I managed to install Solaris into SS-5 only so we are restricted to maximum 256 MB RAM. As you can imagine this RAM size is not convenient for running complex topology with multiple IOU instances. After reinstallation qemu-system-sparc to version 0.1.50 a problem has gone.
Assuming we have patched Qemu binary compiled for Sparc support and installed in /usr/local/ directory we can go ahead with Solaris installation.
1. Before Install Steps
Download Solaris Install CD, create Qemu Hardisk and start installation.
a) Prepare Solaris 2.6 Installation CD
Try to find torrent file or use Oracle download page.
b) Create Qemu Hard Disk
$ /usr/local/bin/qemu-img create -f qcow2 36G.disk 36G
c) Start OS Installation
$ /usr/local/bin/qemu-system-sparc -bios /usr/local/share/qemu/ss20_v2.25_rom -M SS-20 -nographic -boot d -hda ./36G.disk -m 512 -cdrom ./2.6/Solaris_2.6_Software_05_98.img -serial telnet:0.0.0.0:3000,server -smp 2,cores=4 -cpu "TI SuperSparc 60"
QEMU waiting for connection on: telnet:0.0.0.0:3000,server
Explanation
- M SS-20 - type of Solaris VM
- boot d - boot from CDROM
- m 512 – 512 MB RAM
- serial telnet:0.0.0.0:3000,server – redirect output of serial port to the telnet server
d) Telnet to localhost
After successful telnet to localhost you can see boot of Solaris. Boot stops on “Can’t open boot device” message. Enter following commands:
ok setenv sbus-probe-list f
sbus-probe-list = f
ok reset
System will be restarted. Continue and boot from Install CD with command boot disk2:d -v.
$ telnet localhost 3000
Trying ::1…
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
Available Memory 0×20000000
Allocating SRMMU Context Table
Context Table allocated, Available Memory 0x1ffc0000
Setting SRMMU Context Register
Context Table allocated, Available Memory 0x1ffc0000
Setting SRMMU Context Table Pointer Register
RAMsize allocated, Available Memory 0x1ffb0000
Allocating SRMMU Level 1 Table
Level 1 Table allocated, Available Memory 0x1ffafc00
Mapping RAM @ 0xffef0000
RAM mapped, Available Memory 0x1ffafa00
Mapping ROM @ 0xffd00000
ROM mapped, Available Memory 0x1ffaf800
Mapping ROM @ 0×00000000
ROM mapped, Available Memory 0x1ffaf000
ttya initialized
Cpu #0 TI,TMS390Z50
Cpu #1 Nothing there
Cpu #2 Nothing there
Cpu #3 Nothing there
Probing Memory Bank #0 64 Megabytes of DRAM
Probing Memory Bank #1 64 Megabytes of DRAM
Probing Memory Bank #2 64 Megabytes of DRAM
Probing Memory Bank #3 64 Megabytes of DRAM
Probing Memory Bank #4 64 Megabytes of DRAM
Probing Memory Bank #5 64 Megabytes of DRAM
Probing Memory Bank #6 64 Megabytes of DRAM
Probing Memory Bank #7 64 Megabytes of DRAM
Probing /iommu@f,e0000000/sbus@f,e0001000 at f,0 espdma esp sd st ledma le SUNW,bpp
screen not found.
Can’t open input device.
Keyboard not present. Using tty for input and output.
Cpu #0 TI,TMS390Z50
Cpu #1 Nothing there
Cpu #2 Nothing there
Cpu #3 Nothing there
Probing Memory Bank #0 64 Megabytes of DRAM
Probing Memory Bank #1 64 Megabytes of DRAM
Probing Memory Bank #2 64 Megabytes of DRAM
Probing Memory Bank #3 64 Megabytes of DRAM
Probing Memory Bank #4 64 Megabytes of DRAM
Probing Memory Bank #5 64 Megabytes of DRAM
Probing Memory Bank #6 64 Megabytes of DRAM
Probing Memory Bank #7 64 Megabytes of DRAM
Probing /iommu@f,e0000000/sbus@f,e0001000 at f,0 espdma esp sd st ledma le SUNW,bpp
SPARCstation 20 (1 X 390Z50), No Keyboard
ROM Rev. 2.25, 512 MB memory installed, Serial #0.
Ethernet address 52:54:0:12:34:56, Host ID: 72000000.
Boot device: /iommu/sbus/ledma@f,400010/le@f,c00000 File and args:
Internal loopback test — Wrong packet length; expected 36, observed 64
Can’t open boot device
Type help for more information
ok boot disk2:d
Boot device: /iommu/sbus/espdma@f,400000/esp@f,800000/sd@2,0:d File and args:
SunOS Release 5.6 Version Generic_105181-05 [UNIX(R) System V Release 4.0]
Copyright (c) 1983-1997, Sun Microsystems, Inc.
WARNING: /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@0,0 (sd0):
corrupt label – wrong magic number
Configuring devices…
fdintr: nobody sleeping (c0 0 0)
The system is coming up. Please wait.
2. Solaris Installation
We will go through several Menus.
a) Language Menu
Select a Language
0) English
1) German
2) Spanish
3) French
4) Italian
5) Swedish
Press 0
b) Locale Menu
Select a Locale
0) USA – English (ASCII only) 12) Lithuania
1) Czech Republic 13) Latvia
2) Denmark 14) Netherlands
3) Greece 15) Netherlands/Belgium
4) Australia – English (ISO-8859-1) 16) Norway
5) Canada – English (ISO-8859-1) 17) Poland
6) Ireland – English ( 8 bit ) 18) Portugal
7) New Zealand – English ( 8 bit ) 19) Portugal/Brazil
8) UK – English (ISO-8859-1) 20) Russia
9) USA – English (ISO-8859-1) 21) Finland
10) Estonia 22) Turkey
11) Hungary 23) Go Back to Previous Screen
Select your locale
c) Terminal Type Menu
What type of terminal are you using?
1) ANSI Standard CRT
2) DEC VT52
3) DEC VT100
4) Heathkit 19
5) Lear Siegler ADM31
6) PC Console
7) Sun Command Tool
8) Sun Workstation
9) Televideo 910
10) Televideo 925
11) Wyse Model 50
12) X Terminal Emulator (xterms)
13) Other
Type the number of your choice and press Return:
Select option 3) DEC VT100
d) The Solaris Installation Window
Press F2 to continue installation.
e) System Identification Window
Press F2 to continue.
f) Hostname Window
Type hostname and press F2 to continue.
g) Network Connectivity Window
Press F2 to continue installation.
h) IP Address Window
Type IP address – 10.0.2.15 and continue with F2 key.
i) Network Settings Confirm Window
Press F2.
j) Name Service Window
Go down with arrow key and Select option “None” with Space bar key. The new Confirm window appears, press F2 again.
k) Subnet Window
Select option YES and press F2. A new Subnet windows appears. Confirm selected subnet mask 255.255.255.0 with F2 key.
l) Time Zone Window
Select your time zone, then F2.
m) Date and Time Window
Accept date with F2 key. A new window appears, just confirm selected parameters with F2.
3. Disk Formatting
We have to format disk. This problem is described here in more detail.
http://www.geeklan.co.uk/?p=61
a) Disk Failure Window
b) Disk Formatting
Exiting (caught signal 11)
Type suninstall to restart.
# format -e
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <drive type unknown>
/iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/sd@0,0
Specify disk (enter its number): 0
Type 0 and press Enter.
AVAILABLE DRIVE TYPES:
0. Auto configure
1. Quantum ProDrive 80S
2. Quantum ProDrive 105S
3. CDC Wren IV 94171-344
4. SUN0104
5. SUN0207
6. SUN0327
7. SUN0340
8. SUN0424
9. SUN0535
10. SUN0669
11. SUN1.0G
12. SUN1.05
13. SUN1.3G
14. SUN2.1G
15. SUN2.9G
16. other
Specify disk type (enter its number):
Specify disk type (enter its number): 16
Enter number of data cylinders: 24620
Enter number of alternate cylinders[2]: Enter
Enter number of physical cylinders[24622]: Enter
Enter number of heads: 27
Enter physical number of heads[default]: Enter
Enter number of data sectors/track: 107
Enter number of physical sectors/track[default]: Enter
Enter rpm of drive[3600]: Enter
Enter format time[default]: Enter
Enter cylinder skew[default]: Enter
Enter track skew[default]: Enter
Enter tracks per zone[default]: Enter
Enter alternate tracks[default]: Enter
Enter alternate sectors[default]: Enter
Enter cache control[default]: Enter
Enter prefetch threshold[default]: Enter
Enter minimum prefetch[default]: Enter
Enter maximum prefetch[default]: Enter
Enter disk type name (remember quotes): Qemu36GB
selecting c0t0d0
[disk formatted]
Note If you are not sure with some parameter, use char ? for help.
FORMAT MENU:
disk – select a disk
type – select (define) a disk type
partition – select (define) a partition table
current – describe the current disk
format – format and analyze the disk
repair – repair a defective sector
label – write label to the disk
analyze – surface analysis
defect – defect list management
backup – search for backup labels
verify – read and display labels
save – save new disk/partition definitions
inquiry – show vendor, product and revision
scsi – independent SCSI mode selects
volname – set 8-character volume name
!<cmd> – execute <cmd>, then return
quit
format> label
Ready to label disk, continue? y
WARNING: /iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/sd@0,0 (sd0):
corrupt label – wrong magic number
Vendor ‘QEMU’, product ‘QEMU’, 75497472 512 byte blocks
<Qemu36GB cyl 24620 alt 2 hd 27 sec 107>
format> q
#
# suninstall
Starting Solaris installation program…
Executing JumpStart preinstall phase…
Searching for SolStart directory…
Checking rules.ok file…
c) Solaris Installation Window
Press F2. A new window with “Allocate Client Services” offer appears. Press F2 again. Select your language in Language Window.
d) Software Window
Choose Core System Support.
e) Disk Window
Select c0t0d0 disk with Spacebar key. Press F4 several times to get to the “Select Location Root window“.
Press F2 to continue and back to “Select Disk Window“. Press F2 to continue installation.
f) Reconfigure EEPROM Window
Press F2 and again F2 – we do not need to preserve existing data.
g) Layout Window
Do not let Solaris to create automatic layout, press F4 for “Manual Layout“.
h) File System and Disk Layout
Press F4 to customize size of your partitions on disk c0t0d0.
Press ESC-2 to confirm your choice.
ESC-2 to continue. Do not allow to mount remote server, Esc-2 to ignore an offer.
Esc-2 to continue.
i) Warning Window
Safely ignore warnings and continue with F2 key.
j) Reboot Widnow
Select “Manual Reboot” as we need to make few changes after install. Then press F2 to start installation
4. After Install Procedure
Solaris 2.6 software installation succeeded. Some additional task are required to do to get Solaris running properly after reboot.
a) According to this article we have to add following line to /a/etc/system to be able to boot from hdd.
# cat >> /a/etc/system
set scsi_options=0×58
^d
b) Make installation to be able boot in multi-user mode
All thanks go to the original author of this idea. In fact, it helps me to boot my Solaris installation in multi-user mode. So far I have got this error message when I started Solaris in multi-user mode.
Assertion failed: MUTEX_HELD(&svc_mutex), file rpc/svc_run.c, line 754
Note Single user mode worked fine.
To get a sort of multiuser boot going, we apparently need to move S73nfs.client, S74autofs, S74syslog, and S80lp out of the way. It will boot all the way to the login prompt.
Note Suns ONLY start programs beginning with capital S in the /etc/rc*.d directories upon startup, by switching the name to lowercase, you make it easy to go back and re-add the service.
# cd /a/etc/rc2.d
# mv S74xntpd s74xntpd
# mv S75cron s75cron
# mv S76nscd s76nscd
# mv S80lp s80lp
# mv S88sendmail s88sendmail
# mv S71rpc s71rpc
# mv S73nfs.client s73nfs.client
# mv S92volmgt s92volmgt
# mv S85power s85power
# mv S74autofs s74autofs
# mv S74syslog s74syslog
# mv S88utmpd s88utmpd
# mv S99audit s99audit
# mv S99dtlogin s99dtlogin
# cd /a/etc/rc3.d
# mv S15nfs.server s15nfs.server
#mv S76snmpdx s76snmpdx
# mv S77dmi s77dmi
Now you can halt the system. Start Solaris with command:
$ usr/local/bin/qemu-system-sparc -bios /usr/local/share/qemu/ss20_v2.25_rom -M SS-20 -nographic -boot c -hda ./36G.disk -m 512 -serial telnet:0.0.0.0:3000,server -smp 2,cores=4 -cpu "TI SuperSparc 60"
Always enter setenv sbus-probe-list f and reset command. After restart boot Solaris disk from disk:
ok boot disk0 -v
After while the login prompt appears. Login to the system with a root account. Password is not set.























