Solaris 9 安裝指南

使用 Solaris Live Upgrade(指令行介面)的升級範例

在此範例中,將會在執行 Solaris 2.6 版的系統上使用 lucreate 指令來建立新的啟動環境,並藉由使用 luupgrade 指令,將新的啟動環境升級到 Solaris 9。升級後的啟動環境將使用 luactivate 指令啟動。此範例亦提供退回至原始啟動環境的範例。

在現用中啟動環境安裝 Live Upgrade

  1. 插入 Solaris 9 DVD 或 Solaris 9 Software 2 of 2 CD。

  2. 針對您所使用的媒體,執行相應步驟。

    • 如果您使用 Solaris 9 DVD,請轉至安裝程式目錄,然後執行安裝程式。


      # cd /cdrom/cdrom0/Solaris_9/Tool/Installers
      # ./liveupgrade20
      

      螢幕上將會顯示 Solaris Web Start 安裝程式。

    • 如果您使用 Solaris 9 Software 2 of 2 CD,則請執行安裝程式。


      % ./installer
      

      螢幕上將會顯示 Solaris Web Start 安裝程式。

  3. 從安裝面板上的「選擇類型」中,按一下「自訂」。

  4. 在「區性選項」面板上,按一下欲安裝的語言。

  5. 選擇欲安裝的軟體。

    • 使用 DVD 安裝時,請在「元件選項」面板上按一下「下一步」以安裝套裝軟體。

    • 使用 CD 安裝時,請在「產品選項」面板上按一下 Solaris Live Upgrade 的「預設安裝」,然後按一下其他軟體的選項以將它們取消選取。

  6. 請遵循 Solaris Web Start 安裝程式面板上的指示來安裝軟體。

建立啟動環境

使用 - c 選項,將來源啟動環境命名為 c0t4d0s0。第一次在系統中使用 Solaris Live Upgrade 建立啟動環境時,需要為來源啟動環境命名。之後任何啟動環境的建立過程均無需使用 - c 選項。

新的啟動環境將命名為 c0t15d0s0。-A 選項可以建立與啟動環境名稱關聯的一段說明。

根 (/home) 檔案系統會複製到新的啟動環境。 另外,系統會建立新的交換磁片,而不是共用來源啟動環境的交換磁片。


# 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/ins3-svr/export/s9/combined.s9s_wos

檢查啟動環境是否可啟動

lustatus 指令可報告已建立的啟動環境是否完整,以及啟動環境是否可啟動。


# lustatus

BE_name                     Complete  Active  ActiveOnReboot  CopyStatus
------------------------------------------------------------------------
c0t4d0s0                    yes       yes     yes             -
c0t15d0s0                   yes       no      no              -

啟動非現用中啟動環境

c0t15d0s0 啟動環境藉由 luactivate 指令成為可啟動環境。 然後,系統重新啟動,c0t15d0s0 變為現用中啟動環境。c0t4d0s0 啟動環境現在是非作用中的環境。


# luactivate c0t15d0s0
# init 6

退回至來源啟動環境

依據新啟動環境之啟動狀況,存在三種退回程序:

如果要在成功建立啟動環境的情況下退回

在此範例中,原始的 c0t4d0s0 啟動環境會復原成現用中啟動環境,雖然它成功啟動。 裝置名稱是 first_disk。


# /usr/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 將變成現用中啟動環境。

使用 DVD、CD 或網路安裝影像關閉退回至原始開機環境

在此範例中,新的啟動環境無法啟動,亦無法從原始啟動環境啟動,且必須使用媒體或網路安裝影像進行啟動。裝置是 /dev/dsk/c0t4d0s0。原始啟動環境即 c0t4d0s0 將變成現用中啟動環境。


OK boot net -s
# fsck /dev/dsk/c0t4d0s0
# mount /dev/dsk/c0t4d0s0 /mnt 
# /mnt/sbin/luactivate
# umount /mnt 
# init 6