跳過導航連結 | |
結束列印檢視 | |
![]() |
Oracle Solaris 10 1/13 安裝指南:Live Upgrade 與升級規劃 Oracle Solaris 10 1/13 Information Library (繁體中文) |
4. 使用 Live Upgrade 建立啟動環境 (作業)
8. 在已安裝非全域區域的系統上升級 Oracle Solaris 作業系統
從現有磁碟區遷移至 Solaris Volume Manager RAID-1 磁碟區的範例
第 2 部分使用 Live Upgrade 升級和遷移至 ZFS 根集區
11. 針對 ZFS 執行 Live Upgrade (規劃)
在此範例中,會使用執行 Solaris 9 發行版本之系統的 lucreate 指令建立新啟動環境。使用 luupgrade 指令將新啟動環境升級到 Oracle Solaris 10 8/11 發行版本。將使用 luactivate 指令啟用升級後的啟動環境。並提供返回至原始啟動環境的範例。
第一次執行 Live Upgrade 之前,您必須先從安裝媒體安裝最新的 Live Upgrade 套裝軟體,然後安裝列在 My Oracle Support 知識文件 1004881.1 - Live Upgrade Software Patch Requirements (之前為 206844) 中的修補程式。在 My Oracle Support 網站上,搜尋知識文件 1004881.1 - Live Upgrade Software Patch Requirements (之前為 206844)。
最新的套裝軟體和修補程式可確保您有此發行版本中的所有最新錯誤修正程式和新功能。在繼續建立新啟動環境之前,請確定您已安裝與您系統相關的所有修補程式。
下列步驟描述 My Oracle Support 知識文件 1004881.1 - Live Upgrade Software Patch Requirements (之前為 206844) 中的步驟。
備註 - 本程序假設系統正在執行磁碟區管理程式。如需使用磁碟區管理程式來管理可移除媒體的詳細資訊,請參閱「System Administration Guide: Devices and File Systems」。
成為超級使用者,或者假設一個對等身份。
備註 - 身份包含授權指令與特權指令。如需角色的更多資訊,請參閱「System Administration Guide: Security Services」中的「Configuring RBAC (Task Map)」。
在 My Oracle Support 網站中,遵循知識文件 1004881.1 - Live Upgrade Software Patch Requirements (之前為 206844) 中的指示,移除和新增 Live Upgrade 套裝軟體。
移除現有的 Live Upgrade 套裝軟體。
三種 Live Upgrade 套裝軟體 SUNWluu、SUNWlur 和 SUNWlucfg 組成了使用 Live Upgrade 進行升級或修補所需的軟體。這些套裝軟體包含現有軟體、新功能和錯誤修正。若您在使用 Live Upgrade 前未移除現有套裝軟體並在系統上安裝新套裝軟體,則升級或修補至目標發行版本時會失敗。從 Solaris 10 8/07 發行版本開始,會新增 SUMWlucfg 套裝軟體。如果您是使用 Oracle Solaris 10 8/07 之前發行版本的 Live Upgrade 套裝軟體,並不需要移除此套裝軟體。
# pkgrm SUNWlucfg SUNWluu SUNWlur
安裝新的 Live Upgrade 套裝軟體。
您可以使用安裝 DVD 或 CD 上的 liveupgrade20 指令,或使用 pkgadd 指令來安裝套裝軟體。使用 liveupgrade20 指令需要 Java 軟體。如果您的系統沒有安裝 Java 軟體,則必須使用 pkgadd 指令來安裝套裝軟體。如需更多資訊,請參閱 My Oracle Support 知識文件。
如果使用 Oracle Solaris Operating System DVD,請變更目錄,然後執行該安裝程式:
變更目錄。
# cd /cdrom/cdrom0/Solaris_10/Tools/Installers
備註 - 對於 SPARC 系統,安裝程式的路徑與 Solaris 10 10/08 之前發行版本的不同:
# cd /cdrom/cdrom0/s0/Solaris_10/Tools/Installers
執行安裝程式
# ./liveupgrade20 -noconsole - nodisplay
-noconsole 和 -nodisplay 選項會阻止文字使用者介面 (CUI) 顯示。
備註 - 不再支援 Live Upgrade CUI。
如果要使用 Oracle Solaris Software – 2 CD,您可以在不變更路徑的情況下執行安裝程式。
% ./installer
驗證已成功安裝套裝軟體。
# pkgchk -v SUNWlucfg SUNWlur SUNWluu
安裝列在知識文件 1004881.1 - Live Upgrade Software Patch Requirements (之前為 206844) 中的修補程式。
如果您要在本機磁碟上儲存修補程式,請建立目錄,例如 /var/tmp/lupatches。
請從 My Oracle Support 網站取得修補程式清單。
變更至修補程式目錄,如下列範例所示。
# cd /var/tmp/lupatches
安裝修補程式。
# patchadd -M path-to-patchespatch-id patch-id
path-to-patches 為修補程式目錄的路徑,例如 /var/tmp/lupatches。patch-id 為修補程式編號。請以空格分隔多個修補程式名稱。
備註 - 必須依照知識文件 1004881.1 - Live Upgrade Software Patch Requirements (之前為 206844) 指定的順序套用修補程式。
如有必要,請重新啟動系統。部分修補程式需要重新啟動後才會生效。
僅限 x86:需要重新啟動系統。否則,Live Upgrade 會失敗。
# init 6
您現在已經有成功建立新啟動環境所需的套裝軟體和修補程式。
您可以使用 Live Upgrade Pre Flight Checker 工具,以偵測可能導致 Live Upgrade 作業失敗的系統配置問題。在呼叫 lucreate 指令以建立啟動環境之前,必須先執行此工具。
下表描述如何使用 Pre Flight Checker 工具來執行系統檢查,並從某個檔案系統遷移至另一個檔案系統。
|
使用 -c 選項,將來源啟動環境命名為 c0t4d0s0。僅當建立第一個啟動環境時,才需要命名來源啟動環境。如需使用 -c 選項命名的更多資訊,請參閱「首次建立啟動環境」步驟 1 中的說明。
新的啟動環境名稱為 c0t15d0s0。-A 選項會建立與啟動環境名稱關聯的一段描述。
根 (/) 檔案系統會複製到新的啟動環境。另外,系統會建立新的交換磁碟片段,而不是共用來源啟動環境的交換磁碟片段。
# lucreate -A 'BE_description' -c /dev/dsk/c0t4d0s0 -m /:/dev/dsk/c0t15d0s0:ufs\ -m -:/dev/dsk/c0t15d0s1:swap -n /dev/dsk/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
依據新啟動環境的啟動狀況,存在下列備用程序:
若為 SPARC 系統:
若為 x86 系統,從 Solaris 10 1/06 發行版本開始,當您使用 GRUB (一種 Oracle Solaris 功能) 功能表時:
範例 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 功能表會正確顯示,但是不會啟動新的啟動環境。若要啟用備用環境,請以單一使用者模式啟動原始啟動環境。
成為超級使用者,或者假設一個對等身份。
備註 - 身份包含授權指令與特權指令。如需角色的更多資訊,請參閱「System Administration Guide: Security Services」中的「Configuring RBAC (Task Map)」。
若要顯示 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 啟動環境,請跳至範例 9-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
範例 9-5 x86: 使用 DVD 或 CD 以 GRUB 功能表轉至備用原始啟動環境
從 Solaris 10 1/06 發行版本開始,下列範例提供使用 DVD 或 CD 轉至備用環境的步驟。
在此範例中,新的啟動環境無法啟動,此外,不會顯示 GRUB 功能表。若要啟用備用環境,請以單一使用者模式啟動原始啟動環境。
請插入 Oracle Solaris Operating System for x86 Platforms DVD 或 Oracle Solaris Software for x86 Platforms - 1 CD。
成為超級使用者,或者假設一個對等身份。
備註 - 身份包含授權指令與特權指令。如需角色的更多資訊,請參閱「System Administration Guide: Security Services」中的「Configuring RBAC (Task Map)」。
從 DVD 或 CD 啟動。
# init 6
會顯示 GRUB 功能表。
GNU GRUB version 0.95 (616K lower / 4127168K upper memory) +-------------------------------------------------------------------------+ |Oracle Solaris 10 8/11 | |Oracle Solaris 10 8/11 Serial Console ttya | |Oracle Solaris 10 8/11 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.
等待啟動預設選項,或選擇顯示的任何選項。
會顯示安裝畫面。
+---------------------------------------------------------------------+ | | |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. | +--------------------------------------------------------------------+
選擇 [Single user shell] (單一使用者 shell) 選項。
會顯示下列訊息。
Do you wish to automatically update the boot archive? y /n
鍵入:n
Starting shell... #
您現在處於單一使用者模式。
掛載啟動環境。然後啟動並重新啟動。
# 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