This section describes the following tasks:
OS profiles specify the following information:
OS distribution to install
Default language and time zone for the installed host
Flash archive file to use
Additional packages to install with the distribution
Configuration information for partitions
Custom installation scripts to run
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.
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
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:
To increase the speed of OS configuration, modify OS profiles to use flash archives. See Example 2–9 for examples of how to modify a default profile and To Copy a Flash Archive to the Management Server for instructions.
To automatically configure the data network interface after OS profile installation, use the add osprofile command to add a script. See Step 4 in To Provision the Solaris 10 OS.
Modify the default OS profile for a server other than a V20z server, remember to remove the existing partitions and add new partition information that is appropriate for the server model. See To Modify the Default Solaris OS Profile for a Sun Fire V40z or a SPARC V440 Server for instructions.
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.
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.
Click the System Dashboard tab.
The Task Shortcuts pane appears on the right side of the page.
Click the Edit List button beneath the OS Profiles list.
The list of available OS profiles appears.
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.
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.
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.
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.
Click the System Dashboard tab.
The Task Shortcuts pane appears on the right side of the page.
Click the New button under the OS Profiles list.
The Create New Operating System Profile wizard appears.
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.
To complete the creation of the OS profile, click the Finish button in the wizard.
The wizard window closes.
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.
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.
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" |
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" |
To Modify the Default Solaris OS Profile for a Sun Fire V40z or a SPARC V440 Server
To Modify a Solaris 9 OS Profile for a Sun Fire V20z Server With a K2.0 Motherboard
To find out how to load the OS profile, see To Load an OS Profile on a Server or a Server Group.
The following procedure describes how to clone or copy an existing OS profile. There are two main reasons that you would clone a profile:
You must clone an OS profile and modify it to fit uniquely qualified hardware.
You might clone an existing OS profile if you need to modify the profile, but cannot modify it because the profile is being installed on a managed server.
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.
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
Type the following command:
N1-ok> show osprofile osprofile-name |
The new OS profile appears in the output.
To find out how to load the OS profile, see To Load an OS Profile on a Server or a Server Group.
This procedure describes how to modify the scripts, partitions, updates, and distribution groups that are configured for an OS profile.
An OS profile that is currently being deployed cannot be modified.
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.
Modify an OS profile by performing one of the following actions:
Add new OS profile attributes.
N1-ok> add osprofile osprofile-name [configuration-attributes] |
See add osprofile in Sun N1 System Manager 1.3 Command Line Reference Manual for details.
Remove existing OS profile attributes.
N1-ok> remove osprofile osprofile-name [configuration-attributes] |
See remove osprofile in Sun N1 System Manager 1.3 Command Line Reference Manual for details.
Change existing OS profile parameters.
N1-ok> set osprofile osprofile-name [configuration-attributes] |
See set osprofile in Sun N1 System Manager 1.3 Command Line Reference Manual for details.
View the new OS profile details.
N1-ok> show osprofile osprofile-name |
The modified OS profile information appears in the output.
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 |
To find out how to load the modified OS profile, see To Load an OS Profile on a Server or a Server Group.
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.
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.
Clone the default profile.
N1-ok> create osprofile sol10v40z clone sol10 |
Remove the root partition.
N1-ok> remove osprofile sol10v40z partition / |
Remove the swap partition.
N1-ok> remove osprofile sol10v40z partition swap |
Add new root parameters.
N1-ok> add osprofile sol10v40z partition / device c1t0d0s0 sizeoption free type ufs |
Add new swap parameters.
N1-ok> add osprofile sol10v40z partition swap device c1t0d0s1 size 2000 type swap sizeoption fixed |
To find out how to load the modified OS profile, see To Load an OS Profile on a Server or a Server Group.
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.
This patch is needed for K2.0 motherboards but can also be used on K1.0 motherboards without negative consequences.
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.
Type the following command:
% /opt/sun/n1gc/bin/n1sh show os |
The list of available OS distributions appears.
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.
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.
Download the 116666-04 patch from http://sunsolve.sun.com to the /js/DISTRO_ID/patch directory.
Change to the /js/DISTRO_ID/patch directory.
# cd /js/DISTRO_ID/patch |
Unzip the patch file.
# unzip 116666-04.zip |
Type the following command:
# mkdir /js/scripts |
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 |
Ensure the script is executable. You can use the chmod 775 patch_sol9_k2.sh command.
Add the script to the Solaris 9 OS profile.
N1-ok> add osprofile osprofile script /js/scripts/patch_sol9_k2.sh type post |
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 |
To load the modified Solaris OS profile, see To Load an OS Profile on a Server or a Server Group.
You cannot delete an OS profile when it is being deployed. Wait until the deployment job finishes, then delete the OS profile.
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.
Type the following command:
N1-ok> delete osprofile osprofile-name |
The OS profile is deleted from the management server.
Type the following command:
N1-ok> show osprofile all |
The deleted OS profile should not appear in the output.