Solaris 10 11/06 安装指南:Solaris Live Upgrade 和升级规划

(可选)回退到源引导环境

以下回退过程取决于新引导环境的激活情况:


示例 9–1 SPARC: 在忽略引导环境创建成功的情况下回退

在本示例中,虽然新引导环境已经被成功激活了,但初始引导环境 c0t4d0s0 被重新恢复为活动的引导环境。设备名称为 first_disk


# /sbin/luactivate first_disk 
# init 6


示例 9–2 SPARC: 从失败的引导环境激活中回退

在本示例中,新引导环境是不可引导的。您必须返回到 OK 提示符,然后在单用户模式下从初始引导环境 c0t4d0s0 中引导。


OK boot net -s
# /sbin/luactivate first_disk
Do you want to fallback to activate boot environment c0t4d0s0 
(yes or no)? yes
# init 6

初始引导环境 c0t4d0s0 成为活动的引导环境。



示例 9–3 SPARC: 使用 DVD、CD 或网络安装映像回退到初始引导环境

在本示例中,新引导环境是不可引导的。您无法从初始引导环境中引导,因此必须使用介质或网络安装映像。设备为 /dev/dsk/c0t4d0s0。初始引导环境 c0t4d0s0 成为活动的引导环境。


OK boot net -s
# fsck /dev/dsk/c0t4d0s0
# mount /dev/dsk/c0t4d0s0 /mnt 
# /mnt/sbin/luactivate
Do you want to fallback to activate boot environment c0t4d0s0 
(yes or no)? yes
# umount /mnt 
# init 6


示例 9–4 x86: 通过使用 GRUB 菜单回退到初始引导环境

从 Solaris 10 1/06 发行版开始,以下示例介绍了通过使用 GRUB 菜单回退的步骤。

在本示例中,正确显示了 GRUB 菜单,但是新引导环境不可引导。要启用回退,在单用户模式中引导初始引导环境。

  1. 成为超级用户或承担等效角色。

  2. 要显示 GRUB 菜单,请重新引导系统。


    # init 6
    

    此时将显示 GRUB 菜单。


    GNU GRUB version 0.95 (616K lower / 4127168K upper memory)
    +-------------------------------------------------------------------+
    |Solaris                                                            |
    |Solaris failsafe                                                   |
    |second_disk                                                        |
    |second_disk 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.
  3. 从 GRUB 菜单中选择初始引导环境。必须已使用 GRUB 软件创建了该引导环境。在 Solaris 10 1/06 发行版之前创建的引导环境不属于 GRUB 引导环境。如果您没有可引导的 GRUB 引导环境,则跳至示例 9–5

  4. 通过键入以下内容来编辑 GRUB 菜单:e

  5. 通过使用方向键选择 kernel /boot/multiboot 并键入 e,将显示 grub 编辑菜单。


    grub edit>kernel /boot/multiboot
  6. 通过键入 -s 引导至单用户模式。


    grub edit>kernel /boot/multiboot -s
    
  7. 引导并挂载该引导环境。然后将其激活。


# b
# fsck /dev/dsk/c0t4d0s0
# mount /dev/dsk/c0t4d0s0 /mnt 
# /mnt/sbin/luactivate
Do you want to fallback to activate boot environment c0t4d0s0
(yes or no)? yes
# umount /mnt
# init 6


示例 9–5 x86: 通过使用 DVD 或 CD 回退到具有 GRUB 菜单的初始引导环境

从 Solaris 10 1/06 发行版开始,以下示例介绍了通过使用 DVD 或 CD 回退的步骤。

在本示例中,新引导环境是不可引导的。另外,也不显示 GRUB 菜单。要启用回退,在单用户模式中引导初始引导环境。

  1. 插入 Solaris Operating System for x86 Platforms DVD 或 Solaris Software for x86 Platforms - 1 CD。

  2. 成为超级用户或承担等效角色。

  3. 从 DVD 或 CD 引导。


    # init 6
    

    此时将显示 GRUB 菜单。


    GNU GRUB version 0.95 (616K lower / 4127168K upper memory)
    +-------------------------------------------------------------------+
    |Solaris                                                            |
    |Solaris 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.
  4. 通过键入以下内容来编辑 GRUB 菜单:e

  5. 通过使用方向键选择 kernel /boot/multiboot 并键入 e,将显示 grub 编辑菜单。


    grub edit>kernel /boot/multiboot
  6. 通过键入 -s 引导至单用户模式。


    grub edit>kernel /boot/multiboot -s
    
  7. 引导并挂载该引导环境。然后将其激活并重新引导。


Edit the GRUB menu by typing: e
Select the original boot environment by using the arrow keys.
grub edit>kernel /boot/multiboot -s
# b
# fsck /dev/dsk/c0t4d0s0
# mount /dev/dsk/c0t4d0s0 /mnt 
# /mnt/sbin/luactivate
Do you want to fallback to activate boot environment c0t4d0s0
(yes or no)? yes
# umount /mnt
# init 6