Sun N1 System Manager 1.3 Operating System Provisioning Guide

Chapter 2 Provisioning UNIX Operating Systems

This chapter describes how to use the N1 System Manager to install Solaris and Linux operating systems on managed servers throughout your data center. For information related to the Windows OS, see Chapter 3, Provisioning Windows Operating Systems. For information about working with diskless clients, see Chapter 4, Working with Diskless Clients.

The chapter contains the following information:

UNIX OS Provisioning Overview

This section identifies the UNIX operating systems that N1 System Manager can provision and summarizes the overall provisioning process.

Supported UNIX Operating Systems

The N1 System Manager is able to install the following UNIX-based operating systems onto managed servers:

For detailed information about specific OS versions and hardware support, see Hardware and OS Requirements for Systems to be Provisioned.

UNIX OS Provisioning Process

The following process describes the high-level process for managing Solaris and Linux installations across your enterprise.

  1. Configure your hardware to support OS provisioning. A more detailed discussion of appropriate configuration recommendations and requirements is in Sun N1 System Manager 1.3 Site Preparation Guide.

  2. Assume a user role with appropriate privileges. See Introduction to User Security in Sun N1 System Manager 1.3 Discovery and Administration Guide for procedural information.

  3. Copy an OS distribution to the management server. See Managing UNIX OS Distributions.

  4. Verify that the servers you want to provision are known to N1 System Manager. See Chapter 4, Discovering Manageable Servers, in Sun N1 System Manager 1.3 Discovery and Administration Guide.

  5. If needed, customize the default OS profile that was created when you copied the OS distribution. See Managing OS Profiles.

  6. Load the OS profile onto your managed servers. See Installing the UNIX OS on Managed Servers.

  7. Track the Load OS job to completion.

Provisioning the Solaris 10 Operating System

This section explains how to use the N1 System Manager command-line interface to provision the Solaris 10 OS. The process for provisioning the Red Hat Linux and SUSE Linux operating systems is similar.


Tip –

You can also perform some provisioning steps from the browser interface. These steps are identified in the following procedure, along with information about where to access those features from within the browser interface. For detailed information about performing tasks in the browser interface, view the N1 System Manager online help.


ProcedureTo Provision the Solaris 10 OS

Before You Begin
Steps
  1. Copy the Solaris 10 OS ISO file to the management server.


    N1-ok> create os os-name file file-location
    

    See To Copy an OS Distribution From ISO Files or To Copy an OS Distribution From CDs or a DVD for more information.


    Note –

    This operation is CPU intensive and might take several minutes to complete.


    A default OS profile is created on the management server. For Solaris and Linux systems, the default profile is optimized for Sun Fire V20z systems. To view the list of OS profiles, type show osprofile all.

  2. (Optional) Set up a flash archive file on the management server.

    See To Copy a Flash Archive to the Management Server.

  3. (Optional) Create a custom post-installation script on the management server to add a host.

    The following sample script is named /etc/sysconfig/network-scripts/add-solaris-host. This script adds a host to the /etc/hosts file on a managed server.


    echo "129.10.12.101 myhost" >>/a/etc/hosts
  4. (Optional) Customize the default OS profile to use a flash archive and a post-installation script.


    N1-ok> set osprofile osprofile-name flar flar
    

    The flar attribute value is the full path and flash archive file name, for example, /jumpstart/Flash/archive1.flar.


    N1-ok> add osprofile osprofile-name script script type type
    

    The script attribute value is the full path and script file name, for example, /etc/sysconfig/network-scripts/add-solaris-host.

    The type attribute specifies the time when the custom script will run during the installation. Valid values for the type attribute are:

    • pre – Run the script before the installation (for example, drivers).

    • post – Run the script after the installation.

    The OS profile is modified to use the designated post-installation script and the flash archive file.

  5. To use the browser interface to perform the rest of the provisioning procedure, you might want to perform the following two steps:

    1. Show the drag-and-drop OS profile icon on the Dashboard tab.

      1. On the Task Shortcuts pane, click the Edit List button beneath the OS Profiles list.

        The list of available OS profiles appears.

      2. Select the relevant check box and click OK.

        The selected OS profile is added to the Task Shortcuts pane.

    2. (Optional) Connect to the serial console of the managed server.

      1. Choose All Servers from the View Selector menu.

        The Servers table appears.

      2. Select the server for which you want to launch a serial console.

        The Server Details page appears.

      3. Choose Open Serial Console from the Actions menu.

        The serial emulator appears.

  6. Load the OS profile on a server or server group.

    • To load the OS profile on a server, use the following command:


      N1-ok> load server server-name osprofile profile-name networktype=static ip=ip-address
      

      Note –

      The networktype attribute must be set to static for Solaris profile installations. See Table 2–2 and load server in Sun N1 System Manager 1.3 Command Line Reference Manual for details.


      The ip attribute specifies the static IP to assign to the provisioned server.

    • To load the OS profile on a server group, use the following form of the command:


      N1-ok> load group group-name osprofile osprofile-name [excludeserver=ip-address-range] 
      networktype=static ip=ip-address-range
      

      The optional excludeserver attribute enables you to exclude specified IP addresses from the load operation. For the excludeserver and ip attributes, you can provide a list of addresses, separated by commas, or a range of addresses, specified with a hyphen.


    Tip –

    You can also load the OS profile from the browser interface. To do so, drag and drop the OS profile icon from the Task Shortcuts pane to a server or server group. The Load OS Profile wizard appears. Follow the steps on the screen to load the OS profile.


  7. View the job status.


    N1-ok> show job job-number
    

    Tip –

    You can also track the progress of the OS profile installation from the browser interface. To do so, use one of the following methods:

    • Launch the Serial Console window and view its output.

    • Click the Jobs tab to view the OS Load job, and click the Job ID for details.

    • Click the Event Log tab to view any events generated by the job.



Example 2–1 Provisioning the Solaris 10 OS through the Command Line

