系统管理指南:基本管理

ProcedureSPARC: 如何将系统引导至运行级别 S(单用户级别)

使用此过程可将当前位于运行级别 0 的系统引导至运行级别 S。此运行级别用于执行系统维护任务,例如,备份文件系统。

  1. 将系统引导至运行级别 S。


    ok boot -s
    
  2. 显示以下消息时键入超级用户口令:


    SINGLE USER MODE
    
    Root password for system maintenance (control-d to bypass): xxxxxx
    
  3. 确认系统处于运行级别 S。


    # who -r
    
  4. 执行将运行级别更改为 S 所需的维护任务。

  5. 完成系统维护任务之后,请按 Ctrl-D 组合键,使系统进入多用户状态。


示例 12–2 SPARC: 将系统引导至运行级别 S(单用户级别)

以下示例显示了将系统引导至运行级别 S 时出现的消息。


ok boot -s
.
.
.
Sun Microsystems Inc.   SunOS 5.10 Version Generic_120012-14 32-bit
Copyright 1983-2003 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
configuring IPv4 interfaces: hme0.
Hostname: starlite

SINGLE USER MODE

Root password for system maintenance (control-d to bypass): xxxxxx
single-user privilege assigned to /dev/console.
Entering System Maintenance Mode
Oct 14 15:01:28 su: 'su root' succeeded for root on /dev/console
Sun Microsystems Inc.   SunOS 5.10
# who -r
   .       run-level S  Sep 19 08:49     S      0  ?
(Perform some maintenance task)
# ^D