Solaris 10 5/08 安裝指南:Solaris Flash 歸檔 (建立與安裝)

Procedure使用 Solaris Live Upgrade 建立 Solaris Flash 差動歸檔

要管理系統更新,您可以使用 Solaris Live Upgrade 複製作業系統,這樣會建立新的啟動環境。此副本可以與藉由少量變更更新過的主系統進行對比。然後,便可以在複製系統上安裝所產生的 Solaris Flash 差動歸檔。

如需有關 Solaris Live Upgrade 的更多資訊,請參閱「Solaris 10 5/08 安裝指南:Solaris Live Upgrade 與升級規劃」中的第 2 章「Solaris Live Upgrade (簡介)」

  1. 從未變更的主系統中,使用 lucreate 指令建立新啟動環境。

    該新啟動環境是主系統的精確副本,可以用來建立差動歸檔。

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

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

  3. 檢查兩個啟動環境的狀態。


    # lustatus copy_BE
    
    boot environment   Is        Active  Active     Can	    Copy
    Name               Complete  Now	 OnReboot   Delete	 Status
    ------------------------------------------------------------------------
    master_BE          yes       yes     yes        no       -     
    copy_BE            yes       no      no         yes      -  
  4. 藉由以下任何變更來更新主影像。

    • 刪除套裝軟體。

    • 增加套裝軟體或修補程式。

    • 修改配置檔案。

    • 為複製系統上的週邊裝置增加支援。

  5. (可選擇) 建立自訂程序檔。請參閱建立自訂程序檔

  6. 建立差動歸檔。

    1. 掛載新建立的啟動環境。


      # lumount BE_name /a
      
    2. 透過對比主系統與啟動環境來建立差動歸檔。


       # flarcreate -n archive_name -A new_BE_dir\  options path/filename
      
      archive_name

      指定歸檔的名稱。

      -A new_BE_dir

      透過對比新系統影像與 new BE_dir 引數所指定的影像,來建立差動歸檔。

      options

      如需選項的清單,請參閱flar 指令

      path

      指定要儲存該歸檔檔案的目錄之路徑。如果不指定路徑,flarcreate 會將歸檔檔案儲存在目前的目錄中。

      filename

      指定歸檔檔案的名稱。

    3. 卸載新啟動環境。


      # luumount copy_BE
      

    flarcreate 指令將傳回一個退出碼。

    • 如果建立成功,將傳回退出碼 0。

    • 如果發生故障,將傳回一個非零的退出碼。

  7. 使用 JumpStart 設定檔安裝 Solaris Flash 差動歸檔。

    要安裝的複製系統必須是原始主系統的複製件,否則安裝將失敗。

    以下範例設定檔將在裝置 c1t1d0s0 上安裝差動歸檔 test.diff


    JumpStart profile
    -----------------------
    install_type  flash_update
    archive_location http server /rw/test.diff
    root_device c1t1d0s0

範例 3–16 使用 Solaris Live Upgrade 建立差動歸檔

master_BE 是目前啟動環境的名稱。copy_BE 是新啟動環境的名稱。檔案系統根 (/) 和 /usr 位於 s0s3lustatus 指令將報告是否已完成新啟動環境的複製。SUNWman 套裝模組將被增加至主系統。增加 SUNWman 套裝模組來更新主系統之後,flarcreate 指令會透過比較變更的主啟動環境以及未變更的新啟動環境來建立差動歸檔。


# lucreate -c master_BE  -m /:/dev/dsk/c0t1d0s0:ufs \
-m /usr:/dev/dsk/c0t1d0s3:ufs -n copy_BE
# lustatus
# pkgadd SUNWman
# lumount copy_BE /a
# flar create -n test.diff -c -A /a /net/server/export/test.diff
# luumount copy_BE

在複製系統上安裝差動歸檔。如需有關安裝歸檔的程序,請參閱「Solaris 10 5/08 安裝指南:自訂 JumpStart 及進階安裝」中的「準備使用自訂 JumpStart 安裝來安裝 Solaris Flash 歸檔」

下圖所示為如何使用 lucreate 指令來建立新啟動環境。

上下文對圖例進行了說明。