Deploy Windows 7 using WindowsPE and linux as RIS

!!!! Almost as for Vindows Vista !!!
++++++++++++++++++++++++++++++++++++++++
1. Install Windows 7 WAIK ( c:\waik)
++++++++++++++++++++++++++++++++++++++++

cd \waik\tools\petools\
copype.cmd x86 c:\win7pe
cd \win7pe

Dism /Mount-Wim /WimFile:C:\win7pe\winpe.wim /index:1 /MountDir:C:\win7pe\mount

mkdir c:\pxe\Boot
cd \win7pe\mount\windows\boot\pxe
copy * \pxe
cd \win7pe\mount\windows\boot\fonts
copy wgl4_boot.ttf \pxe\Boot
cd \waik\tools\petools\x86\boot
copy boot.sdi \pxe
cd \win7pe
copy winpe.wim \pxe
cd win7pe\mount\windows\system32

bcdedit /store \pxe\bcd /create {ramdiskoptions} /d “Ramdisk options”
bcdedit /store \pxe\bcd /set {ramdiskoptions} ramdisksdidevice boot
bcdedit /store \pxe\BCD /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi
bcdedit /store \pxe\BCD /create /d “WinPE Boot Image” /application osloader
The entry {179e0477-528d-11e0-b208-000c29acf4a4} was successfully created.

bcdedit /store \pxe\BCD /set {179e0477-528d-11e0-b208-000c29acf4a4} systemroot \Windows
bcdedit /store \pxe\BCD /set {179e0477-528d-11e0-b208-000c29acf4a4} detecthal Yes
bcdedit /store \pxe\BCD /set {179e0477-528d-11e0-b208-000c29acf4a4} winpe Yes
bcdedit /store \pxe\BCD /set {179e0477-528d-11e0-b208-000c29acf4a4} osdevice ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
bcdedit /store \pxe\BCD /set {179e0477-528d-11e0-b208-000c29acf4a4} device ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
bcdedit /store \pxe\BCD /create {bootmgr} /d “Windows 7 BootManager”
bcdedit /store \pxe\BCD /set {bootmgr} timeout 30
bcdedit /store \pxe\BCD /displayorder {179e0477-528d-11e0-b208-000c29acf4a4}

!! Add aditional drivers to win7pe image: like network drivers !!
DISM /image:c:\win7pe\mount /Add-Driver /driver:C:\win7pe\DRIVERS1 /recurse

DSIM /image:c:\win7pe\mount /add-package /packagepath:”C:\WAIK\Tools\PETools\x86\WinPE_FPs\WinPE-Scripting.cab”
DSIM /image:c:\win7pe\mount /add-package /packagepath:”C:\WAIK\Tools\PETools\x86\WinPE_FPs\WinPE-hta.cab”
DSIM /image:c:\win7pe\mount /add-package /packagepath:”C:\WAIK\Tools\PETools\x86\WinPE_FPs\WinPE-wmi.cab”
Dism /Unmount-Wim /MountDir:C:\win7pe\mount\ /Commit
copy c:\win7pe\winpe.wim c:\pxe

!! SAMBA setup and TFTPD setup it’s as for Windows Vista !!

++++++++++++++++++++++++++++++++++++++++
win7unatt.xml
++++++++++++++++++++++++++++++++++++++++

<?xml version=”1.0″ encoding=”utf-8″?>
<unattend xmlns=”urn:schemas-microsoft-com:unattend”>
<servicing>
<package action=”configure”>
<assemblyIdentity name=”Microsoft-Windows-Foundation-Package” version=”6.1.7601.17514″ processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”” />

<selection name=”TelnetClient” state=”true” />

<selection name=”TabletPCOC” state=”false” />

<selection name=”Indexing-Service-Package” state=”false” />

<selection name=”Printing-Foundation-Features” state=”false” />

<selection name=”Printing-XPSServices-Features” state=”true” />

</package>
</servicing>
….
Here is an working copy of win7unatt.xml

P.S : Because of limitation of WordPress I have to rename the original file from win7unatt.xml to win7unatt.xml.doc

Advertisements

Deploy Vista using WindowsPE and linux as RIS