For the following example, assume that you have created a Solaris 10 OS on x86 platform flash archive file named archive1.flar and that you have created a post-installation script called add-host. Your management server is also assumed to be running the Solaris 10 OS on x86 platform software.

The following example shows how to copy an OS distribution from the /tmp/solarisdvd.iso file.


N1-ok> create os solaris_ver10 file /tmp/solarisdvd.iso
Job "1" started.

The following example shows how to add a line to the /etc/dfs/dfstab file, below the last comment, which creates the /jumpstart/Flash directory.


# vi /etc/dfs/dfstab

# Put custom additions below (Do not change/remove this line)
share -F nfs -o ro,anon=0 -d "Flash Share" /jumpstart/Flash

The following example shows how to copy the flash archive to the /jumpstart/Flash directory.


# cp /tmp/archive1.flar /jumpstart/Flash/

The following example shows how to restart NFS.


# /etc/init.d/nfs.server stop
# /etc/init.d/nfs.server start

The following example shows how to create an OS profile that uses the flash archive.


N1-ok> create osprofile solaris_ver10 rootpassword admin 
flar /jumpstart/Flash/archive1.flar
description "solaris 10with flar" os solx86
Job "2" started. 

The following example shows how to add a swap partition to the OS profile.


N1-ok> add osprofile solaris_ver10 partition swap sizeoption fixed size 2048 
device c1t1d0s1 type swap

The following example shows how to add a root partition to the OS profile.


N1-ok> add osprofile solaris_ver10 partition / sizeoption free device 
c1t1d0s0 type ufs

The following example shows how to add a post-installation script to the OS profile.


N1-ok> add osprofile solaris_ver10 script 
/etc/sysconfig/network-scripts/add-host type post

The following example shows how to load the OS profile on a server group with the name devgroup.


N1-ok> load group devgroup osprofile solaris_ver10 
excludeserver=192.168.73.205,192.168.73.31,192.168.73.14 
networktype=static ip=192.168.72.201-192.168.73.214
Job "3" started.

The excludeserver attribute excludes the specified IP addresses from the load operation. The networktype attribute specifies the static IP range to assign to the provisioned servers.

The networktype attribute must be set to static for Solaris profile installations. See Table 2–2 and load server in Sun N1 System Manager 1.3 Command Line Reference Manual for details.

The following example shows how to view the job status. The number 3 in this example is the number of the job that was started in the preceding load group example.


N1-ok> show job 3
Job ID:   3
Date:     2005-06-01T13:11:46-0600
Type:     OS Load
Status:   Completed (2005-06-01T13:11:59-0600)
Command: 	 load group devgroup osprofile solaris_ver10 
excludeserver=192.168.73.205,192.168.73.31,192.168.73.14 
networktype=static ip=192.168.72.201-192.168.73.214Owner:    root
Errors:   0
Warnings: 0

Troubleshooting

OS Distributions and Deployment in Sun N1 System Manager 1.3 Troubleshooting Guide

See Also
Next Steps

To Add the OS Monitoring Feature in Sun N1 System Manager 1.3 Discovery and Administration Guide

Managing UNIX OS Distributions

This section describes the following tasks:

Copying OS Distributions and Flash Archives

Before you can install an OS profile on a managed server, you must copy an OS image. This copied image is called an OS distribution. You can copy an OS image from files that are located on the management server or from a network mounted file system. OS distributions are copied to the directories on the management server as follows:

Supported file types are:


Note –

The N1 System Manager does not support the copying of Solaris OS CDs and CD ISO files. You must copy a Solaris DVD or DVD ISO file.


Refer to Hardware and OS Requirements for Systems to be Provisioned for a detailed list of supported distributions for each provisionable server type.

To copy an OS distribution, use the create os command. Type help create os at the N1–ok command line for syntax and parameter details, or see create os in Sun N1 System Manager 1.3 Command Line Reference Manual. Refer to the following procedures for instructions about how to copy an OS distribution:

After you have copied an OS distribution, you can copy a flash archive file to the management server for use with a customized OS profile. Copying flash archives involves several manual steps, but it provides the most efficient method for loading OS distributions with the N1 System Manager. See To Copy a Flash Archive to the Management Server.

ProcedureTo Copy an OS Distribution From ISO Files

This procedure describes how to copy an OS distribution to the management server from a set of ISO files by using the command line.


Note –

After a distribution is copied, an OS profile of the same name is created by default. This profile appears in the OS Profiles list in the Task Shortcuts pane of the browser interface or by typing show osprofile all at the N1–ok> prompt.


Before You Begin
Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Type the following command:


    N1-ok> create os os-name file file[,file...]

    The file identifies the absolute full path name to the file.

    See create os in Sun N1 System Manager 1.3 Command Line Reference Manual for details.

  3. Verify that the OS distribution was copied.


    N1-ok> show os all
    

    The OS distribution appears in the output.


Example 2–2 Creating an OS Distribution from a File

The following example shows how to create an OS distribution for Solaris 10 from a single Solaris DVD ISO file.


N1-ok> create os solaris_ver10 file /tmp/solaris_10_dvd.iso
Job "7" started.


Example 2–3 Creating an OS Distribution from Several Files

The following example shows how to create an OS distribution for Red Hat Linux from several ISO files. This command must be typed as a single line.


N1-ok> create os RHEL30 file 
/os/RHEL3/RHEL3AS-U3-re1215.RC1.0-i386-disc1.iso, 
/os/RHEL3/RHEL3AS-U3-re1215.RC1.0-i386-disc2.iso, 
/os/RHEL3/RHEL3AS-U3-re1215.RC1.0-i386-disc3.iso, 
/os/RHEL3/RHEL3AS-U3-re1215.RC1.0-i386-disc4.iso

See Also

To find out how to load the OS distribution, see To Load an OS Profile on a Server or a Server Group.

ProcedureTo Copy a SUSE Linux Enterprise Server 9 Service Pack OS Distribution from ISO Files

