Solaris 10 安裝指南:Solaris Live Upgrade 與升級規劃

(可選擇) 轉至備用來源啟動環境

依據新啟動環境的啟動狀況,存在下列備用程序:


範例 12–1 SPARC: 在成功建立啟動環境的情況下轉至備用環境

在此範例中,儘管原始的 c0t4d0s0 啟動環境已成功啟動,但它仍會復原成使用中啟動環境。裝置名稱是first_disk


# /sbin/luactivate first_disk 
# init 6


範例 12–2 SPARC: 從失敗的啟動環境啟動中轉至備用環境

在此範例中,新的啟動環境無法啟動,在從原始啟動環境 (c0t4d0s0 ) 啟動之前,您必須返回至單一使用者模式下的 OK 提示符號。


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 將成為使用中啟動環境。



範例 12–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


範例 12–4 x86: 使用 GRUB 功能表轉至備用原始啟動環境

從 Solaris 10 1/06 發行版本開始,下列範例提供藉由使用 GRUB 功能表轉至備用環境的步驟。

在此範例中,GRUB 功能表會正確顯示,但是不會啟動新的啟動環境。若要啟用備用環境,請以單一使用者模式啟動原始啟動環境。

  1. 若要顯示 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.
  2. 請從 GRUB 功能表選取原始啟動環境。啟動環境必須已使用 GRUB 軟體建立。Solaris 10 1/06 發行版本之前版本建立的啟動環境,不是 GRUB 啟動環境。如果您沒有可啟動的 GRUB 啟動環境,請跳到範例 12–5

  3. 鍵入下列項目來編輯 GRUB 功能表:e

  4. 使用箭頭鍵選取 kernel /boot/multiboot,然後鍵入 e。如此會顯示 GRUB 編輯功能表。


    grub edit>kernel /boot/multiboot
  5. 鍵入 -s 以啟動為單一使用者模式。


    grub edit>kernel /boot/multiboot -s
    
  6. 啟動與掛載啟動環境。然後加以啟動。


# 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


範例 12–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. 從 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.
  3. 鍵入下列項目來編輯 GRUB 功能表:e

  4. 使用箭頭鍵選取 kernel /boot/multiboot,然後鍵入 e。如此會顯示 GRUB 編輯功能表。


    grub edit>kernel /boot/multiboot
  5. 鍵入 -s 以啟動為單一使用者模式。


    grub edit>kernel /boot/multiboot -s
    
  6. 啟動與掛載啟動環境。然後啟動並重新啟動。


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