++++++++++++++++++++++++++++++++++++++++
1. Install Windows Vista WAIK ( c:\waik)
++++++++++++++++++++++++++++++++++++++++
cd \waik\tools\petools\
copype.cmd x86 c:\vistape
cd \vistape
c:\waik\tools\x86\imagex /mountrw winpe.wim 1 mount
mkdir c:\pxe\Boot
cd \vistape\mount\windows\boot\pxe
copy * \pxe
cd \vistape\mount\windows\boot\fonts
copy wgl4_boot.ttf \pxe\Boot
cd \waik\tools\petools\x86\boot
copy boot.sdi \pxe
cd \vistape
copy winpe.wim \pxe
cd vistape\mount\windows\system32
bcdedit /createstore \pxe\BCD
bcdedit /store \pxe\bcd /create {ramdiskoptions} /d “Ramdisk options”
bcdedit /store \pxe\bcd /set {ramdiskoptions} ramdisksdidevice boot
bcdedit /store \pxe\BCD /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi
bcdedit /store \pxe\BCD /create /d “WinPE Boot Image” /application osloader
You should get a GUID returned! Replace the GUIDs below with the GUID you get back
<<<<<<<<  The entry {ed26a7d4-0ed5-11dc-9d1a-000c29ea1605} was successfully created. >>>>>>>>
bcdedit /store \pxe\BCD / _GUID_ systemroot \Windows
bcdedit /store \pxe\BCD / _GUID_ detecthal Yes
bcdedit /store \pxe\BCD / _GUID_ winpe Yes
bcdedit /store \pxe\BCD / _GUID_ osdevice ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
bcdedit /store \pxe\BCD / _GUID_ device ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
bcdedit /store \pxe\BCD /create {bootmgr} /d “Windows VISTA BootManager”
bcdedit /store \pxe\BCD /set {bootmgr} timeout 30
bcdedit /store \pxe\BCD /displayorder _GUID_
c:\WAIK\Tools\PETools\peimg /install=WinPE-Scripting-Package \vistape\mount
c:\WAIK\Tools\PETools\peimg /install=WinPE-HTA-Package \vistape\mount
c:\WAIK\Tools\PETools\peimg /install=WinPE-XML-Package \vistape\mount
create file install.cmd
@echo off
net use y: \\10.10.10.4\vista
net use z: \\10.10.10.4\configs
y:
setup.exe /unattend:z:\vista-unatt.xml
copy install.cmd vista\mount\windows\system32
c:\waik\tools\x86\imagex /unmount /commit \vistape\mount
copy c:\vistape\winpe.vim c:\pxe
++++++++++++++++++++++++++++++++++++++++
2. Now on linux side
++++++++++++++++++++++++++++++++++++++++
mkdir /tftpboot/Boot
use winSCP to copy content of pxe to Boot
mv pxeboot.n12 winpe.0
mv bootmgr.exe ..
mv winpe.wim WinPE.wim
++++++++++++++++++++++++++++++++++++++++
3.tftp configs
++++++++++++++++++++++++++++++++++++++++
cat /etc/tftp.rules
rg \\ /
cat /tftpboot/pxelinux.cfg/default
default local
timeout 0
prompt 1

