當您使用安裝伺服器上的 add_install_client -d 程序檔加入用戶端時,程序檔會報告標準輸出的 DHCP 配置資訊。當您建立用於將網路安裝資訊傳輸至用戶端的選項與巨集時,可以使用此資訊。
若要從網路安裝 DHCP 用戶端,必須建立供應商種類選項以傳輸安裝 Solaris 作業系統所需的資訊。表 7–4 顯示您必須建立的選項,以及建立這些選項所需的屬性。
您可以在 DHCP 服務中自訂巨集,以執行下列類型的安裝。
特定類別安裝 - 您可以指示 DHCP 服務為特定類別的所有用戶端執行網路安裝。例如, 您可以定義一個 DHCP 巨集,該巨集在網路上的所有 Sun Blade 系統中執行相同的安裝。使用 add_install_client -d 指令的輸出來設定特定類別安裝。
特定用戶端安裝 - 您可以指示 DHCP 服務為具有特定乙太網路位址的用戶端執行網路安裝。例如,您可以定義一個 DHCP 巨集,該巨集在乙太網路位址為 00:07:e9:04:4a:bf 的用戶端上執行特定安裝。使用 add_install_client -d -e ethernet_address 指令的輸出來設定特定用戶端安裝。
如需有關設定要從網路安裝的用戶端之更多資訊,請參閱下列程序。
如需使用 DVD 媒體的網路安裝,請參閱使用 DVD 影像從網路加入要安裝的系統。
如需使用 CD 媒體的網路安裝,請參閱使用 CD 媒體加入要從網路安裝的系統。
下表中列出的供應商用戶端類別說明哪些類別的用戶端可以使用此選項。此處列出的供應商用戶端類別僅為範例。在您想要從網路進行安裝的用戶端中,您應該指定其用戶端類別。請參閱「System Administration Guide: IP Services」中的「Working With DHCP Options (Task Map)」,以取得有關如何確定用戶端的供應商用戶端類別的資訊。
如需有關 DHCP 選項的詳細資訊,請參閱「System Administration Guide: IP Services」中的「DHCP Option Information」。
表 7–4 用於建立 Solaris 用戶端供應商種類選項的值
名稱 |
字碼 |
資料類型 |
顆粒性 |
最大 |
供應商用戶端類別 * |
描述 |
---|---|---|---|---|---|---|
以下供應商種類選項是使 DHCP 伺服器支援 Solaris 安裝用戶端所必需的。這些選項在 Solaris 用戶端的啟動程序檔中使用。 |
||||||
SrootIP4 |
2 |
IP 位址 |
1 |
1 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
根伺服器的 IP 位址 |
SrootNM |
3 |
ASCII 文字 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
根伺服器的主機名稱 |
SrootPTH |
4 |
ASCII 文字 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
根伺服器上用戶端根目錄的路徑 |
SinstIP4 |
10 |
IP 位址 |
1 |
1 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
JumpStart 安裝伺服器的 IP 位址 |
SinstNM |
11 |
ASCII 文字 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
安裝伺服器的主機名稱 |
SinstPTH |
12 |
ASCII 文字 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
安裝伺服器上安裝影像的路徑 |
用戶端啟動程序檔可以使用以下選項,但不是程序檔必需的。 |
||||||
SrootOpt |
1 |
ASCII 文字 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
用戶端根檔案系統的 NFS 裝載選項 |
SbootFIL |
7 |
ASCII 文字 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
用戶端的啟動檔案路徑 |
SbootRS |
9 |
數字 |
2 |
1 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
載入核心程式時由獨立式啟動程式使用的 NFS 讀取大小 |
SsysidCF |
13 |
ASCII 文字 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
sysidcfg 檔案路徑,格式為 server:/path |
SjumpsCF |
14 |
ASCII 文字 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
JumpStart 配置檔案路徑,格式為 server:/path |
16 |
ASCII 文字 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
獨立啟動檔案路徑或 WAN Boot 檔案路徑。獨立啟動檔案使用以下格式: tftp://inetboot.sun4u WAN Boot 檔案的格式為 http://host.domain/path-to-file 此選項可以用於覆寫 BootFile 與 siaddr 設定,以便擷取獨立啟動檔案。支援的協定:tftp (inetboot)、http (wanboot)。例如,使用以下格式:tftp://inetboot.sun4u |
|
17 |
ASCII 文字 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
網路上所使用的代理伺服器 IP 位址與通訊埠編號。僅當透過 WAN 啟動用戶端或者本機網路使用代理伺服器時,才需要此選項。例如,使用以下格式:198.162.10.5:8080 |
|
Solaris 用戶端啟動程序檔目前不使用以下選項。您僅可以在編輯啟動程序檔時使用它們。 |
||||||
SswapIP4 |
5 |
IP 位址 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
交換伺服器的 IP 位址 |
SswapPTH |
6 |
ASCII 文字 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
交換伺服器上用戶端交換檔案的路徑 |
Stz |
8 |
ASCII 文字 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
用戶端的時區 |
Sterm |
15 |
ASCII 文字 |
1 |
0 |
SUNW.Sun-Blade-1000、SUNW.Sun-Fire-880、SUNW.i86pc |
終端機類型 |
選項建立完畢之後,您可以建立包含這些選項的巨集。下表列出了您可以建立以支援用戶端的 Solaris 安裝的巨集範例。
表 7–5 支援網路安裝用戶端的巨集範例
巨集名稱 |
包含以下選項與巨集 |
---|---|
Solaris |
SrootIP4、SrootNM、SinstIP4、SinstNM |
sparc |
SrootPTH、SinstPTH |
sun4u |
Solaris 與 sparc 巨集 |
i86pc |
Solaris 巨集、SrootPTH、SinstPTH、SbootFIL |
SUNW.i86pc |
i86pc 巨集 |
SUNW.Sun-Blade-1000 |
sun4u 巨集、SbootFIL |
SUNW.Sun-Fire-880 |
sun4u 巨集、SbootFIL |
xxx.xxx.xxx.xxx 網路位址巨集 |
BootSrvA 選項可以加入至現有網路位址巨集中。BootSrvA 的值應該表示 tftboot 伺服器。 |
上表所列出的巨集名稱與用戶端上必須從網路安裝的供應商用戶端類別符合。這些名稱為網路上可能存在的用戶端範例。請參閱「System Administration Guide: IP Services」中的「Working With DHCP Options (Task Map) 」,以取得有關決定用戶端的供應商用戶端類別的資訊。
您可以使用以下方法建立這些選項與巨集。
撰寫一個透過 dhtadm 指令而建立選項與巨集的程序檔。請參閱撰寫使用 dhtadm 建立選項與巨集的程序檔,以取得有關如何撰寫用於建立這些選項與巨集的程序檔之資訊。
在 DHCP 管理程式中建立選項與巨集。請參閱使用 DHCP 管理程式建立安裝選項與巨集,以取得有關如何在 DHCP 管理程式中建立選項與巨集的說明。
您可以透過改寫範例 7–1 中的範例,建立表 7–4 中列出的所有選項以及某些有用巨集,來建立一個 Korn shell 程序檔。一定要將所有的 IP 位址和引號中的值變更為正確的網路 IP 位址、伺服器名稱以及路徑。您還應該編輯 Vendor= 密鑰以指示您所擁有的用戶端之類別。使用 add_install_client -d 報告的資訊以取得改寫程序檔所需的資料。
# Load the Solaris vendor specific options. We'll start out supporting # the Sun-Blade-1000, Sun-Fire-880, and i86 platforms. Changing -A to -M would replace # the current values, rather than add them. dhtadm -A -s SrootOpt -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,1,ASCII,1,0' dhtadm -A -s SrootIP4 -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,2,IP,1,1' dhtadm -A -s SrootNM -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,3,ASCII,1,0' dhtadm -A -s SrootPTH -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,4,ASCII,1,0' dhtadm -A -s SswapIP4 -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,5,IP,1,0' dhtadm -A -s SswapPTH -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,6,ASCII,1,0' dhtadm -A -s SbootFIL -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,7,ASCII,1,0' dhtadm -A -s Stz -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,8,ASCII,1,0' dhtadm -A -s SbootRS -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,9,NUMBER,2,1' dhtadm -A -s SinstIP4 -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,10,IP,1,1' dhtadm -A -s SinstNM -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,11,ASCII,1,0' dhtadm -A -s SinstPTH -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,12,ASCII,1,0' dhtadm -A -s SsysidCF -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,13,ASCII,1,0' dhtadm -A -s SjumpsCF -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,14,ASCII,1,0' dhtadm -A -s Sterm -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,15,ASCII,1,0' dhtadm -A -s SbootURI -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,16,ASCII,1,0' dhtadm -A -s SHTTPproxy -d \ 'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,17,ASCII,1,0' # Load some useful Macro definitions. # Define all Solaris-generic options under this macro named Solaris. dhtadm -A -m Solaris -d \ ':SrootIP4=10.21.0.2:SrootNM="blue2":SinstIP4=10.21.0.2:SinstNM="red5":' # Define all sparc-platform specific options under this macro named sparc. dhtadm -A -m sparc -d \ ':SrootPTH="/export/sparc/root":SinstPTH="/export/sparc/install":' # Define all sun4u architecture-specific options under this macro named sun4u. # (Includes Solaris and sparc macros.) dhtadm -A -m sun4u -d ':Include=Solaris:Include=sparc:' # Solaris on IA32-platform-specific parameters are under this macro named i86pc. dhtadm -A -m i86pc -d \ ':Include=Solaris:SrootPTH="/export/i86pc/root":SinstPTH="/export/i86pc/install"\ :SbootFIL="/platform/i86pc/kernel/unix":' # Solaris on IA32 machines are identified by the "SUNW.i86pc" class. All # clients identifying themselves as members of this class will see these # parameters in the macro called SUNW.i86pc, which includes the i86pc macro. dhtadm -A -m SUNW.i86pc -d ':Include=i86pc:' # Sun-Blade-1000 platforms identify themselves as part of the # "SUNW.Sun-Blade-1000" class. # All clients identifying themselves as members of this class # will see these parameters. dhtadm -A -m SUNW.Sun-Blade-1000 -d \ ':SbootFIL="/platform/sun4u/kernel/sparcv9/unix":\ Include=sun4u:' # Sun-Fire-880 platforms identify themselves as part of the "SUNW.Sun-Fire-880" class. # All clients identifying themselves as members of this class will see these parameters. dhtadm -A -m SUNW.Sun-Fire-880 -d \ ':SbootFIL="/platform/sun4u/kernel/sparcv9/unix":Include=sun4u:' # Add our boot server IP to each of the network macros for our topology served by our # DHCP server. Our boot server happens to be the same machine running our DHCP server. dhtadm -M -m 10.20.64.64 -e BootSrvA=10.21.0.2 dhtadm -M -m 10.20.64.0 -e BootSrvA=10.21.0.2 dhtadm -M -m 10.20.64.128 -e BootSrvA=10.21.0.2 dhtadm -M -m 10.21.0.0 -e BootSrvA=10.21.0.2 dhtadm -M -m 10.22.0.0 -e BootSrvA=10.21.0.2 # Make sure we return host names to our clients. dhtadm -M -m DHCP-servername -e Hostname=_NULL_VALUE_ # The client with this MAC address is a diskless client. Override the root settings # which at the network scope setup for Install with our client's root directory. dhtadm -A -m 0800201AC25E -d \ ':SrootIP4=10.23.128.2:SrootNM="orange-svr-2":SrootPTH="/export/root/10.23.128.12":' |
以超級使用者的身份使用批次模式執行 dhtadm。指定程序檔的名稱以將選項與巨集加入至您的 dhcptab。例如,如果程序檔的名稱為 netinstalloptions,請輸入以下指令:
# dhtadm -B netinstalloptions |
具有 Vendor= 字串中所列供應商用戶端類別的用戶端現在可以使用 DHCP 透過網路進行安裝。
如需有關如何使用 dhtadm 指令的更多資訊,請參閱dhtadm(1M)。 如需有關 dhcptab 檔案的更多資訊,請參閱dhcptab(4)。