以下过程介绍如何在支持 ZFS 引导装载器的 x86 系统上从 ZFS 根文件系统引导。
请注意,如果您安装支持 ZFS 引导装载器的 Oracle Solaris 发行版或将您的系统升级至该发行版,则在缺省情况下,GRUB 菜单项包含 -B $ZFS-BOOTFS 引导参数,因此,系统无需任何其他引导参数即可从 ZFS 引导。
重新引导系统。
# reboot |
如果系统显示 Press any key to reboot 提示,请按任意键以重新引导系统。
在出现此提示时,您还可以使用“重置”按钮。如果系统已关闭,请使用电源开关打开系统。
引导序列开始时,将显示 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. |
显示 GRUB 菜单后,请按 Enter 键引导缺省的操作系统实例。
如果在 10 秒内未选择项,系统会自动引导至运行级别 3。
要引导其他 BE,请使用方向键突出显示指定的引导项。
键入 b 引导此项,或键入 e 编辑此项。
有关引导时 GRUB 菜单项的更多信息,请参见 x86: 如何通过在引导时编辑 GRUB 菜单修改引导行为。
以下示例显示了在系统中激活引导环境 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 32-bit Copyright 1983-2008 Sun Microsystems, Inc. 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 # |