label local
localboot 1
label 0
localboot 1
label RHEL5_x32
kernel linux-install/RHEL5_x32/vmlinuz
append initrd=linux-install/RHEL5_x32/initrd.img ramdisk_size=9071 ks=nfs:10.10.10.4:/home/installs/ks.cfg
label WinXp Sp3 (Unattended)
kernel winxp.0
label Windows Vista (Unattended)
kernel Boot/vista.0
4. Samba config
++++++++++++++++++++++++++++++++++++++++
smb.conf
++++++++++++++++++++++++++++++++++++++++
[global]
workgroup = WORKGROUP
server string = Samba Server
netbios name = samba1
log file =/var/log/samba/%m.log
security = share
max log size = 50
local master = yes
passdb backend = tdbsam
null passwords = yes
bind interfaces only = yes
interfaces = eth1 lo
[vista]
path = /path_to_vista_source_dvd
browseable = yes
guest ok = yes
read only = no
[configs]
path = /path_to_config_files
browseable = yes
guest ok = yes read only = no
5. Unattend answer file ( might work also for Win 7 )
++++++++++++++++++++++++++++++++++++++++
vista-unatt.xml target disk:-> Disk 0 ; size 40 gb, pr part = 20gb, sec part = 20gb
++++++++++++++++++++++++++++++++++++++++
<?xml version=”1.0″ encoding=”utf-8″?> <unattend xmlns=”urn:schemas-microsoft-com:unattend”>
< servicing>
< package action=”configure”>
< assemblyIdentity name=”Microsoft-Windows-Foundation-Package” version=”6.0.6000.16386″ processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”” />
<selection name=”TabletPCOC” state=”true” />
< selection name=”TelnetClient” state=”true” />
< selection name=”TelnetServer” state=”false” />
< selection name=”Windows-Ultimate-Extras” state=”true” />
< selection name=”AxInstallService” state=”false” />
< selection name=”FaxServicesUltimate” state=”true” />
< selection name=”IIS-WebServerRole” state=”false” />
< selection name=”InboxGames” state=”true” />
< selection name=”Indexing-Service-Package” state=”false” />
< selection name=”Microsoft-Windows-RemovableStorageManagement” state=”false” />
< selection name=”XPS-Viewer” state=”true” />
< selection name=”Printing-Foundation-Features” state=”true” />
< selection name=”SUA” state=”false” />
< selection name=”NetFx3″ state=”true” />
</package>
< /servicing>
< settings pass=”windowsPE”>
< component name=”Microsoft-Windows-Setup” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”&gt;
< DiskConfiguration>
< Disk>
< DiskID>0</DiskID>
< WillWipeDisk>false</WillWipeDisk>
< CreatePartitions>
< !– Create Primary Partition –>
< CreatePartition>
< Order>1</Order>
< Type>Primary</Type>
< Size>20000</Size>
< /CreatePartition>
< !– Create Extended Partition –>
< CreatePartition>
< Order>2</Order>
< Type>Extended</Type>
< Extend>true</Extend>
< /CreatePartition>
< !– Create Logical Drive –>
< CreatePartition>
< Order>3</Order>
< Type>Logical</Type>
< Size>20000</Size>
< /CreatePartition>
< /CreatePartitions>
< ModifyPartitions>
< ModifyPartition>
< Order>1</Order>
< PartitionID>1</PartitionID>
< Active>true</Active>
< Format>NTFS</Format>
< Label>System</Label>
< Letter>C</Letter>
< /ModifyPartition>
< ModifyPartition>
< Order>2</Order>
< PartitionID>2</PartitionID>
< Label>Data</Label>
< Format>NTFS</Format>
< Extend>true</Extend>
< Letter>D</Letter>
< /ModifyPartition>
< /ModifyPartitions>
< /Disk>
< WillShowUI>OnError</WillShowUI>
</DiskConfiguration>
<ImageInstall>
< OSImage>
< InstallTo>
< DiskID>0</DiskID>
< PartitionID>1</PartitionID>
< /InstallTo>
< WillShowUI>OnError</WillShowUI>
< /OSImage>
< /ImageInstall>
< UserData>
< ProductKey>
< WillShowUI>OnError</WillShowUI>
< Key>Insert_productkey_here</Key>
< /ProductKey>
< AcceptEula>true</AcceptEula>
< Organization>IBM</Organization>
< /UserData>
<UseConfigurationSet>true</UseConfigurationSet>
</component>
<component name=”Microsoft-Windows-International-Core-WinPE” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”&gt;
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
<component name=”Microsoft-Windows-PnpCustomizationsWinPE” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”&gt;
</component>
</settings>
<settings pass=”specialize”>
<component name=”Microsoft-Windows-IE-InternetExplorer” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”&gt;
<Home_Page>http://www.google.com</Home_Page&gt;
<FilterLevel>Medium</FilterLevel>
<BlockPopups>yes</BlockPopups>
<ShowInformationBar>true</ShowInformationBar>
<FavoritesDelete>false</FavoritesDelete>
<IEWelcomeMsg>true</IEWelcomeMsg>
<PlaySound>true</PlaySound>
</component>
<component name=”Microsoft-Windows-Shell-Setup” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”&gt;
<OEMInformation>
<Manufacturer>IBM</Manufacturer>
<HelpCustomized>false</HelpCustomized>
<SupportPhone>123-456-789</SupportPhone>
</OEMInformation>
<ComputerName>VistaCLI</ComputerName>
<RegisteredOwner>IBM</RegisteredOwner>
<TimeZone>Eastern Standard Time</TimeZone>
</component>
<component name=”Microsoft-Windows-International-Core” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”&gt;
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
<component name=”Microsoft-Windows-TCPIP” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”&gt;
<Interfaces>
<Interface wcm:action=”add”>
<Ipv4Settings>
<DhcpEnabled>true</DhcpEnabled>
<RouterDiscoveryEnabled>true</RouterDiscoveryEnabled>
</Ipv4Settings>
<!–                    <Identifier>Local Area Connection</Identifier>
<UnicastIpAddresses>
<IpAddress wcm:action=”add” wcm:keyValue=”1″>_STATIC_IP_/_SHORT_MASK_</IpAddress>
</UnicastIpAddresses>
<Routes>
<Route wcm:action=”add”>
<Identifier>0</Identifier>
<Prefix>0.0.0.0/0</Prefix>
<NextHopAddress>_GATEWAY_</NextHopAddress>
<Metric>20</Metric>
</Route>
</Routes> –>
</Interface>
</Interfaces>
</component>
<!—        <component name=”Microsoft-Windows-DNS-Client” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”&gt;
<DNSSuffixSearchOrder>
<DomainName wcm:action=”add” wcm:keyValue=”key”>_DNS_SEARCH1_</DomainName>
</DNSSuffixSearchOrder>
<Interfaces>
<Interface wcm:action=”add”>
<DNSServerSearchOrder>
<IpAddress wcm:action=”add” wcm:keyValue=”dnsip”>9.48.142.252</IpAddress>
</DNSServerSearchOrder>
<Identifier>Local Area Connection</Identifier>
</Interface>
</Interfaces>
<UseDomainNameDevolution>false</UseDomainNameDevolution>
</component> –>
</settings>
<settings pass=”oobeSystem”>
<component name=”Microsoft-Windows-Shell-Setup” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”&gt;
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>
</OOBE>
<AutoLogon>
<Password>
<Value>Temp123</Value>
</Password>
<Username>Administrator</Username>
<Enabled>true</Enabled>
<LogonCount>3</LogonCount>
</AutoLogon>
<UserAccounts>
<AdministratorPassword>
<Value>Temp123</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action=”add”>
<Name>root</Name>
<Password>
<Value>Temp123</Value>
<PlainText>true</PlainText>
</Password>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<FirstLogonCommands>
<SynchronousCommand wcm:action=”add”>
<CommandLine>c:\ospm\post_install.cmd</CommandLine>
<Order>1</Order>
<Description>OSPM Post install</Description>
</SynchronousCommand>
</FirstLogonCommands>
<RegisteredOrganization>IBM</RegisteredOrganization>
<RegisteredOwner>IBM</RegisteredOwner>
</component>
<component name=”Microsoft-Windows-Sidebar” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
<Gadget1>%PROGRAMFILES%\windows sidebar\gadgets\Clock.Gadget,true</Gadget1>
< Gadget2>%PROGRAMFILES%\windows sidebar\gadgets\RSSFeed.Gadget,false</Gadget2>
< Gadget3>%PROGRAMFILES%\windows sidebar\gadgets\SlideShow.gadget,false</Gadget3>
</component>
< /settings>
< settings pass=”generalize”>
<component name=”Microsoft-Windows-TerminalServices-LocalSessionManager” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”neutral”
versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
<fDenyTSConnections>false</fDenyTSConnections>
</component>
< /settings>
</unattend>
Here is the original XML file <vista-unatt.xml>
Now, boot target computer, select network boot, select Windows Vista and wait…..
After successful boot a command prompt will be showed: just type install.cmd and….. nothing else