The following procedure describes how to copy a SUSE Linux Enterprise Server (SLES) 9 Service Pack (SP) OS distribution to the management server. To copy an SLES SP distribution, you must first copy the base distribution, then add the SP to it. Although the specific example below illustrates SP1, the same process applies to all SLES 9 SP numbers.

Before You Begin

Move any file systems off the /mnt mount point.

Steps
  1. Copy the SLES 9 distribution.

    Use a command similar to the following.


    # n1sh create os sles9u1 file
      /directory/SLES-9-i386-RC5-CD1.iso,/directory/SLES-9-i386-RC5-CD2.iso,
      /directory/SLES-9-i386-RC5-CD3.iso,/directory/SLES-9-i386-RC5-CD4.iso,
      /directory/SLES-9-i386-RC5-CD5.iso,/directory/SLES-9-i386-RC5-CD6.iso
    

    Note –

    Wait for the Create OS command to complete before going to the next step.


  2. Copy the SLES 9 SP distribution:


    Note –

    When you add the update, use the same OS profile name as you used in the previous step.


    Type a command similar to the following. This example uses SLES 9 SP1. Replace file names as appropriate for other service packs, such as SP2 and SP3.


    # n1sh create os sles9u1 file
      /directory/SLES-9-SP-1-i386-RC5-CD1.iso,/directory/SLES9/SLES-9-SP-1-i386-RC5-CD2.iso,
      /directory/SLES-9-SP-1-i386-RC5-CD3.iso
    
  3. Verify that the OS distribution was copied.


    N1-ok> show os all
    

    The OS distribution appears in the output.

See Also

To find out how to load the OS distribution, see To Load an OS Profile on a Server or a Server Group.

ProcedureTo Copy an OS Distribution From CDs or a DVD

This procedure describes how to copy an OS distribution to the management server from CDs or a DVD by using the command line.


Note –

The N1 System Manager does not support the copying of Solaris OS CDs and CD ISO files. You must copy a Solaris DVD or DVD ISO file.


When copying an OS distribution from multiple installation CDs, you must run the create os command multiple times. For example, if you are copying an OS distribution that is provided on two CDs, you must insert the first CD, run the create os command, and wait for the job to complete. Once the first job completes, you must insert the second CD, run the create os command again, and wait for the job to complete. The OS distribution is successfully copied when the second job completes.

When copying a SUSE Linux Enterprise Server 9 Service Pack distribution, you must run the create os command multiple times. First, copy the SLES 9 base distribution. When that job finishes, you can then copy the SLES 9 Service Pack distribution. A default OS profile is automatically created for each newly created OS distribution, with the same name as the OS distribution.

The default profile is provided as an example. Most of the time, you will have to update the default profile to match your hardware or it may be easier to just create a new profile. Use the show osprofile osprofile-name command to see the configuration of an OS profile. The same OS profile name should be used when adding the Service Pack distribution.


Note –

After a distribution is copied, an OS profile of the same name is created by default. This profile appears in the OS Profiles list in the Task Shortcuts pane of the browser interface or by typing show osprofile all at the N1–ok> prompt.


Before You Begin

Move any file systems off the /mnt mount point.

Steps
  1. Insert Disk 1 and type the following command:


    N1-ok> create os os-name cdrom cdrom
    

    A Create OS Distribution job is started. Note the job ID. When the job completes, insert the next disk. See create os in Sun N1 System Manager 1.3 Command Line Reference Manual for details.


    Note –

    You are not prompted to insert the next disk, so you must track the Create OS Distribution job completion and the disk number for your OS. When the job completes, an event is generated.


  2. Insert Disk 2 and type the following command:


    N1-ok> create os os-name cdrom cdrom
    
  3. Continue with additional disks if needed.

  4. When the final Create OS Distribution job completes, type the following command:


    N1-ok> show os os-name
    

    The new OS distribution appears in the output.

Troubleshooting

OS Distribution Creation Fails with a Copying Files Error in Sun N1 System Manager 1.3 Troubleshooting Guide

Next Steps

To find out how to load the OS distribution by using an profile, see To Load an OS Profile on a Server or a Server Group.

ProcedureTo Create a Flash Archive

The following procedure explains how to create a flash archive that is suitable for N1 System Manager to use. For general information about creating Solaris flash archives, see Solaris 10 Installation Guide: Solaris Flash Archives (Creation and Installation).


Note –

Flash archives on Red Hat Linux systems are limited to 2 GBytes.


