ナビゲーションリンクをスキップ | |
印刷ビューの終了 | |
x86 プラットフォーム上の Oracle Solaris のブートおよびシャットダウン Oracle Solaris 11 Information Library (日本語) |
1. x86 ベースシステムのブートおよびシャットダウン (概要)
2. 指定された状態への x86 ベースシステムのブート (タスク)
5. x86 ベースシステムのネットワークからのブート (作業)
6. x86 ベースシステム上のブートパラメータの変更 (タスク)
7. x86 プラットフォーム上での ZFS ブート環境の作成、管理、およびこのブート環境からのブート (タスク)
8. x86 ベースシステムのブート可能状態の維持 (タスク)
次の手順と例は、shutdown および init コマンドを使用してシステムをシャットダウンする方法について説明したものです。
マルチユーザーのタイムシェアリングシステムとして使用されている Oracle Solaris システムでは、システムをシャットダウンする前に、システムにログインしているユーザーがいるかどうかの確認が必要になることがあります。このような場合は次の手順を使用します。
$ who holly console May 7 07:30 kryten pts/0 May 7 07:35 (starlite) lister pts/1 May 7 07:40 (bluemidget)
1 列目のデータはログインしているユーザーのユーザー名を示します。
2 列目のデータはログインしているユーザーの端末回線を示します。
3 列目のデータはユーザーがログインした日時を示します。
4 列目のデータ (存在する場合) は、ユーザーがリモートシステムからログインしているときのホスト名を示します。
# who
ログインしているすべてのユーザーがリスト表示されます。
# shutdown -iinit-state -ggrace-period -y
システムをデフォルトの S とは異なる init 状態にします。0、1、2、5、6 のいずれかを指定できます。
実行レベル 0 および 5 は、システムのシャットダウン用に予約された状態です。実行レベル 6 はシステムをリブートします。実行レベル 2 はマルチユーザーオペレーティング状態として使用できます。
システムがシャットダウンするまでの時間 (秒) を示します。デフォルト値は 60 秒です。
ユーザーの介入なしにシャットダウンを継続します。それ以外の場合、シャットダウンを継続するかどうか 60 秒後に尋ねられます。
詳細は、shutdown(1M) のマニュアルページを参照してください。
Do you want to continue? (y or n): y
-y オプションを指定した場合、このプロンプトは表示されません。
Type Ctrl-d to proceed with normal startup, (or give root password for system maintenance): xxxxxx
|
例 3-1 shutdown コマンドを使用してシステムをシングルユーザー状態 (実行レベル S) にする
次の例では、shutdown コマンドを使用して、3 分後にシステムを実行レベル S (シングルユーザー状態) にしています。
# who root console Apr 15 06:20 # shutdown -g180 -y Shutdown started. Fri Apr 15 06:20:45 MDT 2011 Broadcast Message from root (console) on portia Fri Apr 15 06:20:46... The system portia will be shut down in 3 minutes showmount: portia: RPC: Program not registered Broadcast Message from root (console) on portia Fri Apr 15 06:21:46... The system portia will be shut down in 2 minutes showmount: portia: RPC: Program not registered Broadcast Message from root (console) on portia Fri Apr 15 06:22:46... The system portia will be shut down in 1 minute showmount: portia: RPC: Program not registered Broadcast Message from root (console) on portia Fri Apr 15 06:23:16... The system portia will be shut down in 30 seconds showmount: portia: RPC: Program not registered Changing to init state s - please wait svc.startd: The system is coming down for administration. Please wait. root@portia:~# Apr 15 06:24:28 portia svc.startd[9]: Apr 15 06:24:28 portia syslogd: going down on signal 15 svc.startd: Killing user processes. Requesting System Maintenance Mode (See /lib/svc/share/README for more information.) SINGLE USER MODE Enter user name for system maintenance (control-d to bypass):xxxxxx #
例 3-2 shutdown コマンドを使用してシステムをシャットダウン状態 (実行レベル 0) にする
次の例では、shutdown コマンドを使用して、追加の確認を求めずに 5 分後にシステムを実行レベル 0 にしています。
# who root console Jun 17 12:39... userabc pts/4 Jun 17 12:39 (:0.0) # shutdown -i0 -g300 -y Shutdown started. Fri Apr 15 06:35:48 MDT 2011 Broadcast Message from root (console) on murky Fri Apr 15 06:35:48... The system pinkytusk will be shut down in 5 minutes showmount: murkey: RPC: Program not registered showmount: murkey: RPC: Program not registered Broadcast Message from root (console) on murkey Fri Apr 15 06:38:48... The system murkey will be shut down in 2 minutes showmount: murkey: RPC: Program not registered Broadcast Message from root (console) on murkey Fri Apr 15 06:39:48... The system murkey will be shut down in 1 minute showmount: murkey: RPC: Program not registered Broadcast Message from root (console) on murkey Fri Apr 15 06:40:18... The system murkey will be shut down in 30 seconds showmount: murkey: RPC: Program not registered Broadcast Message from root (console) on murkey Fri Apr 15 06:40:38... THE SYSTEM murkey IS BEING SHUT DOWN NOW ! ! ! Log off now or risk your files being damaged showmount: murkey: RPC: Program not registered Changing to init state 0 - please wait root@murkey:~# svc.startd: The system is coming down. Please wait. svc.startd: 122 system services are now being stopped. Apr 15 06:41:49 murkey svc.startd[9]: Apr 15 06:41:50 murkey syslogd: going down on signal 15 svc.startd: Killing user processes. Apr 15 06:41:57 The system is down. Shutdown took 69 seconds. syncing file systems... done Press any key to reboot. Resetting...
すべてのデバイスの電源を切断するためにシステムを実行レベル 0 にする場合は、「システムデバイスの電源の切断」を参照してください。
例 3-3 shutdown コマンドを使用してシステムをマルチユーザー状態 (実行レベル 3) にする
次の例では、shutdown コマンドを使用して、2 分後にシステムを実行レベル 3 にリブートしています。確認用プロンプトが表示されないように y オプションを指定しています。
# who root console Jun 14 15:49 (:0) userabc pts/4 Jun 14 15:46 (:0.0) # shutdown -i6 -g120 -y Shutdown started. Fri Apr 15 06:46:50 MDT 2011 Broadcast Message from root (console) on venus Fri Apr 15 06:46:50... The system venus will be shut down in 2 minutes showmount: venus: RPC: Program not registered showmount: venus: RPC: Program not registered Broadcast Message from root (console) on venus Fri Apr 15 06:47:50... The system venus will be shut down in 1 minute showmount: venus: RPC: Program not registered showmount: venus: RPC: Program not registered Broadcast Message from root (console) on venus Fri Apr 15 06:48:20... The system venus will be shut down in 30 seconds showmount: venus: RPC: Program not registered Broadcast Message from root (console) on venus Fri Apr 15 06:48:40... THE SYSTEM venus IS BEING SHUT DOWN NOW ! ! ! Log off now or risk your files being damaged showmount: venus: RPC: Program not registered Changing to init state 6 - please wait root@venus:~# svc.startd: The system is coming down. Please wait. svc.startd: 123 system services are now being stopped. Apr 15 06:49:32 venus svc.startd[9]: Apr 15 06:49:32 venus syslogd: going down on signal 15 svc.startd: Killing user processes. Apr 15 06:49:40 The system is down. Shutdown took 50 seconds. syncing file systems... done rebooting... SunOS Release 5.11 Version 2010-12-10 64-bit Copyright (c) 1983, 2010, Oracle and/or its affiliates. All rights reserved. Booting to milestone "milestone/single-user:default". Hostname: venus NIS domain name is solaris.us.oracle.com . . . venus console login:
参照
システムをシャットダウンした理由にかかわらず、すべてのファイルリソースが利用可能かつユーザーがログイン可能な、実行レベル 3 にシステムが戻ることを想定しているでしょう。システムをマルチユーザー状態に戻す手順については、「マルチユーザー状態 (実行レベル 3) への x86 ベースシステムのブート」を参照してください。
スタンドアロンシステムをシャットダウンする必要がある場合は、次の手順を実行します。
# init 5
詳細は、init(1M) のマニュアルページを参照してください。
例 3-4 init コマンドを使用してシステムをシャットダウン状態 (実行レベル 0) にする
この例では、init コマンドを使用して、x86 ベースのスタンドアロンシステムを安全な電源切断が可能な実行レベルにしています。
# init 0 # INIT: New run level: 0 The system is coming down. Please wait. . . . The system is down. syncing file systems... [11] [10] [3] done Press any key to reboot
参照
システムをシャットダウンした理由にかかわらず、すべてのファイルリソースが利用可能かつユーザーがログイン可能な、実行レベル 3 にシステムが戻ることを想定しているでしょう。システムをマルチユーザー状態に戻す手順については、「マルチユーザー状態 (実行レベル 3) への x86 ベースシステムのブート」を参照してください。