Deploy Windows XP/2003 from Network

So here what we need: 

1. DHCP server also main Deploy server
Red Hat Enterprise Linux 5.5 ( not manadatory RHEL but any linux dist.)
           eth0: xx.xx.xx.xx ( NET )
           eth1: 10.10.10.4/16 ( LAN ) 

Samba Config
smb.conf
++++++++++++++++++++++++++++++++++++++++
[global]
           workgroup = WORKGROUP
           server string = Samba Server
           netbios name = samba1
           log file =/var/log/samba/%m.log
           max log size = 50
           local master = yes
           passdb backend = tdbsam
           null passwords = yes
           bind interfaces only = yes
           interfaces = eth1 lo
 

[reminst]
            path = /tftpboot
            browseable = yes
            guest ok = yes
            read only = no
 

dhcpd.conf
+++++++++++++++++++++++++++++++++++++++++
ddns-update-style none;
allow booting;
allow boot;
subnet 10.10.0.0 netmask 255.255.0.0 {
                range 10.10.10.20 10.10.10.50;
                filename “pxelinux.0”;
                next-server 10.10.10.4;
}
 

Setting up tftp files:
+++++++++++++++++++++++++++++++++++++++++
1. create  /etc/tftp.rules ( IMPORTANT )

rg \\ /
r KDCOM.DL_   kdcom.dl_
r BOOTVID.dl_   bootvid.dl_
r SETUPREG.HIV   setupreg.hiv
r PCIIDEX.SY_   pciidex.sy_
r 1394BUS.SY_   1394bus.sy_
r USBPORT.SY_   usbport.sy_
r USBD.SY_   usbd.sy_
r HIDCLASS.SY_   hidclass.sy_
r HIDPARSE.SY_   hidparse.sy_
r HALAACPI.SY_   halaacpi.sy_
r SCSIPORT.SY_   scsiport.sy_
r SPDDLANG.SY_   spddlang.sy_
r WMILIB.SY_   wmilib.sy_
r OPRGHDLR.SY_   oprghdlr.sy_
r VIDEOPRT.SY_   videoprt.sy_
r CLASSPNP.SY_   classpnp.sy_
r TDI.SY_   tdi.sy_