Steps
  1. On the management server, create the Solaris distribution.

    Type a command similar to the following:


    N1-ok> create os s10x file /images/solarisdvd.iso
    
  2. Clone the automatically-generated OS profile.

    Type a command similar to the following, where the osprofile name is the name of the new profile and the clone name is the name of the existing profile created when you create the distribution.


    N1-ok> create osprofile s10-noagent clone s10x
    
  3. Modify the cloned OS profile.

    For this example, remove SUNWn1smx86ag-1-2 and /opt/SUNWscs/data/allstart/scripts/init_agent_firstboot.sh from s10-noagent.


    	N1-ok> remove osprofile s10-noagent update SUNWn1smx86ag-1-2
    N1-ok> remove osprofile s10-noagent script /opt/SUNWscs/data/allstart/scripts/init_agent_firstboot.sh
    
  4. Deploy the modified OS profile to the managed server that will create the flash archive.


    N1-ok> load server server osprofile s10-noagent networktype static ip ip
    

    Note –

    For Solaris, the networktype must be static.


  5. On the managed server, create the archive.


    bash-3.00# flarcreate -n s10xga-flar -c /tmp/s10x-ga.flar
    	Full Flash
    	Checking integrity...
    	Integrity OK.
    	Running precreation scripts...
    	Precreation scripts done.
    	Determining the size of the archive...
    	4921218 blocks
    	The archive will be approximately 1.32GB.
    	Creating the archive...
    	4921218 blocks
    	Archive creation complete.
  6. Copy securely the resulting file to the management server.

    Make sure that the file is in an NFS accessible location, such as /var/js. Use the scp (secure copy) utility as shown in the following command:


    bash-3.00# scp -v /tmp/s10x-ga.flar root@mgmt_server:/var/js
    
  7. Create an OS profile for the flash archive.


    N1-ok> create osprofile s10x-flar os s10x flar /var/js/s10x-ga.flar rootpassword password
    
  8. Add partition information to the flash archive OS profile.


    N1-ok> add osprofile s10x-flar partition / device c1t1d0s0 sizeoption free type ufs
    	N1-ok> add osprofile s10x-flar partition swap device c1t1d0s1 sizeoption fixed size 1024 type swap
  9. Deploy the flash archive OS profile to a managed server.


    N1-ok> load server server osprofile s10x-flar networktype static ip ip
    
  10. Add the OS monitoring feature to the managed server on which you deployed the flash archive (after clearing .ssh/known_hosts).


    N1-ok> add server server feature osmonitor agentssh root/admin agentip ip
    

    If you do not follow the above steps to create your flash archive, you might see messages similar to the following on the managed server console:


    Nov 23 11:56:08 websvr-21 agent[26169]: error    Nov 23 11:56:08 agent
    agentServer parameter (luke-8) is not a valid local hostname
    Nov 23 11:56:08 websvr-21 agent[26169]: syslog          Nov 23 11:56:08 agent
    agentServer parameter (luke-8) is not a valid local hostname

    If you see these messages, perform the following steps on the management server:

    1. Add the basemanagement feature to the managed server.


      N1-ok> add server server feature basemanagement agentip agentip agentssh agentssh
      
    2. Restart the managed server.


      N1-ok> start server server command "/opt/SUNWsymon/sbin/es-uninst -X"
      

      You can run this command on each managed server, or use start group to start all managed servers in a server group. Once the managed server restarts, you can add the osmonitoring feature.

ProcedureTo Copy a Flash Archive to the Management Server

This procedure describes how to set up and deploy a flash archive on a server or a server group by using the command line.

Before You Begin
Steps
  1. Log in to the management server as root.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. To make the shared flash archive directory available through NFS, perform one of the following actions:

    • If your management server is running the Solaris operating system, modify the /etc/dfs/dfstab file.

      Add share -F nfs -o ro,anon=0 -d "Flash Share" /jumpstart/Flash below the last comment in the file.

      For example:


      # Put custom additions below (Do not change/remove this line)
      share -F nfs -o ro,anon=0 -d "Flash Share" /jumpstart/Flash
      
    • If your management server is running Linux, modify the /etc/exports file.

      Add /jumpstart/Flash *(ro,no_root_squash) below the last comment in the file.

      For example:


      # Put custom additions below (Do not change/remove this line)
      /jumpstart/Flash      *(ro,no_root_squash)
      
  3. Copy the flash archive file to the /jumpstart/Flash directory.

  4. To restart NFS, perform one of the following actions:

    • If your management server is running the Solaris OS version 9, type the following commands:


      # /etc/init.d/nfs.server stop
      # /etc/init.d/nfs.server start
      
    • If your management server is running the Solaris OS version 10 or later, type the following command:


      # svcadm restart svc:/network/nfs/server:default
      
    • If your management server is running Linux, type one of the following commands:


      # /etc/init.d/nfs restart
      # /etc/rc3.d/S60nfs restart
      
  5. Create an OS profile that specifies the location of the flash archive file that you copied in Step 3.


    N1-ok> create osprofile osprofile-name os os-name rootpassword rootpassword flar flar 
    description description language language timezone timezone
    

    The flar attribute value is the path and flash archive file name, for example, /jumpstart/Flash/archive1.flar.

    The OS profile is created.

  6. To verify the OS profile settings, type the following command:


    N1-ok> show osprofile osprofile-name
    

    The OS profile details appear. Check that the partition settings are appropriate for your business needs. See To Create an OS Profile for partition settings and examples.

  7. Load the OS profile on a server or a server group.

    See To Load an OS Profile on a Server or a Server Group.


Example 2–4 Deploying a Solaris 9 OS Flash Archive

The following example shows how to create an OS profile that uses a flash archive file.


N1-ok> create osprofile solaris9_flar rootpassword admin description "solaris 
9 with flar" os solx86 flar /jumpstart/Flash/S9-u7-req-v20z.archive

The following examples show how to add root and swap partitions to the OS profile.


N1-ok> add osprofile solaris9_flar partition / sizeoption free device 
c1t1d0s0 type ufs

N1-ok> add osprofile solaris9_flar partition swap sizeoption fixed size 128 
device c1t1d0s1 type swap

The following example shows how to deploy the modified OS profile to a server.


N1-ok> load server 192.168.73.2 osprofile 
solaris9_flar networktype=static ip=192.168.73.244

The networktype attribute specifies that the installed host is assigned the 192.168.73.244 IP address.


ProcedureTo Delete an OS Distribution


Note –

You cannot delete an OS distribution while it is being deployed through an OS profile. Wait until the deployment job finishes, then delete the OS distribution.


Before You Begin

Delete all OS profiles that are associated with the OS distribution. This process includes deleting the default OS profile that was created when the OS distribution was copied. An OS profile cannot be deleted while it is being deployed. You may remove it after the deployment is completed. See To Delete an OS Profile for instructions.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Type the following command:


    N1-ok> delete os os-name
    

    The distribution is deleted. See delete os in Sun N1 System Manager 1.3 Command Line Reference Manual for details.

  3. View the available OS distributions.


    N1-ok> show os all
    

    The deleted OS distribution should not appear in the output.

Managing OS Profiles

This section describes the following tasks:

Creating, Listing, and Modifying OS Profiles

OS profiles specify the following information:

After you have copied an OS distribution, the N1 System Manager automatically creates an OS profile of the same name on the management server. This OS profile is also called a default OS profile. See Default OS Profiles for parameter settings and best practices for customizing OS profiles.

To view details of a default OS profile, use the show command with the osprofile keyword.

