| 跳过导航链接 | |
| 退出打印视图 | |
|
Oracle Solaris 管理:基本管理 Oracle Solaris 10 1/13 Information Library (简体中文) |
2. 使用 Solaris Management Console(任务)
3. 使用 Oracle Java Web Console(任务)
11. 修改 Oracle Solaris 引导行为(任务)
在基于 SPARC 的系统上从指定的 ZFS 根文件系统引导
x86: 如何在故障安全模式下引导以强制更新损坏的引导归档文件
13. 管理 Oracle Solaris 引导归档文件(任务)
14. Oracle Solaris 系统引导的故障排除(任务)
17. 使用 Oracle Configuration Manager
21. 使用 Oracle Solaris 系统管理工具管理软件(任务)
为了支持在 x86 平台上引导 Oracle Solaris ZFS 根文件系统,已引入了一个新的 GRUB 关键字 $ZFS-BOOTFS。如果根设备包含 ZFS 池,则会为此关键字指定一个值,然后使用 -B 选项将该值传递给内核。此选项标识要引导的数据集。如果您使用支持 ZFS 引导装载程序的 Oracle Solaris 发行版来安装或升级您的系统,则在缺省情况下,GRUB menu.lst 文件和 GRUB 引导菜单将包含此信息。
角色包含授权和具有特权的命令。有关角色的更多信息,请参见《System Administration Guide: Security Services》中的"Configuring RBAC (Task Map)"。
~# bootadm list-menu
# lustatus
请注意,也可以在基于 SPARC 的系统上使用 lustatus 命令。
注 - 如果在运行 lustatus 命令时显示以下错误,则表明执行了全新安装,而没有使用 Solaris Live Upgrade。必须先在系统中创建新的 BE,然后才能在 lustatus 输出中确认任何 BE。
# lustatus ERROR: No boot environments are configured on this system ERROR: cannot determine list of all boot environment names
有关使用 Solaris Live Upgrade 将 UFS 根文件系统迁移到 ZFS 根文件系统的更多信息,请参见《Oracle Solaris ZFS 管理指南》中的"迁移到 ZFS 根文件系统或更新 ZFS 根文件系统 (Live Upgrade)"。
示例 12-12 使用 lustatus 命令显示可用的 ZFS 可引导数据集的列表
在以下示例中,lustatus 命令的输出显示了三个 ZFS 可引导数据集的状态。缺省的引导环境是 be1,因而无法将其删除。
# lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status -------------------------- -------- ------ --------- ------ ---------- s10s_nbu6wos yes no no yes - zfs2BE yes yes yes no - zfsbe3 no no no yes - #
如果该 BE 已创建且可引导,则 Is Complete 列中会显示 "yes"(是)。如果某个 BE 已创建但尚未激活,则此列中会显示 "no"(否)。要激活某个 BE,请使用 luactivate 命令。之后,可以运行 lustatus 命令以检验是否已成功激活该 BE。
有关更多信息,请参见 lustatus(1M) 和 luactivate(1M) 手册页。
以下过程介绍如何在支持 ZFS 引导装载器的 x86 系统上从 ZFS 根文件系统引导。
请注意,如果您安装支持 ZFS 引导装载程序的 Oracle Solaris 发行版或将您的系统升级至该发行版,则在缺省情况下,GRUB 菜单项包含 -B $ZFS-BOOTFS 引导参数,因此,系统无需任何其他引导参数即可从 ZFS 引导。
# reboot
如果系统显示 Press any key to reboot 提示,请按任意键以重新引导系统。
在出现此提示时,您还可以使用 "Reset"(重置)按钮。如果系统已关闭,请使用电源开关打开系统。
引导序列开始时,将显示 GRUB 主菜单。如果缺省引导项是 ZFS 文件系统,则菜单将类似如下:
GNU GRUB version 0.95 (637K lower / 3144640K upper memory)
+----------------------------------------------------------------+
| be1
| be1 failsafe
| be3
| be3 failsafe
| be2
| be2 failfafe
+---------------------------------------------------------------+
Use the ^ and v 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.如果在 10 秒内未选择项,系统会自动引导至运行级别 3。
有关在引导时编辑 GRUB 菜单项的更多信息,请参见x86: 如何通过在引导时编辑 GRUB 菜单修改引导行为。
示例 12-13 x86: 在基于 x86 的系统上激活新的引导环境
以下示例显示了在系统中激活引导环境 be10 所要执行的步骤。请注意,要首先运行 lustatus,以确定系统中哪些 BE 是活动的,以及哪些 BE 需要激活。
# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-----------------------------------------------------------------
be1 yes yes yes no
be10 yes no no yes
# luactivate be10
System has findroot enabled GRUB Generating boot-sign, partition and slice
information for PBE <be1>
WARNING: The following file s have change on both the current boot environment
<be1> zone <global> and the boot environment to be activitate <be10>
/etc/zfs/zpool.cache
INFORMATION: The files listed above are in conflict between the current
boot environment <be1> zone <global> and the boot environment to be
activated <be10>. These files will not be automatically synchronized from
the current boot environment <be1> when boot environment <be10> is activated.
Setting failsafe console to <ttyb>
Generating boot-sign for ABE <be10>
Generating partition and slice information for ABE <be10>
Copied boot menu from top level dataset.
Generating direct boot menu entries for PBE.
Generating direct boot menu entries for ABE.
Disabling splashimage
Current GRUB menu default setting is not valid
title Solaris bootenv rc
No more bootadm entries. Deletion of bootadm entries is complete.
GRUB menu default setting is unchanged
Done eliding bootadm entries.
**************************************************************
The target boot environment has been activated. It will be used when you
reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You
MUST USE either the init or the shutdown command when you reboot. If you
do not use either init or shutdown, the system will not boot using the
target BE.
***************************************************************
,,,
# reboot
May 30 09:52:32 pups reboot: initiated by root on /dev/console
syncing file systems... done
rebooting...
CE SDRAM BIOS P/N GR-xlint.007-4.330
*
BIOS Lan-Console 2.0
Copyright (C) 1999-2001 Intel Corporation
.
.
.
GNU GRUB version 0.95 (637K lower / 3144640K upper memory)
+-------------------------------------------------------------------+
| be1
| be1 failsafe
| be10
| be10 failsafe
+------------------------------------------------------------------+
Use the ^ and v 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.
SunOS Release 5.10 Version Generic_144500-10 64-bit
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
Use is subject to license terms.
Hostname: pups
NIS domain name is sunsoft.eng.sun.com
Reading ZFS config: done.
Mounting ZFS filesystems: (8/8)
pups console login:
# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-----------------------------------------------------------------
be1 yes yes yes no
be10 yes yes yes no
#