|
[7Apr2011]
最初貼的用 Hanewin 做 DHCP , 因不懂設定 option 175 使其 設定 gpxe 時 set keep-san 1, 終於找到了一款會用的了.
DHCP 轉用 iptools 的 DHCP , 下載及進一步資料 http://erwan.l.free.fr/.
實機 sanboot XP youtube 視頻.
http://www.youtube.com/watch?v=H_dRz2O4MWc
以下的不要看了, 除非是一定要用 Hanewin , 或是要手動輸入 iscsi target, 或是會怎樣於 Hanewin 設定 175.
找到了 , hanewin 設了 Root Path 仍然不自動 sanboot 的原因了. 把 keep-san 1 以 option 175 加入便成 , hex 值是 08 01 01 FF. http://www.etherboot.org/wiki/sanboot/win2k8_iscsi_install
5-Apr , 下圖輸入也許該是 8 1 1 255, 但也是沒用.
終於想起上次沒有人手干預下能自動 sanboot 了. 是因為生成 gpxe 時加入了 embedded script
#!gpxe
dhcp net0
set keep-san 1
sanboot iscsi:my.ip::::iqn.xyz
即是把 ip 及 target name 寫死了在 .gpxe 內. 這不是我想要的.
下圖內輸入框內容打錯了, 該是 08 01 01 FF 才對
hanewin 設定 batch:
@echo off
title HaneWindhcp 服務器安裝 by chenall@366840202.cn
setlocal
cd /d "%~dp0"
:: for /f "usebackq tokens=2 delims=[]" %%i in (`ping /n 1 %Computername%`) do set myip=%%i
:: for /f "tokens=1-3,4 delims=." %%i in ("%myip%") do set mynet=%%i.%%j.%%k
:: dont need write to file, but too many ipconfig /all , outpout to file and read. !
:: for /f "delims=: tokens=2" %%a in ('ipconfig /all^|find /i "Default Gateway"') do set default_gateway=%%a
ipconfig /all > %temp%\ipcfg_out.txt
for /f "delims=: tokens=2" %%a in ('find /i "IP Address" %temp%\ipcfg_out.txt') do set IP_Address=%%a
set IP_Address=%IP_Address: =%
for /f "tokens=1-3,4 delims=." %%i in ("%IP_Address%") do set My_IP_Range=%%i.%%j.%%k
for /f "delims=: tokens=2" %%a in ('find /i "Default Gateway" %temp%\ipcfg_out.txt') do set default_gateway=%%a
set default_gateway=%default_gateway: =%
for /f "delims=: tokens=2" %%a in ('find /i "DNS Suffix Search List" %temp%\ipcfg_out.txt') do set DNS_Suffix_Search_List=%%a
set DNS_Suffix_Search_List=%DNS_Suffix_Search_List: =%
for /f "delims=: tokens=2" %%a in ('find /i "subnet Mask" %temp%\ipcfg_out.txt') do set Subnet_Mask=%%a
set Subnet_Mask=%Subnet_Mask: =%
for /f "delims=: tokens=2" %%a in ('find /i "DHCP Server" %temp%\ipcfg_out.txt') do set DHCP_Server=%%a
set DHCP_Server=%DHCP_Server: =%
for /f "delims=: tokens=2" %%a in ('find /i "DNS Server" %temp%\ipcfg_out.txt') do set DNS_Server=%%a
set DNS_Server=%DNS_Server: =%
for /f "delims=: tokens=2" %%a in ('find /i "Primary WINS Server" %temp%\ipcfg_out.txt') do set Primary_WINS_Server=%%a
set Primary_WINS_Server=%Primary_WINS_Server: =%
Echo SubnetMask=%Subnet_Mask%
Echo BaseIP=%my_ip_range%.100
Echo NextIP=%ip_address%
Echo GatewayIP=%default_gateway%
Echo DNSName=%DNS_Suffix_Search_List%
Echo DNS1IP=%DNS_Server%
Echo WINS1IP=%Primary_WINS_Server%
Echo InterfaceIP=%ip_address%
[ 本帖最后由 adatsui 于 2011-4-7 06:23 编辑 ] |
-
pref_1.jpg
(40.38 KB, 下载次数: 224)
-
pref_2.jpg
(45.01 KB, 下载次数: 251)
-
pref_3.jpg
(51.02 KB, 下载次数: 220)
-
pref_4.jpg
(51.87 KB, 下载次数: 237)
-
pref_5.jpg
(43.4 KB, 下载次数: 243)
-
prof_1.jpg
(41.98 KB, 下载次数: 231)
-
prof_2.jpg
(51.6 KB, 下载次数: 232)
-
prof_3.jpg
(28.94 KB, 下载次数: 251)
-
prof_4.jpg
(27.63 KB, 下载次数: 242)
-
prof_5.jpg
(49.44 KB, 下载次数: 242)
-
prof_6.jpg
(38.95 KB, 下载次数: 221)
|