To create a new OS profile, use the create osprofile, add osprofile, and set osprofile commands. See Example 2–6 and Example 2–7 for command-line examples.

Default OS Profiles

When you copy an OS distribution, a default OS profile is automatically created for the OS distribution. The default profile is created for a typical Sun Fire V20z server, and it is mainly provided as an example. Settings for the default OS profiles are described in the following table.

Table 2–1 Default OS Profile Parameter Settings

Parameters 

Solaris OS 

Red Hat OS 

SUSE OS 

Root password 

admin

admin

admin

Language 

U.S. English 

U.S. English 

U.S. English 

Time zone 

Greenwich Mean Time (GMT) 

Greenwich Mean Time (GMT) 

Greenwich Mean Time (GMT) 

Partitions 

  • Root mount point ufs with a free file system size option on the c1t1d0s0 slice

  • swap mount point 2048-Mbyte swap on the c1t1d0s1 slice

  • Root mount point ext3 with a free file system size option on the sda slice

  • swap mount point 2048-Mbyte swap on the sda slice

  • Root mount point ext3 with a free file system size option on the /dev/sda slice

  • swap mount point 2048-Mbyte swap on the /dev/sda slice

Distribution group 

Entire Distribution plus OEM support

Everything

Default Installation

Network Interfaces 

Provisioning interface configured 

Data interface not configured 

Provisioning interface configured 

Data interface not configured 

Provisioning interface configured 

Data interface not configured 

Best Practices for Modifying Default OS Profiles

To provision servers other than Sun Fire V20z servers, you need to modify the default profile, create a new OS profile, or clone an existing OS profile and customize the parameter settings. Each server at your site with different hardware and provisioning requirements requires the creation of a customized OS profile.

The browser interface provides a wizard for creating new OS profiles to limit the complexity of this operation. See To Create an OS Profile for instructions.

Some best practices for modifying default OS profiles are:

ProcedureTo List the Available OS Profiles

This procedure describes how to use the browser interface to list the available OS profiles. The example that follows the procedure provides the command-line equivalent.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Click the System Dashboard tab.

    The Task Shortcuts pane appears on the right side of the page.

  3. Click the Edit List button beneath the OS Profiles list.

    The list of available OS profiles appears.


Example 2–5 Listing Available OS Profiles Through the Command Line

The following example shows how to view all of the OS profiles in the system.


N1-ok> show osprofile all

All available OS profiles appear in the output. See show osprofile in Sun N1 System Manager 1.3 Command Line Reference Manual for details.


ProcedureTo Create an OS Profile

This procedure describes how to use the browser interface's OS Profile wizard. The examples that follow the procedure provide command-line equivalents for creating and customizing OS profiles for the Solaris, Red Hat, and SUSE platforms.

Before You Begin

You must copy an OS distribution before you can create an OS profile. See To Copy an OS Distribution From CDs or a DVD or To Copy an OS Distribution From ISO Files.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Click the System Dashboard tab.

    The Task Shortcuts pane appears on the right side of the page.

  3. Click the New button under the OS Profiles list.

    The Create New Operating System Profile wizard appears.

  4. Use the wizard steps to guide you through the screens.

    Click the Help tab in the left pane of the wizard for detailed information about the entry fields.

  5. To complete the creation of the OS profile, click the Finish button in the wizard.

    The wizard window closes.

  6. To add the profile to the list of profiles shown in the OS Profile Task Shortcuts pane, click the subordinate Edit List button.

    A dialog box appears.

    1. Select the check box for the OS profile and click the OK button.

      The drag-and-drop icon appears in the OS profiles Task Shortcuts list.


Example 2–6 Creating a Solaris OS Profile Through the Command Line

The following example illustrates the commands that are used to create an OS profile for a Solaris OS distribution. The first command creates a Solaris 10 profile that is named S10profile and sets the root password to admin.


N1-ok> create osprofile S10profile rootpassword admin 
description "S10 for host123" os solaris10

The following example command shows how to configure a swap partition with a size of 2048 Mbytes.


N1-ok> add osprofile s10profile partition swap size 2048 device c1t1d0s1 
type swap

The following example command shows how to configure a free ufs partition.


N1-ok> add osprofile s10profile partition / sizeoption free device c1t1ds0 
type ufs

The following example command shows how to add the default Solaris distribution group.


N1-ok> add osprofile s10profile distributiongroup "Entire Distribution 
plus OEM support"

OS profiles that install only the Core System Support distribution group cannot be monitored by using the OS monitoring feature.



Example 2–7 Creating a Red Hat OS Profile Through the Command Line

The following example illustrates the commands that are used to create an OS profile for a Red Hat distribution.


N1-ok> create osprofile RH30profile rootpassword admin 
os RedHat30

The following example command shows how to configure a root partition.


N1-ok> add osprofile RH30profile partition / device sda type ext3 
sizeoption free

The following example command shows how to configure a swap partition.


N1-ok> add osprofile RH30profile partition swap device sda type swap 
size 2048 sizeoption fixed

The following example command shows how to specify the distribution group.


N1-ok> add osprofile RH30profile distributiongroup "Everything"


Example 2–8 Creating a SUSE OS Profile Through the Command Line

The following example illustrates the commands that are used to create an OS profile for a SUSE distribution.


N1-ok> create osprofile default os suse rootpassword admin

The following example command shows how to configure a root partition.


N1-ok> add osprofile default partition / device /dev/sda type ext3 
sizeoption free

The following example command shows how to configure a swap partition.


N1-ok> add osprofile default partition swap device /dev/sda type swap 
size 2048 sizeoption fixed

The following example command shows how to specify the distribution group.


N1-ok> add osprofile default distributiongroup "Default Installation"

Troubleshooting
See Also

To find out how to load the OS profile, see To Load an OS Profile on a Server or a Server Group.

ProcedureTo Clone an Existing OS Profile

