在此範例中,透過在執行 Solaris 9 發行版本的系統上使用 lucreate 指令,建立新的啟動環境。將使用 luupgrade 指令,將新啟動環境升級成 Solaris 10 發行版本。將使用 luactivate 指令啟動升級後的啟動環境。並提供返回至原始啟動環境的範例。
說明 |
更多資訊 |
|
---|---|---|
注意 – Solaris Live Upgrade 的正確運作要求特定作業系統版本先安裝限定的一組修補程式修訂版。安裝或執行 Solaris Live Upgrade 之前,必須安裝這些修補程式。 僅適用於 x86 – 從 Solaris 1/06 發行版本開始,如果未安裝這組修補程式,Solaris Live Upgrade 會失敗,且您可能會看到下列錯誤訊息。如果沒有看到下列錯誤訊息,還是有可能未安裝必要的修補程式。請務必確認 Sunsolve 資訊文件上所列的所有修補程式都已安裝,然後再嘗試安裝 Solaris Live Upgrade。
資訊文件 72099 中所列的修補程式隨時會變更。這些修補程式可能會修正 Solaris Live Upgrade 中的缺陷,以及修正 Solaris Live Upgrade 相依之元件中的缺陷。如果使用 Solaris Live Upgrade 出現任何問題,請檢查並確定已安裝最新的 Solaris Live Upgrade 修補程式。 |
請參閱 http://sunsolve.sun.com,確定您有最近更新的修補程式清單。在 SunSolve 網站上搜尋資訊文件 72099。 |
|
如果您執行的是 Solaris 8 或 Solaris 9 作業系統,則可能無法執行 Solaris Live Upgrade 安裝程式。這些發行版本不包含執行 Java 2 執行期間環境所需要的修補程式集。您必須擁有適用於 Java 2 執行階段環境所建議的修補程式叢集,執行 Solaris Live Upgrade 安裝程式及安裝套裝軟體時建議在此環境下進行。 |
若要安裝 Solaris Live Upgrade 套裝軟體,請使用 pkgadd 指令。或者,安裝 Java 2 執行階段環境的建議修補程式叢集。修補程式叢集可以從 http://sunsolve.sun.com 上取得。 |
執行下列步驟以安裝必要的修補程式。
從 SunSolve 網站取得修補程式清單。
# patchadd /net/server/export/patches # init 6 |
插入 Solaris Operating System DVD 或 Solaris Software - 2 CD。
針對您所使用的媒體,執行相應步驟。
如果使用 Solaris Operating System DVD,請變更至安裝程式目錄,然後執行該安裝程式。
# cd /cdrom/cdrom0/Solaris_10/Tools/Installers # ./liveupgrade20 |
會顯示 Solaris 安裝程式 GUI。
如果使用 Solaris Software - 2 CD,請執行該安裝程式。
% ./installer |
會顯示 Solaris 安裝程式 GUI。
從 [選取安裝類型] 面板中,按一下 [自訂]。
在 [選取語言環境] 面板上,按一下欲安裝的語言。
選擇欲安裝的軟體。
使用 DVD 安裝時,請在 [選取元件] 面板上按 [下一步],以安裝套裝軟體。
使用 CD 安裝時,請在 [選取產品] 面板上按一下 [Solaris Live Upgrade 的預設安裝],在其他產品選項上按一下會取消選取此軟體。
請遵循 Solaris 安裝程式面板上的指示來安裝軟體。
使用 -c 選項,將來源啟動環境命名為 c0t4d0s0。僅當建立第一個啟動環境時,才需要命名來源啟動環境。如需有關使用 -c 選項命名的更多資訊,請參閱「首次建立啟動環境」步驟 2 中的說明。
新的啟動環境名稱為 c0t15d0s0。-A 選項會建立與啟動環境名稱關聯的一段描述。
根 (/) 檔案系統會複製到新的啟動環境。另外,系統會建立新的交換磁碟片段,而不是共用來源啟動環境的交換磁碟片段。
# lucreate -A 'BE_description' -c c0t4d0s0 -m /:/dev/dsk/c0t15d0s0:ufs\ -m -:/dev/dsk/c0t15d0s1:swap -n c0t15d0s0 |
非使用中啟動環境將命名為 c0t15d0s0。升級時要使用的作業系統影像取自網路。
# luupgrade -n c0t15d0s0 -u -s /net/ins-svr/export/Solaris_10 \ combined.solaris_wos |
lustatus 將報告啟動環境建立是否完成。lustatus 指令也將顯示啟動環境是否可以啟動。
# lustatus boot environment Is Active Active Can Copy Name Complete Now OnReboot Delete Status ------------------------------------------------------------------------ c0t4d0s0 yes yes yes no - c0t15d0s0 yes no no yes - |
c0t15d0s0 啟動環境已使用 luactivate 指令成為可啟動環境。然後,系統重新啟動,c0t15d0s0 變為使用中啟動環境。c0t4d0s0 啟動環境現在是非使用中狀態。
# luactivate c0t15d0s0 # init 6 |
依據新啟動環境的啟動狀況,存在下列備用程序:
在此範例中,儘管原始的 c0t4d0s0 啟動環境已成功啟動,但它仍會復原成使用中啟動環境。裝置名稱是first_disk。
# /sbin/luactivate first_disk # init 6 |
在此範例中,新的啟動環境無法啟動,在從原始啟動環境 (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 將成為使用中啟動環境。
在此範例中,新的啟動環境無法啟動,並且您無法從原始啟動環境啟動,必須使用媒體或網路安裝影像進行啟動。裝置是 /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 |
從 Solaris 10 1/06 發行版本開始,下列範例提供藉由使用 GRUB 功能表轉至備用環境的步驟。
在此範例中,GRUB 功能表會正確顯示,但是不會啟動新的啟動環境。若要啟用備用環境,請以單一使用者模式啟動原始啟動環境。
若要顯示 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. |
請從 GRUB 功能表選取原始啟動環境。啟動環境必須已使用 GRUB 軟體建立。Solaris 10 1/06 發行版本之前版本建立的啟動環境,不是 GRUB 啟動環境。如果您沒有可啟動的 GRUB 啟動環境,請跳到範例 12–5。
鍵入下列項目來編輯 GRUB 功能表:e。
使用箭頭鍵選取 kernel /boot/multiboot,然後鍵入 e。如此會顯示 GRUB 編輯功能表。
grub edit>kernel /boot/multiboot |
鍵入 -s 以啟動為單一使用者模式。
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 |
從 Solaris 10 1/06 發行版本開始,下列範例提供使用 DVD 或 CD 轉至備用環境的步驟。
在此範例中,新的啟動環境無法啟動,此外,不會顯示 GRUB 功能表。若要啟用備用,請以單一使用者模式啟動原始啟動環境。
請插入 Solaris Operating System for x86 Platforms DVD 或 Solaris Software for x86 Platforms - 1 CD。
從 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. |
鍵入下列項目來編輯 GRUB 功能表:e。
使用箭頭鍵選取 kernel /boot/multiboot,然後鍵入 e。如此會顯示 GRUB 編輯功能表。
grub edit>kernel /boot/multiboot |
鍵入 -s 以啟動為單一使用者模式。
grub edit>kernel /boot/multiboot -s |
啟動與掛載啟動環境。然後啟動並重新啟動。
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 |