BigAdmin System Administration Portal
Feature Tech Tip
Print-friendly VersionPrint-friendly Version

Installing Multiple Solaris OS Versions on the Same Hard Disk for x86 and SPARC Platforms

William Xue, October 2007

Most of the time, Solaris developers and testers need to install and work on different versions of the Solaris OS, but not everyone has enough machines to install each version of the Solaris OS on a separate machine. However, you can install multiple Solaris versions on the same hard disk to save resources.

Here, I show you how to install multiple versions of the Solaris OS on the same disk. In my example, I install three Solaris versions: Solaris 9, Solaris 10, and Solaris Nevada (or Solaris Developer Express Edition/SXDE).

Actually, using the same method I present in this article, you can install the same Solaris version but different builds, for example, Nevada Builds 55, 66, and 73, or you can even install the same version of Solaris tree copies on the same disk.

Partition Slices and Install the Solaris 9 OS

1. Use the installation DVD/CD to boot the machine and start the Solaris 9 installation:

  • For SPARC platforms, press Stop-A, enter OK for the mode, and then type boot cdrom.
  • For x86 platforms, select Solaris Express installation, especially after Solaris Nevada build 70.

2. Select Interactive Installation.

3. During the installation, when you reach the screen that asks you to choose between Auto or Manual Layout, choose Manual Layout, and then choose Edit.

4. Partition the slices, for example, using the following layout for an 80-Gbyte disk on a SPARC platform:

  • c0t0d0s0 -- 25-Gbyte / (We will use this for the Solaris 9 OS.)
  • c0t0d0s1 -- 2-Gbyte swap
  • c0t0d0s2
  • c0t0d0s3 -- 20 Gbytes for the Solaris 10 OS
  • c0t0d0s4 -- 20 Gbytes for Nevada
  • c0t0d0s5
  • c0t0d0s6
  • c0t0d0s7 -- 10-Gbyte /sharedspace

Note: For SPARC platforms, the slice name is cXtXdXsX. For x86 platforms, the slice name is cXdXsX.

5. To save some time later, you can name the partitions according to what you intend to install on them later. (For example, you could use "/S10" if you intend to use a partition for the Solaris 10 OS.)

Install the Solaris 10 OS

1. Boot from the DVD/CD for Solaris Express installation.

2. Select Interactive Installation.

3. When you reach the screen that asks you to select a disk, choose the same hard disk you chose during the installation of the Solaris 9 OS.

4. In the Preserve Data screen, choose Preserve.

5. Rename the root (/) of slice c0t0d0s0 to /S9 and select slice c0t0d0s0 to preserve (so that the Solaris 9 installation on slice 0 is not overwritten).

Note: You can also preserve the swap slice (see step 7). However, if you intend to install more than three Solaris versions, do not preserve the swap slice, so multiple Solaris versions can share one swap space.

6. Continue and select Manual Layout, and then customize.

7. During the Solaris 9 OS installation process, you partitioned slice 3 (c0t0d0s3) for the Solaris 10 OS. Specify the swap space again using the same size as before (2 Gbytes).

Note: If, in step 4, you preserved the swap slice, you do not need to use the same size, but using the same size you can make multiple versions of the Solaris OS share the swap disk.

8. In the customize screen, specify the root (/) of slice 3 using the same size you specified when you originally partitioned slice 3 (20 Gbytes).

9. Define /sharedspace on slice 7 (c0t0d0s7) using the same size you specified when you originally partitioned slice 7 (10 Gbytes). By doing this, you can boot the Solaris 10 OS, write a file to /sharedspace, reboot to the Solaris 9 OS, and verify that the file is still there.

10. Complete the installation of the Solaris 10 OS.

Install Solaris Nevada

1. Customize the disk layout the same way you did during the installation of the Solaris 10 OS, except this time you need to preserve both slice 0 (for the Solaris 9 OS) and slice 3 (for the Solaris 10 OS). So rename the root (/) of slice c0t0d0s0 to /S9 and rename the root of slice 3 (c0t0d0s3) to /S10, and then continue.

2. Specify the swap space using the same size you used earlier (2 Gbytes).

3. Specify the root of slice 4 (c0t0d0s4) using the same size you used earlier (20 Gbytes).

4. Define /sharedspace on slice 7 (c0t0d0s7) using the same size you specified when you originally partitioned slice 7 (10 Gbytes).

Create a Boot Alias for Each Solaris Version

1. Create a boot alias for each Solaris version. For x86 platforms, we use GRUB, and for SPARC platforms, we can use OpenBoot PROM (OBP) mode, as follows.

For x86 platforms:

a. Boot your system with the newest Solaris OS (in this example, Solaris Nevada).

b. Log in as root.

c. Then, as shown in the following example, add additional title entries as needed at each /boot/grub/menu.lst:

title Solaris 9
       root (hd0,0,a)
       kernel$ /platform/i86pc/kernel/$ISADIR/unix
       module$ /platform/i86pc/$ISADIR/boot_archive
title Solaris 10
       root (hd0,0,d)
       kernel$ /platform/i86pc/kernel/$ISADIR/unix
       module$ /platform/i86pc/$ISADIR/boot_archive

d. Reboot, and select the Solaris version you want in GRUB.

For SPARC platforms:

a. Boot the machine and press Stop-A to enter OBP mode.

b. List all devices:

OK>show-disks

c. Select your boot disk.

d. Create aliases for the boot slice:

OK>nvalias  s9  ^ydevicepath/disk@0,0,a
OK>nvalias  s10  ^ydevicepath/disk@0,0,d
OK>nvalias  Nevada  ^ydevicepath/disk@0,0,e

Note: ^y indicates you should press Ctrl-Y, which shows you the disk device path.

For example, here's what I used on my machine:

OK>nvalias  s9  /pci@1e,600000/ide@d/disk@0,0,a
OK>nvalias  s10  /pci@1e,600000/ide@d/disk@0,0,d
OK>nvalias  Nevada  /pci@1e,600000/ide@d/disk@0,0,e

e. Set up the boot environment variables:

OK>setenv boot-device  s9  s10  Nevada  net
OK>setenv diag-device  s9  s10  Nevada  net

f. Boot the system.

g. Now, choose which Solaris OS to boot from by typing one of the following commands:

OK>boot s9

or

OK>boot s10

or

OK>boot nevada

Note: The boot device alias is case insensitive, but it regards uppercase as lowercase. You must type the alias using lowercase after the boot command. For example, if you created the following alias:

OK>nvalias  S10_U4  /pci@1e,600000/ide@d/disk@0,0,d

You must boot the system as follows:

OK>boot  s10_u4

For More Information

Here are some additional resources:


Comments (latest comments first)

Discuss and comment on this resource in the BigAdmin Wiki

Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.


BigAdmin
  
 
Download Opensolaris