The following procedure describes how to clone or copy an existing OS profile. There are two main reasons that you would clone a profile:

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Type the following command:


    N1-ok> create osprofile osprofile-name clone oldprofile
    

    The new OS profile is created. See create osprofile in Sun N1 System Manager 1.3 Command Line Reference Manual

  3. Type the following command:


    N1-ok> show osprofile osprofile-name
    

    The new OS profile appears in the output.

See Also

To find out how to load the OS profile, see To Load an OS Profile on a Server or a Server Group.

ProcedureTo Modify an OS Profile

This procedure describes how to modify the scripts, partitions, updates, and distribution groups that are configured for an OS profile.


Note –

An OS profile that is currently being deployed cannot be modified.


Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Modify an OS profile by performing one of the following actions:

  3. View the new OS profile details.


    N1-ok> show osprofile osprofile-name
    

    The modified OS profile information appears in the output.


Example 2–9 Modifying a Solaris 10 OS Profile Through the Command Line

This example shows how to use a flash archive and a post-installation script by modifying the solaris_ver10 OS profile.

For this example, assume that you have created the following script in a directory named /scripts on the management serverdirectory.

This sample script name is add_host.sh and the script adds a host to the /etc/hosts file on a managed server.


echo "129.10.12.101 myhost" >>/a/etc/hosts

Note that the root file system on the provisioned server is /a during the post installation time.

This example also assumes that you have created a flash archive file called archive1.flar and that you have completed the steps in To Copy a Flash Archive to the Management Server.

The following example shows how to add the script to the OS profile.


N1-ok> add osprofile solaris_ver10 script 
/scripts/add_host.sh type post

The following example shows how to set up the OS profile to use the flash archive.


N1-ok> set osprofile solaris_ver10 flar /jumpstart/Flash/archive1.flar

See Also

To find out how to load the modified OS profile, see To Load an OS Profile on a Server or a Server Group.

ProcedureTo Modify the Default Solaris OS Profile for a Sun Fire V40z or a SPARC V440 Server

This procedure describes how to modify the Solaris OS profile that is created by default. The following modification is required for successful installation of the default Solaris OS profile on a Sun Fire V40z or a SPARC V440 server.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Clone the default profile.


    N1-ok> create osprofile sol10v40z clone sol10
    
  3. Remove the root partition.


    N1-ok> remove osprofile sol10v40z partition /
    
  4. Remove the swap partition.


    N1-ok> remove osprofile sol10v40z partition swap
    
  5. Add new root parameters.


    N1-ok> add osprofile sol10v40z partition / device c1t0d0s0 sizeoption free
     type ufs
    
  6. Add new swap parameters.


    N1-ok> add osprofile sol10v40z partition swap device c1t0d0s1 size 2000
     type swap sizeoption fixed
    
See Also

To find out how to load the modified OS profile, see To Load an OS Profile on a Server or a Server Group.

ProcedureTo Modify a Solaris 9 OS Profile for a Sun Fire V20z Server With a K2.0 Motherboard

This procedure describes how to create and add a script to your Solaris OS profile. This script installs the Broadcom 5704 NIC driver needed for Solaris 9 x86 to recognize the NIC Ethernet interface on a Sun Fire V20z server with a K2.0 motherboard. Earlier versions of the Sun Fire V20z server use the K1.0 motherboard. Newer versions use the K2.0 motherboard.


Note –

This patch is needed for K2.0 motherboards but can also be used on K1.0 motherboards without negative consequences.


Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Type the following command:


    % /opt/sun/n1gc/bin/n1sh show os
    

    The list of available OS distributions appears.

  3. Note down the ID for the Solaris 9 distribution.

    You use this ID, which is in fact the DISTRO_ID of the OS, in the next step.

  4. Type the following command:


    # mkdir /js/DISTRO_ID/patch
    

    Here, distro_id is the ID you noted previously. A patch directory is created for the Solaris 9 distribution.

  5. Download the 116666-04 patch from http://sunsolve.sun.com to the /js/DISTRO_ID/patch directory.

  6. Change to the /js/DISTRO_ID/patch directory.


    # cd /js/DISTRO_ID/patch
    
  7. Unzip the patch file.


    # unzip 116666-04.zip
    
  8. Type the following command:


    # mkdir /js/scripts
    
  9. In the /js/scripts directory, create a script called patch_sol9_k2.sh that includes the following three lines:


    #!/bin/sh
    echo "Adding patch for bge devices."
    patchadd -R /a -M /cdrom/patch 116666-04

    Note –

    Ensure the script is executable. You can use the chmod 775 patch_sol9_k2.sh command.


  10. Add the script to the Solaris 9 OS profile.


    N1-ok> add osprofile osprofile script /js/scripts/patch_sol9_k2.sh type post 
    

Example 2–10 Adding a Script to a Solaris OS Profile

This example shows how to add a script to an OS profile. The type attribute specifies that the script is to be run after the installation.


N1-ok> add osprofile sol9K2 script /js/scripts/patch_sol9_k2.sh 
type post

Next Steps

To load the modified Solaris OS profile, see To Load an OS Profile on a Server or a Server Group.

ProcedureTo Delete an OS Profile


Note –

You cannot delete an OS profile when it is being deployed. Wait until the deployment job finishes, then delete the OS profile.


Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Type the following command:


    N1-ok> delete osprofile osprofile-name
    

    The OS profile is deleted from the management server.

  3. Type the following command:


    N1-ok> show osprofile all
    

    The deleted OS profile should not appear in the output.

Installing the UNIX OS on Managed Servers

This section describes the following tasks:

Deploying OS Profiles

OS profile installations can be customized to fit your provisioning and network needs.

To deploy default or custom OS profiles, use the load command with the server or group keyword and the osprofile subcommand.

To add the base management and OS monitoring features that support updating and patching, use the feature attribute with the osmonitor value when you issue the load command. The feature attribute of the load command enables you to automatically configure monitoring when you load the OS profile.

For syntax and parameter details, type help load server, help load group, and help add server at the N1–ok command line.


Note –

