BigAdmin System Administration Portal
Feature Article
Print-friendly VersionPrint-friendly Version

Creating a Multi-Boot Disk for Machines With AMD Opteron Processors

By Craig Winter


Abstract

Sun Microsystems Inc.'s new 64-bit Opteron machines can be configured to run the Solaris Operating System (x86 Platform Edition) and several distributions of Linux, all from a single internal disk drive. This is made possible by correctly partitioning the disk drive at the time of the first OS installation, to allow space for two or more different operating systems. When all of the operating systems are properly installed, the user can choose which one to run from the Linux GRUB Boot Loader, as the machine is being booted.


Introduction

This article presents step-by-step procedures for loading the Solaris 10 OS on x86 platforms, and one or two 64-bit Linux operating systems, on machines based on 64-bit AMD Opteron processors. Installations were done on generic Opteron-based workstations and confirmed on a Sun Fire V20z server and Sun Java Workstation W1100z and W2100z workstations.

The three operating systems illustrated here are:

  • Red Hat Enterprise Linux WS (2.4.21-9.EL)
  • SuSE Linux 9.0 Professional 64-bit Version for AMD64
  • Solaris 10 OS on x86 platforms

For this exercise, a single 80 Gbyte IDE internal hard drive is used to hold a version of the Solaris 10 OS on x86 platforms and up to two distributions of Linux. Correct partitioning of the disk during the initial installation allows each operating system to be loaded on the same drive and still remain separate from the others.

An overview of each of the three configurations follows, along with links to step-by-step instructions for each installation.


Overview of the Installation Procedures

1. SuSE 9.0 Linux, Solaris 10 OS on x86 Platforms, and Red Hat 3.1 Linux

For this configuration it is recommended that SuSE 9.0 be installed first. Its Expert Partitioner can then be used to easily and correctly allocate space for the four main partitions that are needed on the disk. Three large partitions are set up for the three operating systems, and a fourth smaller partition is reserved for Linux swap space.

The following partition table shows how the SuSE Expert Partitioner is used to set up the disk, to accommodate three operating systems and swap space for Linux:


Device      Size F Type                Mount   Start    End  Label

/dev/hda  76.6GB   HDS                             0  10010
/dev/hda1 24.0GB   Linux swap                      0   3133
/dev/hda2 24.0GB F Linux native (Ext3) /RedHat  3134   6267  RedHat
/dev/hda3 24.0GB F Linux native (Ext3) /        6268   9401  SuSE
/dev/hda4  2.0GB F Linux swap          swap     9402  10010

The partition that will be used for the Solaris OS is set up, but not formatted at this time. It will be formatted during the Solaris OS installation. All three Linux partitions are formatted during the SuSE installation. SuSE knows to install itself on the "/" partition.

The Solaris 10 OS on x86 platforms is the second operating system to be installed. Care must be taken to ensure that the correct partition is selected for the Solaris OS installation, as the Solaris OS will not install on a partition that contains a Linux file system. Only one Solaris partition may be present on the disk during the installation.

During the Solaris OS installation, the Select Disks screen will appear. Select the c0d0 disk. To go the Disk Editing Options screen, press the F4_Edit key. To edit the Fdisk partitions, press the F2_OK key. The following table will appear:


Partition   Type                          Size    Start Cylinder
================================================================
1           SOLARIS                      24577                 1
2           Other                        24577             12484
3           Other                        24577             24967
4           SOLARIS                       2048             37450
        ========================================================
                      Capacity:     78531 MB
                     Allocated:     24577 MB
                Rounding Error:         0 MB
                          Free:     53954 MB

The number 4 SOLARIS partition must be deleted. To do so, first highlight the entry, and then press the F3_Delete key. To confirm the deletion, press the F2_OK key. This is done because the Solaris OS installation program can only recognize one SOLARIS partition at a time. From this point on, the Solaris OS installation proceeds normally.

Red Hat 3.1 is the final installation. The Red Hat Partitioning table needs be modified in order to format the Red Hat "/" and Linux swap partitions, and to mount the SuSE partition. The swap partition will be used by both Red Hat and SuSE. The table should closely resemble the following:


Device     Mount  Type        Format   Size   Start     End
           Point

/dev/hda1         Linux swap          24584       1    3134
/dev/hda2  /      ext3          F     24584    3135    6268
/dev/hda3  /SuSE  ext3                24576    6269    9401
/dev/hda4         swap          F      2047    9402    9662

When the Red Hat installation is done, its GRUB Boot Loader will be active. The grub.conf file is then modified to allow all three operating systems to appear on the Boot Loader screen. The user is then able to choose to boot any of the three systems.

See the step-by-step installation instructions for SuSE 9.0 Linux, Solaris 10 OS on x86 platforms, and Red Hat 3.1 Linux.

