| ナビゲーションリンクをスキップ | |
| 印刷ビューの終了 | |
|
Oracle Solaris 11.1 システムのブートおよびシャットダウン Oracle Solaris 11.1 Information Library (日本語) |
2. x86: GRand Unified Bootloader の管理 (タスク)
SPARC: OpenBoot PROM を使用したブート属性の表示と設定
SPARC: システムの PROM リビジョン番号を確認する方法
SPARC: ブート PROM を使用してデフォルトのブートデバイスを変更する方法
SPARC: eeprom ユーティリティーを使用してデフォルトのブートデバイスを設定する方法
システムがマルチユーザー状態 (実行レベル 3) にブートされたときの処理
システムをマルチユーザー状態 (実行レベル 3) にブートする方法
SPARC: 代替のオペレーティングシステムまたはブート環境からブートする方法
x86: 代替のオペレーティングシステムまたはブート環境からブートする方法
次の手順では、さまざまな状態にシステムをブートする方法 (実行レベルのブートとも呼ばれる) を説明しています。
このセクションでは次の手順について説明します。
システムの「実行レベル」(「init 状態」とも呼ばれる) は、ユーザーが使用できるサービスとリソースを定義します。システムが一度に持つことのできる実行レベルは 1 つだけです。
Oracle Solaris には、次の表で説明する 8 つの実行レベルがあります。デフォルトの実行レベル 3 は、/etc/inittab ファイルに指定されています。
表 4-1 Oracle Solaris の実行レベル
|
また、svcadm コマンドを使用してシステムの実行レベルを変更することもできます。その場合は、実行するときのマイルストーンを選択してください。次の表に、各マイルストーンに対応する実行レベルを示します。
表 4-2 実行レベルと SMF マイルストーン
|
init プロセスが開始され、環境変数を設定するために svc:/system/environment:init SMF サービス内に定義されているプロパティーを読み取ります。デフォルトでは、TIMEZONE 変数だけが設定されます。
init は inittab ファイルを読み取り、次の処理を行います。
action フィールドが sysinit になっているすべてのプロセスエントリを実行して、ユーザーがシステムにログインする前に特殊な初期化がすべて行われるようにします。
起動アクティビティーを svc.startd に渡します。
init プロセスが inittab ファイルを使用する方法についての詳細は、init(1M) のマニュアルページを参照してください。
一般に、マイルストーンまたは実行レベルを変更する手順はめったに実行されません。必要な場合、実行レベルを変更するために init コマンドを使用するとマイルストーンも変更され、これは使用するのに適切なコマンドです。init コマンドはまた、システムをシャットダウンするのにも適しています。
ただし、none マイルストーンを使用してシステムをブートすると、起動時の問題をデバッグするときに非常に役立つ場合があります。none マイルストーンと同等の実行レベルはありません。詳細は、『Oracle Solaris 11.1 でのサービスと障害の管理』の第 1 章「サービスの管理 (概要)」を参照してください。
システムの現在の実行レベルを確認するには、who -r コマンドを使用します。
例 4-3 システムの実行レベルを確認する
who -r コマンドの出力には、システムの現在の実行レベルと、以前の実行レベルに関する情報が表示されます。
$ who -r . run-level 3 Dec 13 10:10 3 0 S $
|
この手順を使用して、現時点で実行レベル 0 になっているシステムを実行レベル 3 にブートします。この手順で、SPARC プラットフォームまたは x86 プラットフォームのいずれかに適用する情報については、それに応じて言及されています。
『Oracle Solaris 11.1 の管理: セキュリティーサービス』の「割り当てられている管理権限を使用する方法」を参照してください。
# init 0
ok boot
# reboot
ブート処理によって、一連の起動メッセージが表示され、システムが実行レベル 3 になります。詳細は、boot(1M) および reboot(1M) のマニュアルページを参照してください。
ブートプロセスが正常に終了すると、ログイン画面かログインプロンプトが表示されます。
hostname console login:
例 4-4 SPARC: マルチユーザー状態 (実行レベル 3) へのシステムのブート
次の例に、ブートプロセスの起動後に、SPARC ベースのシステムを実行レベル 3 にブートして生成されるメッセージを示します。
ok boot Probing system devices Probing memory ChassisSerialNumber FN62030249 Probing I/O buses . . . . OpenBoot 4.30.4.a, 8192 MB memory installed, Serial #51944031. Ethernet address 0:3:ba:18:9a:5f, Host ID: 83189a5f. Rebooting with command: boot Boot device: /pci@1c,600000/scsi@2/disk@0,0:a File and args: SunOS Release 5.11 Version 11.1 64-bit Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved. misc/forthdebug (455673 bytes) loaded Hardware watchdog enabled Hostname: portia-123 NIS domain name is solaris.example.com portia-123 console login: NIS domain name is solaris.example.com
例 4-5 x86: マルチユーザー状態 (実行レベル 3) へのシステムのブート
次の例に、ブートプロセスの起動後に、x86 ベースのシステムを実行レベル 3 にブートした場合のメッセージを示します。高速リブート機能はこのリリースでデフォルトであるため (x86 プラットフォームの場合)、reboot コマンドでシステムをブートすると、システムの高速リブートが開始されます。つまり、BIOS または UEFI ファームウェアがバイパスされます。さらに、システムのブート時に、GRUBメニューが表示されません。システムのファームウェアにアクセスするか、ブート時に GRUB メニューを編集する必要がある場合は、reboot コマンドと -p オプションを使用します。「高速リブートが有効化済みのシステムの標準リブートの開始」を参照してください。
~# reboot
Apr 23 13:30:29 system-04 reboot: initiated by ... on /dev/console
Terminated
system-04% updating /platform/i86pc/boot_archive
updating /platform/i86pc/amd64/boot_archive
system-04 console login: syncing file systems... done
SunOS Release 5.11 Version 11.1 64-bit
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.
Hostname: system-04
system-04 console login: <username>
Password: xxxxxx
Last login: Mon Apr 23 11:06:05 on console
Oracle Corporation SunOS 5.11 11.1 April 2012
# who -r
run-level 3 Apr 23 13:31 3 0 S
ファイルシステムのバックアップや、システムに関するその他の問題のトラブルシューティングなどのシステム保守を実行する目的で、システムをシングルユーザー状態にブートします。
『Oracle Solaris 11.1 の管理: セキュリティーサービス』の「割り当てられている管理権限を使用する方法」を参照してください。
# init 0
ok boot -s
SINGLE USER MODE Root password for system maintenance (control-d to bypass): xxxxxx
# reboot -p
高速リブート機能はデフォルトで有効にされているため、システムのリブート時に -p オプションを指定して、ブート時に GRUB メニューを表示できるようにする必要があります。-p オプションを指定する必要がないように、高速リブート機能を無効にするには、「デフォルトの高速リブートの動作を変更する」を参照してください。
ブート時に、GRUB メニューを編集する詳細については、「x86: ブート時に GRUB メニューを編集してカーネル引数を追加する」を参照してください。
# who -r
例 4-6 SPARC: シングルユーザー状態 (実行レベル S) へのシステムのブート
次の例に、ブートプロセスの起動後に、SPARC ベースのシステムを実行レベル S にブートして生成されるメッセージを示します。
# init 0
# svc.startd: The system is coming down. Please wait.
svc.startd: 122 system services are now being stopped.
Mar 5 10:30:33 system1 syslogd: going down on signal 15
svc.startd: Killing user processes.
umount: /ws busy
umount: /home busy
Mar 5 17:30:50 The system is down. Shutdown took 70 seconds.
syncing file systems... done
Program terminated
{1c} ok boot -s
SC Alert: Host System has Reset
NOV 17 21:46:59 ERROR: System memory downgraded to 2-channel mode from 4-channel mode
NOV 17 21:47:00 ERROR: Available system memory is less than physically installed memory
NOV 17 21:47:00 ERROR: System DRAM Available: 008192 MB Physical: 016384 MB
Sun Fire T200, No Keyboard
.
.
.
Ethernet address 0:14:4f:1d:e8:da, Host ID: 841de8da.
ERROR: The following devices are disabled:
MB/CMP0/CH2/R0/D0
Boot device: /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@0,0:a
File and args: -s
SunOS Release 5.11 Version 11.1 64-bit
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.
NOTICE: Hypervisor does not support CPU power management
Booting to milestone "milestone/single-user:default".
Hostname: system1
Requesting System Maintenance Mode
SINGLE USER MODE
Enter root password (control-d to bypass): xxxxxx
single-user privilege assigned to root on /dev/console.
Entering System Maintenance Mode
Mar 5 10:36:14 su: 'su root' succeeded for root on /dev/console
Oracle Corporation SunOS 5.11 11.1 January 2012
root@system1:~# who -r
run-level S Mar 5 10:35 S 0 0
root@tsystem1:~#例 4-7 x86: シングルユーザー状態 (実行レベル S) へのシステムのブート
次の例に、ブートプロセスの起動後に、x86 ベースのシステムを実行レベル S にブートした場合のメッセージを示します。
root@system-04:~# init 0
root@system-04:~# svc.startd: The system is coming down. Please wait.
svc.startd: 129 system services are now being stopped.
Apr 23 13:51:28 system-04 syslogd: going down on signal 15
svc.startd: Killing user processes.
umount: /home busy
Apr 23 13:51:36 The system is down. Shutdown took 26 seconds.
syncing file systems... done
Press any key to reboot.
.
.
.LSI Corporation MPT SAS BIOS
MPTBIOS-6.26.00.00 (2008.10.14)
Copyright 2000-2008 LSI Corporation.
Initializing..|Press F2 to runS POPUP (CTRL+P on Remote Keyboard)
Press F12 to boot from the network (CTRL+N on Remote Keyboard)
System Memory : 8.0 GB , Inc.
Auto-Detecting Pri Master..ATAPI CDROM 0078
Ultra DMA Mode-2
.
.
.
GNU GRUB version 1.99,5.11.0.175.1.0.0.14.0
****************************************************************************
*Oracle Solaris 11.1 *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
****************************************************************************
Use the * and * keys to select which entry is highlighted.
Press enter to boot the selected OS, 'e' to edit the commands
before booting or 'c' for a command-line.
GNU GRUB version 1.99,5.11.0.175.1.0.0.14.0
****************************************************************************
* setparams 'Oracle Solaris 11.1' *
* *
* insmod part_msdos *
* insmod part_sunpc *
* insmod part_gpt *
* insmod zfs *
* search --no-floppy --fs-uuid --set=root cd03199c4187a7d7 *
* zfs-bootfs /ROOT/s11u1/@/ zfs_bootfs *
* set kern=/platform/i86pc/kernel/amd64/unix *
* echo -n "Loading ${root}/ROOT/s11u1 /@$kern: " *
* $multiboot /ROOT/s11u1/@/$kern $kern -B $zfs_bootfs -s
* set gfxpayload="1024x768x32;1024x768x16;800x600x16;640x480x16;640x480x1\ *
* 5;640x480x32" **
****************************************************************************
Minimum Emacs-like screen editing is supported. TAB lists
completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for
a command-line or ESC to discard edits and return to the GRUB menu.
Booting a command list
Loading hd0,msdos1,sunpc1/ROOT/s11u1/@/platform/i86pc/kernel/amd64/unix: 0
%...done.
Loading hd0,msdos1,sunpc1/ROOT/s11u1/@/platform/i86pc/amd64/boot_archive:
0%...
.
.
.
SunOS Release 5.11 Version 11.1 64-bit
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.
NOTICE: kmem_io_2G arena created
Booting to milestone "milestone/single-user:default".
Hostname: system-04
Requesting System Maintenance Mode
SINGLE USER MODE
Enter user name for system maintenance (control-d to bypass): root
Enter root password (control-d to bypass): xxxxxxx
single-user privilege assigned to root on /dev/console.
Entering System Maintenance Mode
May 8 11:13:44 su: 'su root' succeeded for root on /dev/console
Oracle Corporation SunOS 5.11 11.1 April 2012
You have new mail.
root@system-04:~# who -r
. run-level S Apr 23 14:49 S 0 0
対話式でのシステムのブートは、元のファイルが破損しているか、システムがブートしないために、ブートプロセス中に代替カーネルまたは /etc/system ファイルを指定する必要がある場合に役立ちます。システムを対話式でブートするには、次の手順を使用します。
次の手順では、ブート環境が 1 つしかないシステムの対話式のブート時に、代替の /etc/system ファイルを指定する方法について説明します。または、代替ブート環境をブートできます。
# cp /etc/system /etc/system.bak # cp /boot/solaris/filelist.ramdisk /boot/solaris/filelist.ramdisk.orig # echo "etc/system.bak" >> /boot/solaris/filelist.ramdisk
Name of system file [etc/system]: /etc/system.bak
情報を指定せずに Return キーを押すと、システムのデフォルトが受け入れられます。
注 - /etc/devices/retire_store ファイルは、障害管理アーキテクチャー (FMA) によってリタイアされるデバイスのバッキングストアです。システムはこれらのデバイスを使用しなくなりました。必要に応じて、/etc/devices/retire_store の代替ファイルを提供できます。ただし、復旧の目的で、/dev/null を指定することは、 /etc/devices/retire_store ファイルの内容に関係なく、システムをブートするもっとも有益な選択肢です。
# reboot
例 4-8 SPARC: システムを対話式でブートする
次の例では、システムのデフォルト (角かっこ [] で示す) が受け入れられます。
# init 0
# svc.startd: The system is coming down. Please wait.
svc.startd: 121 system services are now being stopped.
Apr 22 00:34:25 system-28 syslogd: going down on signal 15
svc.startd: Killing user processes.
umount: /home busy
Apr 22 06:34:37 The system is down. Shutdown took 18 seconds.
syncing file systems... done
Program terminated
{11} ok boot -a
SC Alert: Host System has Reset
Sun Fire T200, No Keyboard
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.30.4.d, 16256 MB memory available, Serial #74139288.
Ethernet address 0:14:4f:6b:46:98, Host ID: 846b4698.
Boot device: /pci@780/pci@0/pci@9/scsi@0/disk@0,0:a File and args: -a
Name of system file [/etc/system]: /etc/system.bak
SunOS Release 5.11 Version 11.1 64-bit
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.
Retire store [/etc/devices/retire_store] (/dev/null to bypass): Press Return
system-28 console login:例 4-9 x86: システムを対話式でブートする
次の例では、x86 ベースのシステムが対話式でブートされます。
root@system-04:~# reboot -p
Apr 23 15:37:04 system-04 reboot: initiated by user1 on /dev/consoleTerminated
system-04% syncing file systems... done
rebooting...
.
.
.LSI Corporation MPT SAS BIOS
MPTBIOS-6.26.00.00 (2008.10.14)
Copyright 2000-2008 LSI Corporation.
Initializing..|Press F2 to runS POPUP (CTRL+P on Remote Keyboard)
Press F12 to boot from the network (CTRL+N on Remote Keyboard)
System Memory : 8.0 GB , Inc.
Auto-Detecting Pri Master..ATAPI CDROM 0078
Ultra DMA Mode-2
GNU GRUB version 1.99,5.11.0.175.1.0.0.14.0
****************************************************************************
*Oracle Solaris 11.1 *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
****************************************************************************
Use the * and * keys to select which entry is highlighted.
Press enter to boot the selected OS, 'e' to edit the commands
before booting or 'c' for a command-line.
GNU GRUB version 1.99,5.11.0.175.1.0.0.15.1
+--------------------------------------------------------------------------+
| setparams 'Oracle Solaris 11.1' |
| |
| insmod part_msdos |
| insmod part_sunpc |
| insmod part_gpt |
| insmod zfs |
| search --no-floppy --fs-uuid --set=root cd03199c4187a7d7 |
| zfs-bootfs /ROOT/s11u1/@/ zfs_bootfs |
| set kern=/platform/i86pc/kernel/amd64/unix |
| echo -n "Loading ${root}/ROOT/s11u1/@$kern: " |
| $multiboot /ROOT/s11u1/@/$kern $kern -B $zfs_bootfs -a |
| set gfxpayload="1024x768x32;1024x768x16;800x600x16;640x480x16;640x480x1\ |
+--------------------------------------------------------------------------+
Minimum Emacs-like screen editing is supported. TAB lists
completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for
a command-line or ESC to discard edits and return to the GRUB menu.
Booting a command list
Loading hd0,msdos1,sunpc1/ROOT/s11u1/@/platform/i86pc/kernel/amd64/unix: 0
%...done.
Loading hd0,msdos1,sunpc1/ROOT/s11u1/@/platform/i86pc/amd64/boot_archive:
0%...
.
.
.
Name of system file [/etc/system]: /etc/system.bak
SunOS Release 5.11 Version 11.1 64-bit
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.: 0
Retire store [/etc/devices/retire_store] (/dev/null to bypass): Press Return
NOTICE: kmem_io_2G arena created
Hostname: system-04
system-04 console login: