Skip Navigation Links | |
Exit Print View | |
Installing Oracle Solaris 11 Systems Oracle Solaris 11 Information Library |
Part I Oracle Solaris 11 Installation Options
1. Overview of Installation Options
Part II Installing Using Installation Media
2. Preparing for the Installation
5. Automated Installations That Boot From Media
6. Unconfiguring or Reconfiguring an Oracle Solaris instance
Part III Installing Using an Install Server
7. Automated Installation of Multiple Clients
8. Setting Up an Install Server
10. Provisioning the Client System
11. Configuring the Client System
12. Installing and Configuring Zones
13. Running a Custom Script During First Boot
Creating a Script To Run at First Boot
Installing the First Boot Package on the AI Client
How To Install the IPS Package
14. Setting Up Oracle Configuration Manager For Use By AI Client Systems
Create an IPS package that contains:
The service manifest file from Creating an SMF Manifest File.
The first-boot script from Creating a Script To Run at First Boot.
Any files needed by the script that cannot be provided from another location such as the install server.
In this example, the service manifest is installed into /lib/svc/manifest/site, and the first-boot script is installed into /opt/site.
$ mkdir -p proto/lib/svc/manifest/site $ mkdir -p proto/opt/site $ cp first-boot-script-svc-manifest.xml proto/lib/svc/manifest/site $ cp first-boot-script.sh proto/opt/site
Create the following file named first-boot-script.p5m.
set name=pkg.fmri value=first-boot-script@1.0,5.11 set name=pkg.summary value="AI first boot script" set name=pkg.description value="Script that runs at first boot after AI installation" file path=lib/svc/manifest/site/first-boot-script-svc-manifest.xml mode=0444 \ owner=root group=sys dir path=opt/site mode=0755 owner=root group=sys file path=opt/site/first-boot-script.sh mode=0555 owner=root group=sys
Depending on what your first-boot script does, you might need to specify dependencies. If you modify this manifest, use pkglint to verify the new manifest is correct. You can ignore warnings.
# pkglint first-boot-script.p5m
This example creates the repository in the local directory, with firstboot as the publisher.
Note - Create the repository in a directory that is accessible by the AI clients at installation time.
$ pkgrepo create firstbootrepo # pkgrepo -s firstbootrepo add-publisher firstboot
# pkgsend publish -d ./proto -s ./firstbootrepo first-boot-script.p5m pkg://firstboot/first-boot-script@1.0,5.11:20111101T024901Z PUBLISHED
Clients can install the package from the firstbootrepo repository. The firstboot publisher with firstbootrepo origin is defined in the AI manifest as shown in the next section.
List the package to verify that the package is available.
$ pkg list -g ./firstbootrepo first-boot-script NAME (PUBLISHER) VERSION IFO first-boot-script (firstboot) 1.0 ---
You might want to try a test installation of the package. The -n option means do not actually install the package.
# pkg set-publisher -g ./firstbootrepo firstboot # pkg install -nv first-boot-script Packages to install: 1 Estimated space avaialble: 111.26 GB Estimated space to be consumed: 72.42 MB Create boot environment: No Create backup boot environment: No Rebuild boot archive: No Changed packages: firstboot first-boot-script None -> 1.0,5.11:20111101T024901Z
Next Steps
See Copying and Creating Oracle Solaris 11 Package Repositories for instructions to make the new repository accessible to client systems through either NFS sharing or HTTP.