Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Do not modify the configuration of the master restarter service, svc:/system/svc/restarter:default, except to configure logging levels as described in Specifying the Amount of Startup Messaging.

Before you use the svccfg delcust command, use the svccfg listcust command with the same options. The delcust subcommand can potentially remove all administrative customizations on a service. Use the listcust subcommand to verify which customizations will be deleted by the delcust subcommand.

...

Code Block
svc.configd: smf(5) database integrity check of:

    /etc/svc/repository.db

  failed.  The database might be damaged or a media error might have
  prevented it from being verified.  Additional information useful to
  your service provider is in:

    /system/volatile/db_errors

  The system will not be able to boot until you have restored a working
  database.  svc.startd(1M) will provide a sulogin(1M) prompt for recovery
  purposes.  The command:

    /lib/svc/bin/restore_repository

  can be run to restore a backup version of your repository. See
  http://support.oracle.com/msg/SMF-8000-MY for more information.

How to Restore a Repository From Backup.

The service configuration repository can become corrupted for any of the following reasons:

...

  1. Log in.

    Using the root password, log in either remotely or at the sulogin prompt.

  2. Run the repository restore command:

    Code Block
    # /lib/svc/bin/restore_repository

    Running this command takes you through the necessary steps to restore a non-corrupt backup. SMF automatically takes backups of the repository as described in Repository Backups.

    SMF maintains persistent and non-persistent configuration data. See Service Configuration Repository for descriptions of these two repositories. The restore_repository command only restores the persistent repository. The restore_repository command also reboots the system, which destroys the non-persistent configuration data. The non-persistent data is runtime data that is not needed across system reboot.

    When started, the /lib/svc/bin/restore_repository command displays a message similar to the following:

    Code Block
    See http://support.oracle.com/msg/SMF-8000-MY for more information on the use of
    this script to restore backup copies of the smf(5) repository.
    
    If there are any problems which need human intervention, this script will
    give instructions and then exit back to your shell. 

    After the root ( /) file system is mounted with write permissions, or if the system is a local zone, you are prompted to select the repository backup to restore:

    Code Block
    The following backups of /etc/svc/repository.db exists, from
    oldest to newest:
    
    ... list of backups ...

    Backups are given names, based on type and the time the backup was taken. Backups beginning with boot are completed before the first change is made to the repository after system boot. Backups beginning with manifest_import are completed after svc:/system/manifest-import:default finishes its process. The time of the backup is given in YYYYMMDD_HHMMSS format.

  3. Enter the appropriate response.

    Typically, the most recent backup option is selected.

    Code Block
    Please enter either a specific backup repository from the above list to
    restore it, or one of the following choices:
    
            CHOICE            ACTION
            ----------------  ----------------------------------------------
            boot              restore the most recent post-boot backup
            manifest_import   restore the most recent manifest_import backup
            -seed-            restore the initial starting repository  (All
                                customizations will be lost, including those
                                made by the install/upgrade process.)
            -quit-            cancel script and quit
    
    Enter response [boot]:

    If you press Enter without specifying a backup to restore, the default response, enclosed in [] is selected. Selecting -quit- exits the restore_repository script, returning you to your shell prompt.

...

By default, all services for which the value of the general/enabled property is true are started at system boot. To change the milestone to which to boot a system, use one of the following methods. The value of milestone can be the FMRI of a milestone service or a keyword as shown in Table A–2.

  • When booting a SPARC system, specify the -m option to the boot command at the ok prompt. See the -m option in the kernel (1M) man page.

    Code Block
    ok boot -m milestone=milestone
  • When booting an x86 system, edit the GRUB menu to specify the -m option. See Adding Kernel Arguments by Editing the GRUB Menu at Boot Time in Booting and Shutting Down Oracle Solaris 11.2 Systems and the -m option in the kernel (1M) man page.

  • Prior to rebooting a system, use the svcadm milestone command with the -d option. Note that with or without the -d option, this command restricts and restores running services immediately. With the -d option, the command also makes the specified milestone the default boot milestone. This new default is persistent across reboots.

    Code Block
    $ svcadm milestone -d milestone

    This command does not change the current run level of the system. To change the current run level of the system, use the init command.

    If you specify the -s option, svcadm changes the milestone and then waits for the transition to the specified milestone to complete before returning. The svcadm command returns when all instances have transitioned to the state necessary to reach the specified milestone or when it determines that administrator intervention is required to make a transition. Use the -T option with the -s option to specify an upper bound in seconds to complete the milestone change operation or return.

The following table describes SMF boot milestones, including any corresponding Oracle Solaris run level. A system’s run level defines what services and resources are available to users. A system can be in only one run level at a time. For information about run levels,see How Run Levels Work in Booting and Shutting Down Oracle Solaris 11.2 Systems , the inittab (4) man page, and the /etc/init.d/README file. For more information about SMF boot milestones, see the milestone subcommand in the svcadm (1M) man page.

Anchor
Table-A-2
Table-A-2
Table A-2  SMF Boot Milestones and Corresponding Run Levels

SMF Milestone FMRI or Keyword

Corresponding Run Level

Description

none

The none keyword represents a milestone where no services are running except for the master restarter. When none is specified, all services except for svc:/system/svc/restarter:default are temporarily disabled.

The none milestone can be useful when for debugging startup problems. See How to Investigate Problems Starting Services at System Boot for specific instructions.

all

The all keyword represents a milestone that depends on every service. When all is specified, temporary enable and disable requests are ignored for all services. This is the default milestone used by svc.startd.

svc:/milestone/single-user

s or S

Ignore temporary enable and disable requests for svc:/milestone/single-user:default and all services on which it depends either directly or indirectly. Temporarily disable all other services.

svc:/milestone/multi-user

2

Ignore temporary enable and disable requests for svc:/milestone/multi-user:default and all services on which it depends either directly or indirectly. Temporarily disable all other services.

svc:/milestone/multi-user-server

3

Ignore temporary enable and disable requests for svc:/milestone/multi-user-server:default and all services on which it depends either directly or indirectly. Temporarily disable all other services

...

  1. Boot without starting any services.

    The following command instructs the svc.startd daemon to temporarily disable all services and start sulogin on the console.

    Code Block
    ok boot -m milestone=none

    See Specifying the SMF Milestone to Which to Boot for a list of SMF milestones that you can use with the boot -m command.

  2. Log in to the system as root.

  3. Enable all services.

    Code Block
    # svcadm milestone all
  4. Determine where the boot process is hanging.

    When the boot process hangs, determine which services are not running by running svcs -a. Look for error messages in the log files in /var/svc/log.

  5. After fixing the problems, verify that all services have started.

    1. Verify that all needed services are online.

      Code Block
      # svcs -x
    2. Verify that the console-login service dependencies are satisfied.

      This command verifies that the login process on the console will run.

      Code Block
      # svcs -l system/console-login:default
  6. Continue the normal booting process.

...