My blog has moved! Redirecting...

You should be automatically redirected. If not, visit http://techienote.com and update your bookmarks.

Tech Resources

Tuesday, June 29, 2010

PXE booting Windows XP Installation


For pxe server setup you can refer my previous post.

Enabling rpmforge repository
#cd /root
#wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
#rpm -ivh rpmforge-release-0.5.1-1.el5.rf.i386.rpm
#yum install cabextract -y
#yum install tftp-server tftp samba -y

Mount XP CD image (I am using XP with Service Pack 3) and copy i386 folder to the directory from where you are going to start the installation
#mkdir /mnt/iso
#mount xpsp3.iso /mnt/iso
#mkdir /tftpboot/winxp/i386/ -p
#cd /mnt/iso/i386
#cp -av * /tftpboot/winxp/i386/

Also copy drivers to i386 folder. I have collected some drives you have to download & copy them to i386 folder
#cd /root
#wget http://downloads.sourceforge.net/project/bootfloppy/pxefiles.tar.gz?use_mirror=space
#tar zxvf pxefiles.tar.gz
#cd pxefiles/drivers
#cp * /tftpboot/winxp/i386/
#cd /tftpboot/winxp/i386/
#cabextract driver.cab

Creating file of windows for pxe boot
#cd /tftpboot/winxp
#cabextract /tftpboot/winxp/i386/startrom.n1_
#sed -i -e 's/NTLDR/XPLDR/gi' startrom.n12
#mv startrom.n12 winxp.0

#cabextract /tftpboot/winxp/i386/setupldr.ex_
#sed -i -e 's/winnt\.sif/winxp\.sif/gi' setupldr.exe
#sed -i -e 's/ntdetect\.com/ntdetect\.wxp/gi' setupldr.exe
#mv setupldr.exe xpldr

#cp /tftpboot/winxp/i386/ntdetect.com ntdetect.wxp

Changing the file name case if they are in uppercase
#cd /tftpboot/winxp/i386/
#ls | awk '$0!=tolower($0){printf "mv \"%s\" \"%s\"\n",$0,tolower($0)}' | sh

Creating samba share
Add this to your existing or new /etc/samba/smb.conf
#vi /etc/samba/smb.conf
[Global]
workgroup = WORKGROUP

[ris]
path = /tftpboot
browsable = true
read only = yes
writable = no
guest ok = yes
#chkconfig --level 35 smb on
#service smb restart

Creating Response file
#cd /tftpboot/winxp
#vi winxp.sif
[data]
floppyless = "1"
msdosinitiated = "1"
; Needed for second stage
OriSrc = "\\SAMBA_SERVER_IP\ris\winxp\i386"
OriTyp = "4"
LocalSourceOnCD = 1
DisableAdminAccountOnDomainJoin = 1

[SetupData]
OsLoadOptions = "/fastdetect"
; Needed for first stage
SetupSourceDevice = "\Device\LanmanRedirector\SAMBA_SERVER_IP\ris\winxp"

[UserData]
ComputerName = *
Create or modify PXE boot menu list
#vi /tftpboot/pxelinux.cfg/default
LABEL XP
kernel winxp/winxp.0
Creating tftp remap file
#vi /tftpboot/tftpd.remap
ri ^[az]: # 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
r ^xpldr winxp/xpldr
r ^ntdetect.wxp winxp/ntdetect.wxp
r ^winxp.sif winxp/winxp.sif
Changes in tftp deamon to run tftp remap file
#vi /etc/xinetd.d/tftp
server_args = -m /tftpboot/tftpd.remap -s -v -v -v -v /tftpboot
Running binl server so that client machine can take needed network drivers
#cp /root/pxefiles/script/binlsrv.py /tftpboot/winxp/
#cp /root/pxefiles/script/infparser.py /tftpboot/winxp/
#cd /tftpboot/winxp/
#/tftpboot/winxp/infparser.py /tftpboot/winxp/i386
#nohup /tftpboot/winxp/binlsrv.py &

Credits

Labels: , , , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home