Krokodox documents for WinBuilder

How to install a TFTP server on W2K3 SP1

NOTE: You need to have W2K3 with SP1, both for hosting TFTPD/DHCP as well as for building the LiveXP .ISO image!

NOTE: Please read about the *much* better alternative TFTP server below!

  1. Expand TFTPD.EX_ (server part) and TFTP.EX_ (client part) from the CD-ROM's i386 directory to your %SystemRoot%\system32\ directory.
  2. Run INSTSRV TFTPD %SystemRoot%\system32\tftpd.exe to install TFTPD.EXE as a service on the computer that will host the TFTP services.
  3. Create a file TFTPD.REG and edit it to contain the following:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TFTPD]
@=""
"DependOnService"=hex(7):74,00,63,00,70,00,69,00,70,00,00,00,61,00,66,00,64,00,\
  00,00,00,00
"DependOnGroup"=hex(7):00,00
"Type"=dword:00000010
"Start"=dword:00000002
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):63,00,3a,00,5c,00,77,00,69,00,6e,00,64,00,6f,00,77,00,73,00,\
  5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,74,00,66,00,74,\
  00,70,00,64,00,2e,00,65,00,78,00,65,00,00,00
"DisplayName"="TFTP Server"
"ObjectName"="LocalSystem"
"Description"="Trivial File Transfer Protocol Server"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TFTPD\Enum]
"0"="Root\\LEGACY_TFTPD\\0000"
"Count"=dword:00000001
"NextInstance"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TFTPD\Parameters]
"Clients"="*.*.*.*"
"Masters"=""
"Readable"="*"
"Writeable"=""
"Directory"="d:\\tftpdroot"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TFTPD\Security]
"Security"=hex:01,00,14,80,b8,00,00,00,c4,00,00,00,14,00,00,00,30,00,00,00,02,\
  00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
  00,00,02,00,88,00,06,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,\
  05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,\
  20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,04,00,00,00,00,\
  00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,06,00,00,00,00,00,14,00,00,01,\
  00,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,\
  00,00,00,00,05,20,00,00,00,25,02,00,00,01,01,00,00,00,00,00,05,12,00,00,00,\
  01,01,00,00,00,00,00,05,12,00,00,00
  1. Create the directory D:\TFTPDRoot (as per the line stating "Directory"="d:\\tftpdroot" in the .REG file above!)
  2. Copy NTDETECT.COM from the CD-ROM's i386 directory to the newly created D:\TFTPDRoot directory.
  3. Expand SETUPLDR.EX_ from the CD-ROM's i386 directory to file D:\TFTPDRoot\NTLDR
    (NOTE! The file is renamed to NTLDR WITHOUT any extension!)
    Expand STARTROM.CO_ from the CD-ROM's i386 directory to file D:\TFTPDRoot\startrom.com
    Expand STARTROM.N1_ from the CD-ROM's i386 directory to file D:\TFTPDRoot\startrom.n12
  4. Create file WINNT.SIF in the D:\TFTPDRoot directory and edit it to contain the following:
[SetupData]
BootDevice = "ramdisk(0)"
BootPath = "\i386\System32\"
OsLoadOptions = "/noguiboot /fastdetect /minint /rdexportascd /rdpath=LiveXP.iso"
  1. Now open a CMD command prompt and start the TFTP service:
C:\WINDOWS\SYSTEM32>net start tftpd
  1. Test the TFTP service with the help from the client application, if all goes well then the file WINNT.SIF should be retreived to the C:\WINDOWS\SYSTEM32 folder when you execute the following command:
C:\WINDOWS\SYSTEM32>tftp -i localhost get winnt.sif

DHCP service configuration

NOTE: The DHCP service must be installed and configured to have an active scope up and running.

NOTE: Every time a DHCP Server Option (like 067: Boot File Name) is changed you need to restart the DHCP service in order to force it to use the new settings!

  1. Configure the DHCP service with the following Server Options (assuming your servers name is "myservername" and in case you do not want to see the note about pressing F12 on the client upon PXE boot substitute STARTROM.COM with STARTROM.N12):
043 Vendor Specific Info: 01 04 00 00 00 00 FF
066 Boot Server Host Name: myservername
067 Boot File Name: startrom.com
  1. Open a CMD command prompt and create Server Option 060 in the DHCP service with help from the NETSH command. You can substitute "myservername" with whatever name your server has, or with the IP address of your server or with "localhost":
C:\WINDOWS\system32>netsh
netsh>dhcp
netsh dhcp>server \\myservername
netsh dhcp server>add optiondef 60 PXEClient String 0 comment=PXE support
netsh dhcp server>set optionvalue 60 STRING PXEClient
netsh dhcp server>exit
  1. Restart the DHCP service in order to force it to reload the new settings:
C:\WINDOWS\SYSTEM32>net stop dhcpserver
C:\WINDOWS\SYSTEM32>net start dhcpserver
  1. Now it should be possible to PXE Boot LiveXP from an PXE enabled client computer attached to the same LAN as the TFTPD server!

A *much better* alternative TFTP server from Microsoft(!)

The advantage of this PXE/TFTPD service is that you can specify PXE actions per MAC-address, i.e. whether to force just a specific server to boot into PXE upon next reboot.

The "standard" TFTPD server is not this flexible since all rebooting PXE clients will be handled the same way. Also, there is no need here to restart the DHCP service when you change a boot setting for a specific server since this is handled automagically by this much improved (but not 110% slick) PXE/TFTPD service.

And for all of us GUI friends, there is this cool GUI where you can line up all of your servers and manage them with a couple of mouseclicks ;-)

  1. Download the PXE/TFTP service that belongs to Windows XP Embedded SP1 from Microsoft's site. Unfortunately it is stated that one should not give out the exact URL, so I will not give it out here, but search for the name of the .MSI file ("Windows XP Embedded Remote Boot Server.msi") and it might pop up somewhere ;-)

    UPDATE: XP Embedded SP2 *includes* this file in the "Disk2\NBS" directory! Unfortunately, this version refuses to install on W2K3 with an error statement of not being compatible with .NET server (the old name for W2K3!)
  2. Run the setup and let it install all services into their preferred installation directories.
  3. When the setup finishes, copy the files NTDETECT.COM, NTLDR and WINNT.SIF that you create as per step 5 in the setup of the TFTP service above, and replace the ones created by the setup program in the "C:\PROGRAM FILES\WINDOWS EMBEDDED\REMOTE BOOT SERVICE\DOWNLOADS" directory. (This directory is the equivalent for the D:\TFTPDRoot directory described in step 4 in the setup of the TFTP service above).
  4. Remove Server Option 043, 066 och 067 (leaving Server Option 060!) in case they exist on the DHCP server.
  5. The setting for BOOT IMAGE and BOOT PARAMETERS in the TFTP GUI are not used since we replaced the NTDETECT.COM / NTLDR with newer ones not made for XP Embedded specific settings!



Back to the documents page
krokodox@winbuilder.net