Most managed servers boot from their default network boot interface automatically as the final step of a load operation. However, you must boot manually any managed server that was discovered through the OS or manual discovery processes. The N1 System Manager is not able to boot automatically these systems from the network. See To Initiate Network Boot Manually for instructions.


The following table provides a quick reference of all the parameters that are available for the load group and load server commands.


Note –

Before you attempt any Solaris OS on x86 platform deployments by using the N1 System Manager, you must ensure that the nameserver and search values are correctly configured at the operating system level on your management server. Otherwise, the installations will fail.

For more details, see the resolv.conf(5) man page. You need root user access on your management server to modify these settings.


Table 2–2 OS Profile Installation Parameters

Parameters 

Red Hat or SUSE OS 

Solaris OS 

Multiple Servers 

Single Server 

Notes 

bootip

√ (R) 

 

√ 

√ 

Also known as provisionable IP. 

ip

√ 

√ (R) 

√ 

√ 

Required if networktype is set to static.

networktype

√ (R) 

√ (R) 

√ 

√ 

Must be set to static for Solaris installation.

bootgateway

√ 

 

√ 

√ 

 

boothostname

√ 

   

√ 

 

bootnameserver

√ 

 

√ 

√ 

 

bootnetmask

√ 

 

√ 

√ 

Default is set to the provisioning network interface that is specified using the n1smconfig utility.

bootnetworkdevice

√ 

√ 

√ 

√ 

 

bootpath

 

√ 

 

√ 

 

console

√ 

√ 

 

√ 

 

consolebaud

√ 

√ 

 

√ 

 

kernelparameter

√ 

 

√ 

√ 

 

domainname

 

√ 

√ 

√ 

If domainname is not specified, a default will be configured

gateway

√ 

√ 

√ 

√ 

 

hostname

√ 

√ 

 

√ 

 

nameserver

√ 

√ 

√ 

√ 

 

netmask

√ 

√ 

√ 

√ 

Default is set to the provisioning network interface that is specified using the n1smconfig utility.

networkdevice

√ 

 

√ 

√ 

The Linux default is eth0. The Primary network interface is the default for Solaris installations.

(R) = Required 

√ = Configurable 

ProcedureTo Load an OS Profile on a Server or a Server Group

The following procedure describes how to load an OS profile on a server or a server group by using the browser interface. Although you can load an OS profile from the command-line interface, it is easier to load the profile from the browser interface. The examples that follow the procedure provide command-line equivalents.


Caution – Caution –

You cannot uninstall an OS profile. However, you can reprovision a server by loading another OS profile on a server that is already provisioned.


Before You Begin
Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Browser Interface in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. (Optional) Modify the OS profile to use a flash archive and a post-installation script.


    N1-ok> set osprofile osprofile-name flar flar
    

    The flar attribute value is the full path and flash archive file name, for example, /jumpstart/Flash/archive1.flar.


    N1-ok> add osprofile osprofile-name script script type type
    

    The script attribute value is the full path and script file name, for example, /etc/sysconfig/network-scripts/ifcfg-eth1.

    The type attribute specifies the time when the custom script will run during the installation. Valid values for the type attribute are:

    • pre – Run the script before the installation (for example, drivers).

    • post – Run the script after the installation.

    • postnochroot (Red Hat Linux only) – Run the script after the installation. The script does not have to be run as superuser (root).

    The OS profile is modified to use the designated post-installation script and the flash archive file.

  3. Navigate to the table that contains the server or the server group by performing one of the following actions:

    • Choose All Servers from the View Selector menu.

      The Servers table appears.

    • Choose Servers By Group from the View Selector menu.

      The Server Groups table appears.

  4. Drag and drop the OS profile icon from the Task Shortcuts pane to the server or the server group.

    The Load OS Profile wizard appears.

  5. Use the wizard steps to guide you through the screens.


    Note –

    Click the Help tab in the left pane of the wizard for detailed information about the entry fields.

    When loading an OS profile on a managed server that was discovered through the OS or manual discovery processes, select the “Enable Manual Net Boot” option on the appropriate step in the wizard. The N1 System Manager is not able to boot these systems automatically from the network, and you must tell N1 System Manager to enable you to initiate the boot manually.


  6. To begin loading the OS profile on the selected servers, click the Finish button in the wizard.

    The wizard window closes and a job ID appears in the Command Line pane.

  7. Click the Jobs tab.

    The Jobs table appears with information about your Load OS job.


    Note –

    The Load OS job will not complete until a final reboot occurs.


  8. Save the options that you used to load the OS profile as a note in case you need to restore the server sometime in the future.

    See Modifying Managed Server and Group Information in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.


Example 2–11 Loading a Solaris OS Profile on a Server Through the Command Line

The following command provides an example of the syntax for loading an OS profile and supporting the OS monitoring feature on a server. See Deploying OS Profiles for the complete list of available attributes and supported values.

The following example shows you how to install a Solaris OS profile on a server by using the load command. The feature parameter specifies that the OS monitoring feature is installed. See Adding and Upgrading Base Management and OS Monitoring Features in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.


N1-ok> load server 192.168.8.9 osprofile S10profile \
networktype static ip 192.168.18.19 feature osmonitor agentssh root/rootpassword

The networktype attribute must be set to static for Solaris profile installations. See Table 2–2 and load server in Sun N1 System Manager 1.3 Command Line Reference Manual for details.

If the managed server to which you intend to install the OS was discovered manually or using OS-based discovery, add manualnetboot=”true” on the load command.

Use the show job command to view the results.


N1-ok> show job target=192.168.8.9


Example 2–12 Loading a Solaris OS Profile on a Server Group Through the Command Line

This example of load command syntax installs an OS profile on a group of servers, excluding specified servers with the excludeserver attribute. The SSH user account that is used in the add server feature command must have root privileges on the remote machine.

This command adds base management or OS monitoring feature support. See Adding and Upgrading Base Management and OS Monitoring Features in Sun N1 System Manager 1.3 Discovery and Administration Guide for detailed information about supported management features.

