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

x86: 轉至備用原始啟動環境

若要轉至備用原始啟動環境,請選擇最適合您情況之程序。

Procedurex86: 在成功啟動新啟動環境的情況下使用 GRUB 功能表轉至備用環境

當您已成功啟動新的啟動環境後對結果不滿意,可以使用此程序。使用 GRUB 功能表,您可以快速切換回原始啟動環境。


備註 –

進行切換的啟動環境必須是使用 GRUB 軟體建立的 GRUB 啟動環境。如果使用 Solaris 8、9 或 10 3/05 發行版本建立啟動環境,則該啟動環境不是 GRUB 啟動環境。


  1. 成為超級使用者,或者假定一個對等身份。

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

  2. 重新啟動系統。


    # init 6
    

    會顯示 GRUB 功能表。Solaris 作業系統是原始啟動環境。second_disk 啟動環境已成功啟動,並出現在 GRUB 功能表上。如果主要項目因為某些原因並未啟動,可使用 failsafe 項目進行回復。


    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. 若要啟動原始啟動環境,請使用箭頭鍵選取原始啟動環境,然後按 Return 鍵。


範例 6–1 在成功啟動新啟動環境的情況下轉至備用環境


# su
# init 6

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.

選取原始啟動環境 Solaris


Procedurex86: 在啟動環境啟動失敗的情況下使用 GRUB 功能表轉至備用環境

如果啟動失敗,請使用下列程序轉至備用原始啟動環境。在此範例中,GRUB 功能表會正確顯示,但是不會啟動新的啟動環境。裝置是 /dev/dsk/c0t4d0s0。原始啟動環境 c0t4d0s0 將成為使用中啟動環境。


注意 – 注意 –

若為 Solaris 10 3/05 發行版本,如果舊版啟動環境和新的啟動環境在不同的磁碟上,建議的轉至備用環境動作包括變更 BIOS 中的硬碟啟動順序。從 Solaris 10 1/06 發行版本開始,變更 BIOS 磁碟順序不再需要,且強烈不建議您這麼做。變更 BIOS 磁碟順序可能會使 GRUB 功能表無效,並導致啟動環境變成無法啟動。如果變更 BIOS 磁碟順序,將順序復原成原始設定可復原系統的功能。


  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 啟動環境,請跳至x86: 在啟動環境啟動失敗的情況下使用 GRUB 功能表和 DVD 或 CD 轉至備用環境程序。

  4. 編輯 GRUB 功能表以啟動為單一使用者模式。

    1. 若要編輯 GRUB 主功能表,請鍵入 e

      如此會顯示 GRUB 編輯功能表。


      root (hd0,2,a)
      kernel /platform/i86pc/multiboot
      module /platform/i86pc/boot_archive
    2. 使用箭頭鍵選取原始啟動環境的核心項目。

    3. 若要編輯啟動項目,請鍵入 e

      核心項目會顯示在 GRUB 編輯功能表中。


      grub edit>kernel /boot/multiboot
    4. 鍵入 -s 並按 Enter 鍵。

      下列範例指出 -s 選項的放置處。


      grub edit>kernel /boot/multiboot -s
      
    5. 若要以單一使用者模式開始啟動程序,請鍵入 b。

  5. 請視需要針對備用啟動環境檢查根 (/) 檔案系統的完整性。


    # fsck mount_ point
    
    mount_point

    已知且可信賴的根 (/) 檔案系統

  6. 將原始啟動環境的根磁碟片段掛載至某一目錄 (如 /mnt):


    # mount device_name /mnt
    
    device_name

    指定您想要轉至備用啟動環境之磁碟裝置上的根 (/) 檔案系統位置。裝置名稱會以 /dev/dsk/c wtxd ysz 格式輸入。

  7. 從使用中啟動環境根磁碟片段,請鍵入:


    # /mnt/sbin/luactivate
    

    luactivate 會啟動上一個運作的啟動環境並指出結果。

  8. 卸載 /mnt


    # umount /mnt
    
  9. 重新啟動。


    # init 6
    

    上一個運作的啟動環境會成為使用中啟動環境。

Procedurex86: 在啟動環境啟動失敗的情況下使用 GRUB 功能表和 DVD 或 CD 轉至備用環境

如果啟動失敗,請使用下列程序轉至備用原始啟動環境。在此範例中,新的啟動環境無法啟動,此外,不會顯示 GRUB 功能表。裝置是 /dev/dsk/c0t4d0s0。原始啟動環境 c0t4d0s0 將成為使用中啟動環境。


注意 – 注意 –

若為 Solaris 10 3/05 發行版本,如果舊版啟動環境和新的啟動環境在不同的磁碟上,建議的轉至備用環境動作包括變更 BIOS 中的硬碟啟動順序。從 Solaris 10 1/06 發行版本開始,變更 BIOS 磁碟順序不再需要,且強烈不建議您這麼做。變更 BIOS 磁碟順序可能會使 GRUB 功能表無效,並導致啟動環境變成無法啟動。如果變更 BIOS 磁碟順序,將順序復原成原始設定可復原系統的功能。


  1. 成為超級使用者,或者假定一個對等身份。

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

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

  3. 從 DVD 或 CD 啟動。


    # init 6
    

    會顯示 GRUB 功能表。


    GNU GRUB version 0.95 (616K lower / 4127168K upper memory)
    +-------------------------------------------------------------------+
    |Solaris 10 8/07                                               |
    |Solaris 10 8/07 Serial Console ttya                           |
    |Solaris 10 8/07 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 mount_ point
    
    mount_point

    已知且可信賴的根 (/) 檔案系統

  8. 將原始啟動環境的根磁碟片段掛載至某一目錄 (如 /mnt):


    # mount device_name /mnt
    
    device_name

    指定您想要轉至備用啟動環境之磁碟裝置上的根 (/) 檔案系統位置。裝置名稱會以 /dev/dsk/c wtxd ysz 格式輸入。

  9. 從使用中啟動環境根磁碟片段,請鍵入:


    # /mnt/sbin/luactivate
    Do you want to fallback to activate boot environment c0t4d0s0
    (yes or no)? yes
    

    luactivate 會啟動上一個運作的啟動環境並指出結果。

  10. 卸載 /mnt


    # umount device_name
    
    device_name

    指定您想要轉至備用啟動環境之磁碟裝置上的根 (/) 檔案系統位置。裝置名稱會以 /dev/dsk/c wtxd ysz 格式輸入。

  11. 重新啟動。


    # init 6
    

    上一個運作的啟動環境會成為使用中啟動環境。