PXE BOOT INSTALL WINXP
按照网上的手册安装,
[url]http://www.wenzk.net/bbs/viewthread.php?tid=834&extra=page%3D&page=1[/url]
[url]http://www.wenzk.net/bbs/viewthread.php?tid=834&extra=page%3D&page=1[/url]
有几个问题
第一个问题,困扰半天的INF file txtsetup.sif is corrupt or missing,status 21
解决办法,tftp加tftp rules,对\\重定向为/,(详细的问题可以看tftp的log,在/var/log/messages中)
第二个问题,蓝屏问题process1_initialization_failed,STOP 0x0000006B,
解决办法,修改winxp.sif应答文件中的共享
错误的设置
SetupSourceDevice = "\Device\LanmanRedirector\192.168.1.103\reminst\"
正确的设置
SetupSourceDevice = "\Device\LanmanRedirector\192.168.1.103\reminst\winxp"
SetupSourceDevice = "\Device\LanmanRedirector\192.168.1.103\reminst\"
正确的设置
SetupSourceDevice = "\Device\LanmanRedirector\192.168.1.103\reminst\winxp"
到此成功安装.如果在虚拟机中出现找不到硬盘,需要把硬盘设成IDE的.如果是真实机器,需要按F6加载硬盘驱动.
又遇到一个问题,找不到oembios.bin,忽略会导致安装完后无法登录
ry8t3-rgh7c-vxqxg-h67km-hd6f3
以下记录一下安装过程:
tftp-server
系统自带的rpm的似乎有点问题,不能加 -m 参数.
如果遇到这样的问题,自己用 源码编译一个
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -v -m /tftpboot/rules -s /tftpboot
per_source = 11
cps = 100 2
flags = IPv4
}
-v 在/var/log/messages -m 加载规则 -s 指定tftpboot根目录
如果遇到这样的问题,自己用 源码编译一个
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -v -m /tftpboot/rules -s /tftpboot
per_source = 11
cps = 100 2
flags = IPv4
}
-v 在/var/log/messages -m 加载规则 -s 指定tftpboot根目录
/tftpboot/rules
#cat /tftpboot/rules
ri ^[a-z]: # Remove “drive letters”
rg \\ / # Convert backslashes to slashes
rg \# @ # Convert hash marks to @ signs
rg /../ /..no../ # Convert /../ to /..no../
rg A a
rg B b
rg C c
rg D d
rg E e
rg F f
rg G g
rg H h
rg I i
rg J j
rg K k
rg L l
rg M m
rg N n
rg O o
rg P p
rg Q q
rg R r
rg S s
rg T t
rg U u
rg V v
rg W w
rg X x
rg Y y
rg Z z
r ^/(.*) \1
#cat /tftpboot/rules
ri ^[a-z]: # Remove “drive letters”
rg \\ / # Convert backslashes to slashes
rg \# @ # Convert hash marks to @ signs
rg /../ /..no../ # Convert /../ to /..no../
rg A a
rg B b
rg C c
rg D d
rg E e
rg F f
rg G g
rg H h
rg I i
rg J j
rg K k
rg L l
rg M m
rg N n
rg O o
rg P p
rg Q q
rg R r
rg S s
rg T t
rg U u
rg V v
rg W w
rg X x
rg Y y
rg Z z
r ^/(.*) \1
service xinetd restart
dhcp.conf
allow booting;
allow bootp;
allow bootp;
next-server 192.168.1.222;
filename "/pxelinux.0";
filename "/pxelinux.0";
创建必要的文件:
把 pxelinux.0 rules 复制到 /tftpboot目录下,创建/tftpboot/pxelinux.cfg目录,在该目录下创建:
default文件,内容为视情况修改:
把 pxelinux.0 rules 复制到 /tftpboot目录下,创建/tftpboot/pxelinux.cfg目录,在该目录下创建:
default文件,内容为视情况修改:
DEFAULT HD0
PROMPT 1
TIMEOUT 300
#ONTIMEOUT BOOT_PXE
PROMPT 1
TIMEOUT 300
#ONTIMEOUT BOOT_PXE
LABEL winpe
MENU LABEL ^1----Boot for WinPE tools
kernel winpe.0
MENU LABEL ^1----Boot for WinPE tools
kernel winpe.0
LABEL wxp
MENU LABEL ^1----Boot for Install WindowsXP
kernel winxp.0
MENU LABEL ^1----Boot for Install WindowsXP
kernel winxp.0
LABEL dos
MENU LABEL ^2----Boot for Dos Tools
kernel memdisk
append initrd=dos/dostools.img
MENU LABEL ^2----Boot for Dos Tools
kernel memdisk
append initrd=dos/dostools.img
LABEL ghost
MENU LABEL ^3----Boot for Ghost 8.3
kernel memdisk
append initrd=dos/ghost83.img
MENU LABEL ^3----Boot for Ghost 8.3
kernel memdisk
append initrd=dos/ghost83.img
LABEL pqmagic
MENU LABEL ^4----Boot for PQMagic 8.05
kernel memdisk
append initrd=dos/pm805.img
MENU LABEL ^4----Boot for PQMagic 8.05
kernel memdisk
append initrd=dos/pm805.img
LABEL HD0
MENU LABEL ^0----Boot from the first HD
kernel chain.c32
append hd0
MENU LABEL ^0----Boot from the first HD
kernel chain.c32
append hd0
# eof: pxelinux.cfg/default
到这里,PXE启动倒是没有什么问题了,只是启动WinXP的一些准备工作还没有做。
把WinXP光盘上的i386目录复制到/tftpboot/winxp目录下,参考[url]http://blog.yalin.tw/2007/06/pxe-in-freebsd-windows-xp.html[/url]文章把一个正在运行的WinXP SP2下的WINDOWS\inf目录复制到/tftpboot/winxp/i386目录下
进入/tftpboot/winxp/i386目录,解开driver.cab文件。
#cabextract driver.cab
cabextract需要安装
#cabextract driver.cab
cabextract需要安装
先进入/tftpboot/winxp目录,执行:
find ./ -depth | perl -ne 'chomp;m[^/]*$>;$d=$`;$_=$f=$&;''s/([\x80-\xFF].)|(\w)/$1\l$2/g;system "mv",$d.$f,$d.$_ if $f ne $_'
OK,这下就把所有文件都改成小写了。
- Extract the pxe loader:
cabextract
cabextract
- Modify the name of the loader from NTLDR to XPLDR:
sed -i -e 's/NTLDR/XPLDR/gi' startrom.n12
sed -i -e 's/NTLDR/XPLDR/gi' startrom.n12
- Move the modified pxe loader to tftpd root, and call it winxp.0
- Extract the setuploader, using cabextract:
cabextract
cabextract
- Modify the name of the response file from winnt.sif to winxp.sif
sed -i -e 's/winnt\.sif/winxp\.sif/gi' setupldr.exe
sed -i -e 's/winnt\.sif/winxp\.sif/gi' setupldr.exe
- Modify the name of ntdetect from ntdetect.com to ntdetect.wxp
sed -i -e 's/ntdetect\.com/ntdetect\.wxp/gi' setupldr.exe
sed -i -e 's/ntdetect\.com/ntdetect\.wxp/gi' setupldr.exe
- Move the modified setuploader to tftpd root, and call it XPLDR
- Copy
创建应答文件winxp.sif
[data]
floppyless = "1"
msdosinitiated = "1"
; Needed for second stage
OriSrc = "\\192.168.1.103\reminst\winxp\i386"
OriTyp = "4"
LocalSourceOnCD = 1
DisableAdminAccountOnDomainJoin = 1
floppyless = "1"
msdosinitiated = "1"
; Needed for second stage
OriSrc = "\\192.168.1.103\reminst\winxp\i386"
OriTyp = "4"
LocalSourceOnCD = 1
DisableAdminAccountOnDomainJoin = 1
[SetupData]
OsLoadOptions = "/fastdetect"
; Needed for first stage
SetupSourceDevice = "\Device\LanmanRedirector\192.168.1.103\reminst\winxp"
OsLoadOptions = "/fastdetect"
; Needed for first stage
SetupSourceDevice = "\Device\LanmanRedirector\192.168.1.103\reminst\winxp"
;自动应答文件,如果想自动完成安装,需要下面的部分
[Unattended]
UnattendMode=FullUnattended
UnattendSwitch="Yes"
OemPreinstall="Yes"
OemSkipEula="Yes"
FileSystem=*
WaitForReboot="No"
NoWaitAfterTextMode=1
NoWaitAfterGUIMode=1
DriverSigningPolicy=Ignore
NonDriverSigningPolicy=Ignore
Hibernation="No"
TargetPath = \WINDOWS
InstallFilesPath = "\\192.168.1.103\reminst\winxp\i386"
LegacyNIC = 1
[SystemRestore]
[GuiUnattended]
EncryptedAdminPassword="No"
AutoLogon="Yes"
AdminPassword=*
OEMSkipRegional=1
[root@localhost ris-linux-0.3]# cat /tftpboot/winxp.sif
[data]
floppyless = "1"
msdosinitiated = "1"
; Needed for second stage
OriSrc = "\\192.168.1.103\reminst\winxp\i386"
OriTyp = "4"
LocalSourceOnCD = 1
DisableAdminAccountOnDomainJoin = 1
UnattendMode=FullUnattended
UnattendSwitch="Yes"
OemPreinstall="Yes"
OemSkipEula="Yes"
FileSystem=*
WaitForReboot="No"
NoWaitAfterTextMode=1
NoWaitAfterGUIMode=1
DriverSigningPolicy=Ignore
NonDriverSigningPolicy=Ignore
Hibernation="No"
TargetPath = \WINDOWS
InstallFilesPath = "\\192.168.1.103\reminst\winxp\i386"
LegacyNIC = 1
[SystemRestore]
[GuiUnattended]
EncryptedAdminPassword="No"
AutoLogon="Yes"
AdminPassword=*
OEMSkipRegional=1
[root@localhost ris-linux-0.3]# cat /tftpboot/winxp.sif
[data]
floppyless = "1"
msdosinitiated = "1"
; Needed for second stage
OriSrc = "\\192.168.1.103\reminst\winxp\i386"
OriTyp = "4"
LocalSourceOnCD = 1
DisableAdminAccountOnDomainJoin = 1
[SetupData]
OsLoadOptions = "/fastdetect"
; Needed for first stage
SetupSourceDevice = "\Device\LanmanRedirector\192.168.1.103\reminst\winxp"
OsLoadOptions = "/fastdetect"
; Needed for first stage
SetupSourceDevice = "\Device\LanmanRedirector\192.168.1.103\reminst\winxp"
samba的设置
/etc/samba/smb.conf
/etc/samba/smb.conf
[global]
panic action = /usr/share/samba/panic-action %d
guest account = root
null passwords = true
security = share
workgroup = workgroup
server string = RIS Server
syslog only = no
syslog = 0;
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096
encrypt passwords = true
wins support = no
name resolve order = lmhosts host wins bcast
dns proxy = no
unix password sync = false
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
max log size = 1000
unix charset = iso-8859-15
display charset = iso-8859-15
dos charset = 850
guest account = root
null passwords = true
security = share
workgroup = workgroup
server string = RIS Server
syslog only = no
syslog = 0;
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096
encrypt passwords = true
wins support = no
name resolve order = lmhosts host wins bcast
dns proxy = no
unix password sync = false
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
max log size = 1000
unix charset = iso-8859-15
display charset = iso-8859-15
dos charset = 850
[REMINST]
browseable = yes
read only = no
path = /tftpboot
guest ok = yes
browseable = yes
read only = no
path = /tftpboot
guest ok = yes
[Unattended]
UnattendMode=FullUnattended
UnattendSwitch="Yes"
OemPreinstall="Yes"
OemSkipEula="Yes"
FileSystem=*
WaitForReboot="No"
NoWaitAfterTextMode=1
NoWaitAfterGUIMode=1
DriverSigningPolicy=Ignore
NonDriverSigningPolicy=Ignore
Hibernation="No"
TargetPath = \WINDOWS
InstallFilesPath = "\\192.168.1.103\reminst\winxp\i386"
LegacyNIC = 1
[SystemRestore]
[GuiUnattended]
EncryptedAdminPassword="No"
AutoLogon="Yes"
AdminPassword=*
OEMSkipRegional=1
TimeZone=004
OemSkipWelcome=1
[Components]
msmsgs=off
msnexplr=off
OEAccess=off
media_clips=off
media_utopia=off
Accessopt=off
AutoUpdate=off
templates=off
fax=off
Clipbook=off
charmap=off
calc=off
hypertrm=off
rec=off
vol=off
pinball=off
freecell=off
minesweeper=off
solitaire=off
spider=off
hearts=off
zonegames=off
UnattendMode=FullUnattended
UnattendSwitch="Yes"
OemPreinstall="Yes"
OemSkipEula="Yes"
FileSystem=*
WaitForReboot="No"
NoWaitAfterTextMode=1
NoWaitAfterGUIMode=1
DriverSigningPolicy=Ignore
NonDriverSigningPolicy=Ignore
Hibernation="No"
TargetPath = \WINDOWS
InstallFilesPath = "\\192.168.1.103\reminst\winxp\i386"
LegacyNIC = 1
[SystemRestore]
[GuiUnattended]
EncryptedAdminPassword="No"
AutoLogon="Yes"
AdminPassword=*
OEMSkipRegional=1
TimeZone=004
OemSkipWelcome=1
[Components]
msmsgs=off
msnexplr=off
OEAccess=off
media_clips=off
media_utopia=off
Accessopt=off
AutoUpdate=off
templates=off
fax=off
Clipbook=off
charmap=off
calc=off
hypertrm=off
rec=off
vol=off
pinball=off
freecell=off
minesweeper=off
solitaire=off
spider=off
hearts=off
zonegames=off
[UserData]
FullName = "name"
OrgName = "organization"
ComputerName = *
ProductKey="RY8T3-RGH7C-VXQXG-H67KM-HD6F3"
FullName = "name"
OrgName = "organization"
ComputerName = *
ProductKey="RY8T3-RGH7C-VXQXG-H67KM-HD6F3"
[RegionalSettings]
Language= "0409"
[WindowsFirewall]
Profiles=WindowsFirewall.TurnOffFirewall
[WindowsFirewall.TurnOffFirewall]
Mode=0
Language= "0409"
[WindowsFirewall]
Profiles=WindowsFirewall.TurnOffFirewall
[WindowsFirewall.TurnOffFirewall]
Mode=0
[Display]
BitsPerPel = 16
XResolution = 800
YResolution = 600
VRefresh = 60
[NetServices]
MS_Server=params.MS_PSched
[RemoteInstall]
Repartition = Yes
UseWholeDisk = Yes
[Shell]
DefaultStartPanelOff=Yes
DefaultThemesOff=Yes
BitsPerPel = 16
XResolution = 800
YResolution = 600
VRefresh = 60
[NetServices]
MS_Server=params.MS_PSched
[RemoteInstall]
Repartition = Yes
UseWholeDisk = Yes
[Shell]
DefaultStartPanelOff=Yes
DefaultThemesOff=Yes
接下来就是搞定Binl Server了,
wget [url]http://oss.netfarm.it/guides/ris-linux-0.3.tar.gz[/url]
tar zxf [url]http://oss.netfarm.it/guides/ris-linux-0.3.tar.gz[/url]
cd ris-linux-0.3
wget [url]http://oss.netfarm.it/guides/ris-linux-0.3.tar.gz[/url]
tar zxf [url]http://oss.netfarm.it/guides/ris-linux-0.3.tar.gz[/url]
cd ris-linux-0.3
Run infparser.py
./infparser.py /tftpboot/winxp/i386/inf
./infparser.py /tftpboot/winxp/i386/inf
Run ./binlsrv.py
注意不要关闭binlsrv.py这个进程。
配置到这里几乎全部工作都完成了,应该可以通过PXE安装WinXP了。