...
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:
...
Log in.
Using the
root
password, log in either remotely or at thesulogin
prompt.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. Therestore_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 withmanifest_import
are completed aftersvc:/system/manifest-import:default
finishes its process. The time of the backup is given in YYYYMMDD_HHMMSS format.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 therestore_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 theboot
command at theok
prompt. See the-m
option in thekernel
(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 thekernel
(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. Thesvcadm
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 | ||||
---|---|---|---|---|
|
SMF Milestone FMRI or Keyword | Corresponding Run Level | Description |
---|---|---|
| The The | |
| The | |
| s or S | Ignore temporary enable and disable requests for |
| 2 | Ignore temporary enable and disable requests for |
| 3 | Ignore temporary enable and disable requests for |
...
Boot without starting any services.
The following command instructs the
svc.startd
daemon to temporarily disable all services and startsulogin
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.Log in to the system as
root
.Enable all services.
Code Block # svcadm milestone all
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
.After fixing the problems, verify that all services have started.
Verify that all needed services are online.
Code Block # svcs -x
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
Continue the normal booting process.
...