Skip Navigation Links | |
Exit Print View | |
Installing Oracle Solaris 11.1 Systems Oracle Solaris 11.1 Information Library |
Part I Oracle Solaris 11.1 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
Implementing Run Once at First Boot Controls
How to Ensure One Run at First Boot
Creating a Script to Run at First Boot
Using the Manifest Creation Tool
Customizing the Generated Manifest
Creating an IPS Package for the Script and Service
How to Create and Publish the IPS Package
Installing the First-Boot Package on the AI Client
How to Install the IPS Package
15. Troubleshooting Automated Installations
Part IV Performing Related Tasks
A. Working With Oracle Configuration Manager
To test the service before you test an AI installation, you can simply install the package on a test system and reboot that test system.
$ pfexec pkg install first-boot-script Packages to install: 1 Create boot environment: No Create backup boot environment: No DOWNLOAD PKGS FILES XFER (MB) SPEED Completed 1/1 2/2 0.0/0.0 0B/s PHASE ITEMS Installing new actions 7/7 Updating package state database Done Updating image state Done Creating fast lookup database Done Reading search index Done $ pkg list first-boot-script NAME (PUBLISHER) VERSION IFO first-boot-script (firstboot) 1.0-0 i-- $ pkg info first-boot-script Name: first-boot-script Summary: AI first-boot script Description: Script that runs at first boot after AI installation Category: System/Administration and Configuration State: Installed Publisher: firstboot Version: 1.0 Build Release: 5.11 Branch: 0 Packaging Date: July 23, 2012 02:50:31 PM Size: 3.89 kB FMRI: pkg://firstboot/first-boot-script@1.0,5.11-0:20120723T145031Z
Reboot the test system. If the script created a new boot environment as shown above, be sure to boot into that new boot environment.
Check that the script is in the /opt/site directory and the effects of the script are correct.
Check the state of the service. If the script finished and exited correctly, the service should be in the disabled state.
$ svcs first-boot-script-svc STATE STIME FMRI disabled 8:24:16 svc:/site/first-boot-script-svc:default
Use one of the following commands to check the value of the completed property:
$ svcprop first-boot-script-svc:default config/completed boolean true $ svcprop -p config/completed first-boot-script-svc:default true
If you want to review the service log file, use the following command to find the location of the log file:
$ svcs -x first-boot-script-svc svc:/site/first-boot-script-svc:default (?) State: disabled since July 23, 2012 08:24:16 AM PDT Reason: Temporarily disabled by service method: "Configuration completed." See: http://support.oracle.com/msg/SMF-8000-1S See: /var/svc/log/site-first-boot-script-svc:default.log Impact: This service is not running.
The log file contains the following information:
[ Jul 23 08:22:57 Enabled. ] [ Jul 23 08:24:14 Executing start method ("/opt/site/first-boot-script.sh"). ] [ Jul 23 08:24:16 Method "start" exited with status 101. ] [ Jul 23 08:24:16 "start" method requested temporary disable: "Configuration completed" ] [ Jul 23 08:24:16 Rereading configuration. ]
If you change the script or the service manifest, use this procedure to install the update.
$ cp first-boot-script-svc-manifest.xml proto/lib/svc/manifest/site $ cp first-boot-script.sh proto/opt/site
In the package manifest, change the value of the pkg.fmri attribute to the following, for example:
first-boot-script@1.0,5.11-0.1
Publish the new version of the package to the repository.
$ pkgsend publish -d ./proto -s ./firstbootrepo first-boot-script.p5m pkg://firstboot/first-boot-script@1.0,5.11-0.1:20120723T231948Z PUBLISHED
Use the pkg list -af command to make sure you can access the new version. You might need to use the pkg refresh firstboot command to update the package list. Use the pkg update command to update the package.