| 跳过导航链接 | |
| 退出打印视图 | |
|
Oracle Solaris 管理:基本管理 Oracle Solaris 10 1/13 Information Library (简体中文) |
2. 使用 Solaris Management Console(任务)
3. 使用 Oracle Java Web Console(任务)
11. 修改 Oracle Solaris 引导行为(任务)
在基于 SPARC 的系统上从指定的 ZFS 根文件系统引导
x86: 在基于 x86 的系统上从指定的 ZFS 根文件系统引导
x86: 如何在故障安全模式下引导以强制更新损坏的引导归档文件
13. 管理 Oracle Solaris 引导归档文件(任务)
14. Oracle Solaris 系统引导的故障排除(任务)
17. 使用 Oracle Configuration Manager
21. 使用 Oracle Solaris 系统管理工具管理软件(任务)
如果从作为引导归档文件的根文件系统映像引导系统,然后在实际根设备上重新挂载此文件系统,有时可能会导致引导归档文件和根文件系统不匹配或不一致。在这些情况下,将会危及系统的正确操作和完整性。在挂载根 (/) 文件系统之后,且在放弃内存中文件系统之前,系统会针对这两个文件系统执行一致性验证。如果检测到不一致,正常引导序列将会暂停,并且系统会恢复至故障安全模式。
此外,如果在更新内核文件后立刻出现系统故障、电源故障或内核紧急情况,则引导归档文件和根文件系统可能无法同步。虽然系统仍然可能使用不一致的引导归档文件引导,但建议您引导故障安全归档文件以更新引导归档文件。您还可以使用 bootadm 命令手动更新引导归档文件。有关更多信息,请参见使用 bootadm 命令管理引导归档文件。
引导故障安全归档文件可用于恢复目的,或更新引导归档文件。
在 SPARC 平台上,故障安全归档文件为:
/platform/`uname -m`/failsafe
可以使用以下语法引导故障安全归档文件:
ok boot -F failsafe
从 Oracle Solaris ZFS 引导的系统也支持故障安全引导。在从以 ZFS 为根的 BE 引导时,每个 BE 都有其自己的故障安全归档文件。故障安全归档文件位于根文件系统所在的位置,这与以 UFS 为根的 BE 的情况相同。缺省故障安全归档文件是位于缺省可引导文件系统中的归档文件。缺省可引导文件系统(数据集)由池的 bootfs 属性的值指示。
有关引导基于 x86 的故障安全归档文件的信息,请参见在故障安全模式下引导基于 x86 的系统。。
有关清除引导归档文件自动更新故障的信息,请参见x86: 如何使用 auto-reboot-safe 属性清除引导归档文件自动更新故障。
使用此过程在故障安全模式下引导基于 SPARC 的系统以更新引导归档文件。如果在更新引导归档文件后系统不引导,您可能需要在单用户模式下引导系统。有关更多信息,请参见SPARC: 如何将系统引导至运行级别 S(单用户级别)。
注 - 此过程还说明了在故障安全模式下如何引导指定的 ZFS 数据集。
角色包含授权和具有特权的命令。有关角色的更多信息,请参见《System Administration Guide: Security Services》中的"Configuring RBAC (Task Map)"。
# init 0
ok boot -F failsafe
ok boot -F failsafe -Z dataset
例如:
ok boot -F failsafe -Z rpool/ROOT/zfsBE2
如果检测到不一致的引导归档文件,将会显示一条消息。
An out of sync boot archive was detected on rpool. The boot archive is a cache of files used during boot and should be kept in sync to ensure proper system operation. Do you wish to automatically update this boot archive? [y,n,?] y
如果成功更新归档文件,将会显示一条消息:
The boot archive on rpool was updated successfully.
示例 12-7 SPARC: 在故障安全模式下引导系统
该示例介绍如何在故障安全模式下引导基于 SPARC 的系统。如果未指定任何设备,则引导缺省引导设备的故障安全归档文件。
ok boot -F failsafe Resetting ... screen not found. Can't open input device. Keyboard not present. Using ttya for input and output. Sun Enterprise 220R (2 X UltraSPARC-II 450MHz), No Keyboard OpenBoot 3.23, 1024 MB memory installed, Serial #13116682. Ethernet address 8:0:20:c8:25:a, Host ID: 80c8250a. Rebooting with command: boot -F failsafe Boot device: /pci@1f,4000/scsi@3/disk@1,0:a File and args: -F failsafe SunOS Release 5.10t Copyright 1983-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Configuring /dev Searching for installed OS instances... An out of sync boot archive was detected on /dev/dsk/c0t1d0s0. The boot archive is a cache of files used during boot and should be kept in syncto ensure proper system operation. Do you wish to automatically update this boot archive? [y,n,?] y Updating boot archive on /dev/dsk/c0t1d0s0. The boot archive on /dev/dsk/c0t1d0s0 was updated successfully. Solaris 5.10 was found on /dev/dsk/c0t1d0s0. Do you wish to have it mounted read-write on /a? [y,n,?] n Starting shell. #
示例 12-8 SPARC: 在故障安全模式下引导指定的 ZFS 数据集
此示例介绍如何在故障安全模式下引导 ZFS 数据集。请注意,首先使用 boot -L 命令显示可用引导环境的列表。此命令必须在 ok 提示符下运行。
ok boot -L
Rebooting with command: boot -L
Boot device: /pci@1f,4000/scsi@3/disk@1,0 File and args: -L
1 zfsBE2
Select environment to boot: [ 1 - 1 ]: 1
To boot the selected entry, invoke:
boot [<root-device>] -Z rpool/ROOT/zfsBE2
Program terminated
{0} ok
Resetting ...
screen not found.
Can't open input device.
Keyboard not present. Using ttya for input and output.
Sun Enterprise 220R (2 X UltraSPARC-II 450MHz), No Keyboard
OpenBoot 3.23, 1024 MB memory installed, Serial #13116682.
Ethernet address 8:0:20:c8:25:a, Host ID: 80c8250a.
{0} ok boot -F failsafe -Z rpool/ROOT/zfsBE2
Boot device: /pci@1f,4000/scsi@3/disk@1,0 File and args: -F failsafe -Z
rpool/ROOT/zfsBE2
SunOS Release 5.10
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Configuring /dev
Searching for installed OS instances...
ROOT/zfsBE2 was found on rpool.
Do you wish to have it mounted read-write on /a? [y,n,?] y
mounting rpool on /a
Starting shell.
#
#
#
# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
rpool 16.8G 6.26G 10.5G 37% ONLINE /a
#
# zpool status
pool: rpool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c0t1d0s0 ONLINE 0 0 0
errors: No known data errors
#
# df -h
Filesystem size used avail capacity Mounted on
/ramdisk-root:a 163M 153M 0K 100% /
/devices 0K 0K 0K 0% /devices
/dev 0K 0K 0K 0% /dev
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 601M 344K 601M 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
swap 602M 1.4M 601M 1% /tmp
/tmp/root/etc 602M 1.4M 601M 1% /.tmp_proto/root/etc
fd 0K 0K 0K 0% /dev/fd
rpool/ROOT/zfsBE2 16G 5.7G 9.8G 37% /a
rpool/export 16G 20K 9.8G 1% /a/export
rpool/export/home 16G 18K 9.8G 1% /a/export/home
rpool 16G 63K 9.8G 1% /a/rpool