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

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

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


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

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


# /sbin/luactivate first_disk 
# init 6


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



範例 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. 成為超級使用者,或者假定一個對等身份。


    備註 –

    身份包含授權指令與特權指令。如需角色的更多資訊,請參閱「System Administration Guide: Security Services」中的「Configuring RBAC (Task Map)」


  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. 成為超級使用者,或者假定一個對等身份。


    備註 –

    身份包含授權指令與特權指令。如需角色的更多資訊,請參閱「System Administration Guide: Security Services」中的「Configuring RBAC (Task Map)」


  3. 從 DVD 或 CD 啟動。


    # init 6
    

    會顯示 GRUB 功能表。


    GNU GRUB version 0.95 (616K lower / 4127168K upper memory)
    +-------------------------------------------------------------------+
    |Solaris 10 9/10                                                    |
    |Solaris 10 9/10 Serial Console ttya                                |
    |Solaris 10 9/10 Serial Console ttyb (for lx50, v60x and v65x       |
    +-------------------------------------------------------------------+
    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. 等待啟動預設選項,或選擇顯示的任何選項。

    會顯示安裝畫面。


    +-------------------------------------------------------------------+
    
    |Select the type of installation you want to perform:                |
    |                                                                    |
    |         1 Solaris Interactive                                      |
    |         2 Custom JumpStart                                         |
    |         3 Solaris Interactive Text (Desktop session)               |
    |         4 Solaris Interactive Text (Console session)               |
    |         5 Apply driver updates                                     |
    |         6 Single user shell                                        |
    |                                                                    |
    |        Enter the number of your choice followed by the <ENTER> key.|
    |        Alternatively, enter custom boot arguments directly.        |
    |
    |         If you wait 30 seconds without typing anything,            |
    |         an interactive installation will be started.               |
    +----------------------------------------------------------------- --+
  5. 選擇 [Single user shell] (單一使用者 shell) 選項。

    會顯示下列訊息。


    Do you wish to automatically update the boot archive? y /n
  6. 鍵入: n


    Starting shell...
    #

    您現在處於單一使用者模式。

  7. 掛載啟動環境。然後啟動並重新啟動。


    # 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