2. modify this line  of /etc/xinetd.d/tftp
server_args                = -vvv -s /tftpboot -m /etc/tftp.rules 

3. create a folder pxelinux.cfg inside tftpboot ( if not exists ) 

4. create a file default inside pxelinux.cfg
            default local ( if not exists )
            timeout 0
            prompt 1
 

            label local
                      localboot 1
           label 0
                     localboot 1
           label WinXp Sp3
                     kernel winxp.0
 

Here end the configs of main server
…so the structure of tftp folder should looks like

tftpboot –
                     \
                      |_ pxelinux.cfg-
                                             \
                                             |_ default
                      |_pxelinux.0
                      |_ winxp.0
                      |_ ntldr
                      |_ ntdetect.com
                      |_ winnt.sif
                      |_ winxp-sp3 \
                                          |_ $OEM$
                                          |_ i386
 

Now let’s go to the next stage: 

1. copy content of  Windows XP cd/dvd 

1.1 mount /dev/cdrom /mnt /cdrom
1.2 cp -R /mnt/cdrom/i386 \$OEM\$  /tftpboot/winxp-sp3 

in fact we need just content of I386 folder, but if you have an unattended cd/dvd with custom install applications we will also need the content od $OEM$ folder. 

so, content of winxp folder will be {$OEM$, i386} 

1.3 rename I386 to i386
1.4 rename of all files inside i386 folder from upper cases to lower cases; 

for f in `find`; do mv -v $f `echo $f | tr ‘[A-Z]’ ‘[a-z]’`; done
Just…. ignore if you get some errors.
the ideaa of renaming files is: Linux is case sensitive; Windows setup is serching for files inside i386 folder and is searching for lowercase files names, except a few files ( that’s why I have to create the tftp.rules ) 

2. content of winnt.sif  file 

[Data]
AutomaticUpdates=”Yes”
Autopartition=1

floppyless = “1”
MsDosInitiated=1
OriSrc = “\\samba1\reminst\winxp-sp3\i386”
OriTyp = “4”
LocalSourceOnCD = 1
UnattendedInstall=”Yes”
[SetupData]
OsLoadOptions = “/fastdetect”
SetupSourceDevice = “\Device\LanmanRedirector\samba1\reminst\winxp-sp3”
 

[Unattended]
UnattendMode=FullUnattended
UnattendSwitch=”Yes”
OemPreinstall=”Yes”
OemSkipEula=”Yes”
FileSystem=NTFS
WaitForReboot=”No”
Repartition=”Yes”
NoWaitAfterTextMode=1
NoWaitAfterGUIMode=1
DriverSigningPolicy=Ignore
NonDriverSigningPolicy=Ignore
 

[Display]
Xresolution=800
Yresolution=600
BitsPerPel=32
Vrefresh=75
 

[SystemRestore]
MaximumDataStorePercentOfDisk=10
 

[GuiUnattended]
EncryptedAdminPassword=”No”
AutoLogon=”Yes”
AdminPassword=”123456″
TimeZone=035
OEMSkipRegional=1
OemSkipWelcome=1
 

[Shell]
CustomDefaultThemeFile=”%WinDir%\Resources\Themes\Royale Remixed.theme”
DefaultStartPanelOff=”Yes”
 

[Components] 

[UserData]
ProductKey=”insert key here”
ComputerName=XP-SP3
FullName=”deployed system”
OrgName=”nlite”
 

[RegionalSettings]
LanguageGroup=1,2
SystemLocale=”0409″
UserLocale=”0409″
UserLocale_DefaultUser=”0409″
InputLocale=”0409:00000409″
InputLocale_DefaultUser=”0409:00000409″
 