2. Solaris 10 OS on x86 Platforms and Red Hat 3.1 Linux

The Solaris 10 OS on x86 platforms is the first operating system to be loaded. During the Solaris OS installation, the Select Disks screen will appear. Select the c0d0 disk. Press the F4_Edit to go to the Disk Editing Options screen. Then press F2_OK to edit the Fdisk partitions. Assuming the disk is clean, the following table will appear:


Partition   Type                          Size    Start Cylinder
================================================================

1           Other                        78531                 1
2           <unused>                         0                 0
3           <unused>                         0                 0
4           <unused>                         0                 0
        ========================================================
                      Capacity:     78531 MB
                     Allocated:         0 MB
                Rounding Error:         0 MB
                          Free:     78531 MB

The number 1 partition should be deleted and recreated as Type SOLARIS, and half the disk should be allocated to it:


Partition   Type                          Size    Start Cylinder
================================================================
1           SOLARIS                      36866                 1
2           <unused>                         0                 0
3           <unused>                         0                 0
4           <unused>                         0                 0
        ========================================================
                      Capacity:     78531 MB
                     Allocated:     36866 MB
                Rounding Error:         1 MB
                          Free:     41664 MB

From this point on, the Solaris OS installation proceeds normally.

Red Hat 3.1 is the next installation. The Partitioning table should be modified to format the Red Hat partition and the Linux swap partition. The Solaris partition is left alone. The table should then resemble the following:


Device     Mount     Type        Format   Size   Start     End
           Point

Free                 Free space              2       1       1
/dev/hda1            Linux swap          36865       1    4700
Free                 Free space              7    4701    4701
/dev/hda2  /         ext3          F     36860    4702    9400
/dev/hda3            swap          F      4801    9400   10011
Free                 Free space              5   10012   10012

When the Red Hat installation is done, its GRUB Boot Loader will be active. The grub.conf file is then modified to allow both operating systems to appear on the Boot Loader screen. The user is then able to choose to boot either one of the two systems.

See the step-by-step installation instructions for the Solaris 10 OS on x86 platforms and Red Hat 3.1 Linux.

3. Solaris 10 OS on x86 Platforms and SuSE 9.0 Linux

The Solaris 10 OS on x86 platforms is the first operating system to be loaded. During the Solaris OS installation, the Select Disks screen will appear. Select the c0d0 disk. Press F4_Edit to go to the Disk Editing Options screen. Press F2_OK to edit the Fdisk partitions. Assuming the disk is clean, the following table will appear:


Partition   Type                          Size    Start Cylinder
================================================================
1           Other                        78531                 1
2           <unused>                         0                 0
3           <unused>                         0                 0
4           <unused>                         0                 0
        ========================================================
                      Capacity:     78531 MB
                     Allocated:         0 MB
                Rounding Error:         0 MB
                          Free:     78531 MB

The number 1 partition should be deleted and recreated as Type SOLARIS, and half of the disk should be allocated to it:


Partition   Type                          Size    Start Cylinder
================================================================
1           SOLARIS                      36866                 1
2           <unused>                         0                 0
3           <unused>                         0                 0
4           <unused>                         0                 0
        ========================================================
                      Capacity:     78531 MB
                     Allocated:     36866 MB
                Rounding Error:         1 MB
                          Free:     41664 MB

From this point on, the Solaris OS installation proceeds normally.

SuSE 9.0 is the next installation. The Partitioning table should be modified to format the SuSE partition and the Linux swap partition. The Solaris OS partition is left alone. It should then resemble the following table:


Device      Size F Type                Mount   Start     End  Label

/dev/hda  76.6GB   WDG                             0  155060
/dev/hda1 36.0GB   Linux swap                      0   74899
/dev/hda2 36.0GB F Linux native (Ext3) /       74900  149798  SuSE
/dev/hda3  2.5GB F Linux swap                 149799  155060
/dev/hda5 33.9GB   Linux native                74900  145615
/dev/hda6  2.0GB   Linux native               145616  149779
/dev/hda7 35.9GB   Linux native               149780  224671

When the SuSE installation is done, its GRUB Boot Loader will be active. The menu.lst file is then modified to allow both operating systems to appear on the Boot Loader screen. The user can then choose to boot either one of the two systems.

See the step-by-step installation instructions for the Solaris 10 OS on x86 platforms and SuSE 9.0 Linux.


Conclusion

These instructions have shown three ways to install multiple operating systems on a single internal disk drive. This allows an application developer to access several different operating environments on a single Opteron-based machine.


About the Author

Craig Winter is a Staff Engineer for the HPTC Group in Market Development Engineering at Sun Microsystems, Inc.


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


BigAdmin