This procedure describes how to copy an OS update to the N1 System Manager. Once an OS update is copied, you can use the command line or the browser interface to install the OS update on a provisionable server.
The following graphic illustrates the use of the browser user interface for confirming that an OS update has been successful.
Ensure that the OS update is available to the management server on the local file system, a network accessible file, or a web site. You can copy OS updates in the following formats:
*.rpm – Linux RPM
*.pkg or *.tar – Solaris package
*.zip – Solaris patch.
The *.tar file must match the top-level directory name after the tar expansion. For example, if the tar file is SUNWstade.tar, the top-level directory of the tar expansion must be SUNWstade.
Log in to the N1 System Manager.
See To Access the N1 System Manager Command Line for details.
Copy the OS update to the N1 System Manager.
N1-ok> create update update file file ostype ostype [adminfile adminfile] [responsefile responsefile] [installscriptfile installscriptfile] |
Valid ostype values are in the following list:
redhat-es3 – Red Hat Enterprise Linux ES 3.0
redhat-ws3 – Red Hat Enterprise Linux WS 3.0
redhat-as3 – Red Hat Enterprise Linux, AS 3.0
redhat-as4 – Red Hat Enterprise Linux, AS 4.0
redhat-es4 – Red Hat Enterprise Linux, ES 4.0
redhat-ws4 – Red Hat Enterprise Linux, WS 4.0
redhat-es3-64 – Red Hat Enterprise Linux ES 3.0, 64-bit
redhat-ws3-64 – Red Hat Enterprise Linux WS 3.0, 64-bit
redhat-as3-64 – Red Hat Enterprise Linux, AS 3.0, 64-bit
redhat-as4-64 – Red Hat Enterprise Linux, AS 4.0, 64-bit
redhat-es4-64 – Red Hat Enterprise Linux, ES 4.0, 64-bit
redhat-ws4-64 – Red Hat Enterprise Linux, WS 4.0, 64-bit
solaris9x86 – Solaris x86 Version 9 Update 7
solaris10x86 – Solaris x86 Version 10
solaris9sparc – Solaris SPARC Version 9 Update 7
solaris10sparc – Solaris SPARC Version 10
suse-es9 – SUSE LINUX Enterprise Server 9
suse-es9-64 –SUSE LINUX Enterprise Server 9, 64-bit
suse-pro92 – SUSE Professional Edition 9.2
suse-pro92-64 – SUSE Professional Edition 9.2, 64-bit
suse-pro93 – SUSE Professional Edition 9.3
suse-pro93-64 – SUSE Professional Edition 9.3, 64-bit
See create update in Sun N1 System Manager 1.2 Command Line Reference Manual for details.
The following example command shows how to create an OS update named RH3_update where the ostype is Red Hat Enterprise Linux, AS 3.0 and the location of the update file is /tmp/test-i386.rpm.
N1-ok> create update RH3_update file /tmp/test-i386.rpm ostype=redhat-as3 |
This example shows an executable Bourne (/bin/sh) shell package installation script.
#!/bin/sh echo "This is from the install script:" echo "pkgadd -n -a /tmp/combo-pkgs.pkg.admin -d /tmp/combo-pkgs.pkg SUNWtest1 SUNWtest2" pkgadd -n -a /tmp/combo-pkgs.pkg.admin -d /tmp/combo-pkgs.pkg SUNWtest1 SUNWtest2 exit $?
The following sample command shows how to associate the package installation script with the OS update files. This example assumes that you have copied the script to the management server's /tmp directory with the name install.sh.
N1-ok> create update combo file /tmp/combo-pkgs.pkg ostype solaris10x86 adminfile /tmp/combo-pkgs.pkg.admin installscriptfile /tmp/install.sh |
In this example, /tmp/combo-pkgs.pkg contains two Solaris packages in the datastream format.
The script and the source files for the OS update are copied to the target server when the create os command is issued. The script file is executed by using the Bourne shell with the full path to the package file as the sole argument. If the adminfile subcommand is not specified, the default admin file is also copied to the target server and is renamed with .admin appended to the source file name.
This example shows an executable Bourne (/bin/sh) shell patch installation script.
As a best practice, any installation script that you use should create a new subdirectory, for example, in the /tmp directory. The script should then move or extract the OS update .tar file into that subdirectory. After the update is complete, the script should remove this subdirectory.
By default, the script executes in the invoker's home directory. In this case, this is the root directory. In addition, the installation script should refer to the full path to the package source files to avoid conflicts.
#!/bin/sh mkdir /tmp/layer cd /tmp/layer echo "untar the source:" tar -xvf /tmp/mypatches.tar echo "let's install mypatches:" patchadd -M /tmp/layer 117448-01 117466-01 exit $?
The following sample command shows how to associate the patch installation script with the OS update files. This example assumes that you have copied the script to the management server's /tmp directory with the name install.sh.
N1-ok> create update mypatches file /tmp/mypatches.tar ostype solaris10x86 installscriptfile /tmp/install.sh |
In this example, /tmp/mypatches.tar contains the Solaris patches 117448–01 and 117466–01 in the datastream format.
The script and the source files for the OS update are copied to the target server when the create os command is issued. The script file is executed by using the Bourne shell with the full path to the package file as the sole argument.
If you use the installscriptfile parameter when creating an OS update, consider loading the OS update on a single server to test whether the script is working correctly before loading on a large server group.
Refer to OS Update Creation Failures for solutions to common errors.
To find out how to load an OS update, see To Load an OS Update on a Server or a Server Group