The following example shows you how to install a Solaris OS profile on a server group by using the load command.


N1-ok> load group devgroup osprofile S10profile \
excludeserver=server1 networktype static ip 192.186.8.8-192.186.8.9
Job "14" started.

The networktype attribute must be set to static for Solaris profile installations. See Table 2–2 and load server in Sun N1 System Manager 1.3 Command Line Reference Manual for details.

The excludeserver=server1 option specifies that the OS profile is installed on all managed server within the devgroup server group except server1.

If the managed servers to which you intend to install the OS were discovered manually or using OS-based discovery, add manualnetboot=”true” on the load command.

The following command shows you how to view the job results.


N1-ok> show job 14


Example 2–13 Loading a Linux OS Profile on a Server Using a Static IP Address

The following command provides an example of the syntax for loading an OS profile and supporting the OS monitoring feature on a server. See Deploying OS Profiles for the complete list of available attributes and supported values.

The following example shows you how to install a Linux OS profile on a server. The feature parameter specifies that the OS monitoring feature is installed. See Adding and Upgrading Base Management and OS Monitoring Features in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.


N1-ok> load server 192.168.8.9 osprofile S10profile networktype static \
ip 192.168.18.19 bootip 192.168.28.19 feature osmonitor agentssh root/rootpassword

In this example, the networktype attribute is set to static. For an example that uses DHCP instead, see Example 2–15.

If the managed server to which you intend to install the OS was discovered manually or using OS-based discovery, add manualnetboot=”true” on the load command.

Use the show job command to view the results.


N1-ok> show job target=192.168.8.9


Example 2–14 Loading a Linux OS Profile on a Server Group

The following example shows you how to install a Linux OS profile on a server group by using the load command.


N1-ok> load group devgroup osprofile RH3profile 
ip 192.186.77.1-192.186.77-2 bootip 192.186.8.8-192.186.8.9 networktype static
Job "15" started

The following command shows you how to view the job results.


N1-ok> show job 15


Example 2–15 Loading a Linux OS Profile on a Server Using DHCP

The following example shows you how to install a Linux OS profile on a server by using the load command.


N1-ok> load server 192.168.8.9 osprofile RH3profile 
bootip 192.168.8.9 networktype dhcp

The bootip attribute is only used for Linux profile installations.

Setting the networktype attribute to DHCP means that the server uses DHCP to get its provisioning network IP address. If the system reboots, any added management features will break. In this case, use the set server agentip command to modify the server's agent IP address. See To Modify the Agent IP for a Server in Sun N1 System Manager 1.3 Discovery and Administration Guide for more information.

The following command shows you how to view the job results.


N1-ok> show job target=192.168.8.9


Example 2–16 Loading a Red Hat Enterprise Linux 4 OS Profile on a Sun Fire X2100 Server

This example shows you how to load a Red Hat Enterprise Linux 4 OS profile onto a Sun Fire X2100 server using static IP network configuration.


N1-ok> load server server1 osprofile RHEL4profile bootip 192.168.8.8
networktype static ip 192.168.8.8 bootnetworkdevice eth1 networkdevice eth1

This example shows you how to load a Red Hat Enterprise Linux 4 OS profile onto a Sun Fire X2100 server using DHCP network configuration.


N1-ok> load server server34 osprofile rh4u1es-64-min bootip=10.0.101.34
networktype=dhcp bootnetworkdevice=eth1 networkdevice=eth1

The values bootnetworkdevice and networkdevice are only required for Red Hat Linux 4 on Sun Fire X2100 servers.



Example 2–17 Loading a Solaris 10 x86 OS Profile on a Sun Fire X2100 Server

When loading Solaris 10 x86 to a Sun Fire X2100 server , you need to first add a script to the profile. This script will disable the loading of the bge driver in /etc/system.

If your management server is running Linux, use the following command to add the script to the profile:


N1-ok> add osprofile profile_name script 
/opt/sun/scs/data/allstart/scripts/solaris_bge_disable.sh type=post

If your management server is running the Solaris OS, use the following command to add the script to the profile:


N1-ok> add osprofile profile_name script
/opt/SUNWscs/data/allstart/scripts/solaris_bge_disable.sh type=post

The service processor will become inaccessible while the machine is being provisioned.


Troubleshooting

If a value is not specified for the bootnetmask or netmask parameters during the load operation, the netmask will default to the provisioning network interface that is specified in the n1smconfig utility. See To Configure the N1 System Manager in Sun N1 System Manager 1.3 Installation and Configuration Guide.

If the deployment fails, see the topics in OS Distributions and Deployment in Sun N1 System Manager 1.3 Troubleshooting Guide for possible solutions.

Next Steps

To enable remote connectivity, OS resource monitoring, package deployment, and inventory management, you must add the OS monitoring feature on each server. See To Add the OS Monitoring Feature in Sun N1 System Manager 1.3 Discovery and Administration Guide.

ProcedureTo Initiate Network Boot Manually

Most managed servers boot from their default network boot interface automatically as the final step of a load operation. However, you must manually boot any managed server that was discovered through the OS or manual discovery processes. The N1 System Manager is not able to boot these systems automatically from the network.

This procedure describes the steps that are required to ensure that servers do not boot from their default network boot interface after a load operation. Once you follow these steps, you will need to manually boot the managed server when the load operation completes.

Steps
  1. Access the N1 System Manager command line on the management server.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. To install a given OS profile on a managed server and not boot that server automatically, set the manualnetboot option to true.

    For a single managed server, use the following form of the load server command with the manualnetboot option:


    N1-ok> load server server-name osprofile osprofile-name ip ip-address networktype static manualnetboot="true"
    

    For a group of managed servers, use the following form of the load group command:


    N1-ok> load group group-name osprofile osprofile-name ip ip-addresss networktype static manualnetboot="true"
    

    Tip –

    If you load the OS profile through the browser interface, check the “Enable Manual Net Boot” option in the wizard.