[Networking]
InstallDefaultComponents=”No”
 

[NetClients]
MS_MSClient=params.MS_MSClient
 

[NetServices]
MS_SERVER=params.MS_SERVER
MS_PSched=params.MS_PSched
 

[NetProtocols]
MS_TCPIP=params.MS_TCPIP
 

[params.MS_TCPIP]
AdapterSections=params.MS_TCPIP.Adapter1
 

[NetAdapters]
Adapter1=params.Adapter1
 

[params.Adapter1] 

[params.MS_TCPIP.Adapter1]
SpecificTo=Adapter1
IPAddress=192.168.2.1
DHCP=”No”
SubnetMask=255.255.255.0
DefaultGateway=192.168.154.1
DNSServerSearchOrder=192.168.1.254
WINS=”No”
NetBIOSOptions=0
[params.MS_NWIPX.Adapter1]
SpecificTo=Adapter1
NetworkNumber=00000000
PktType=0xFF
 

[Identification]
JoinWorkgroup=”WORKGROUP”
;JoinDomain=my-domain.com
;CreateComputerAccountInDomain=Yes
;DomainAdmin=jonnybravo
;DomainAdminPassword=password

[GuiRunOnce]
“%SystemRoot%\System32\nLite.cmd”
 

Here is a strip down version of winnt.sif
[Data]
floppyless = “1”
msdosinitiated = “1”
OriSrc = “\\samba1\reminst\winxp-sp3\i386”
OriTyp = “4”
LocalSourceOnCD = 1
DisableAdminAccountOnDomainJoin = 1
 

[SetupData]
OsLoadOptions = “/fastdetect”
SetupSourceDevice = “\Device\LanmanRedirector\samba1\reminst\winxp-sp3”
 

[UserData]
ComputerName = _name_
ProductID= _insert_CDKEY_
 

3. copy ntldr, ntdetect.com and the winxp.0 

cd /tftpboot

cp winxp/i386/NTDETECT.COM .
        mv NTDETECT.COM ntdetect.com
cabextract winxp/i386/STARTROM.N1_
        mv STARTROM.N12 winxp.0
cabextract winxp/i386/SETUPLDR.EX_
        mv SETUPLDR.EXE ntldr 

Now we can start all necessary services: 

A. dhcpd 

service dhcpd restart 

B. samba
service smb restart 

C. xinetd
service xinetd restart 

+++++++++++++++++++++++++
Now… how windows setup will be abble to acces the share ( aka how it will be abble to load network card drivers…)
1. Download this Necessary files for windows RIS
tar zxvf ris-linux-0.4.tar.gz
cd ris-linux-0.4
./infparser.py /downloads/winpe/i386/inf
  ** 

** We need to make a BartPE ISO Image.

after finishing this command we will have 2 new files inside ris folder: devlist.cache and nics.txt 

BINL Server 

Microsoft BINL protocol handles a lot of request/response, but we only need one of them. The client detects the network card by scanning pci bus, the it ask binl server for a driver that matches Vendor ID and Product ID. So we can launch our binl server replacement as follows: 

./binlsrv.py 
Succesfully loaded 662 devices 
Binlserver started.. 

The client will start to ask for some files to the tftpd server, then you will see something in the binlsrv output: 

Recv NCQ len = 48 
NCQ Driver request 
[R] Vid: 0x1022 
[R] Pid: 0x2000 
[R] rev_u1 = 0x2 
[R] rev_u2 = 0x0 
[R] rev_u3 = 0x0 
[R] rev = 0x10
[R] rev2 = 0x88
[R] subsys = 0x20001022 
Checking PCI\VEN_1022&DEV_2000&SUB_20001022 
Checking PCI\VEN_1022&DEV_2000 
Found PCI\VEN_1022&DEV_2000 in netamd2.inf 

So: in our case Network card is in AMD card and is require pcntpci5.sys file

cp /downloads/winpe/i386/system32/drivers/pcntpci5.sys /tftpboot/winxp-sp3/i386

NOW everything is DONE.

** WARN!!
IF network card is not detected by windows setup here are a few steps:
– download network card drivers for XP
– extract INF and SYS files
– copy INF file to /downloads/winpe/i386/inf
– rebuild devlist.cache  ( ./infparser.py /downloads/winpe/i386/inf  )
– copy xxx.sys file to winxp-sp3/i386
– restart BINLRSRV