Monday, October 24, 2005

Boot Windows PE from TFTP Server to RAM

Oooooo yes, finally working. All because I overlooked one file... see if you can guess which one from the instructions. So as I wrote previously, I had created a PE from HDD to RAM solution for cases where I was building a remote server that didn't have a virtual CDROM available but did have a virtual floppy available (for those familiar with HP server hardware, boxes with a RILOE / RILOE II).

But why bother with all that when you can just have a TFTP server and boot the WinPE ISO directly from there into the RAM of the server you are building! Here we go...

The following files are required, ALL from Windows PE 2005 / Windows Server 2003 + SP1. Yes I know you could use a PE ISO built from XP but with ramdisk.sys from 2003+SP1, but for the sake of brevity... oh well there goes that idea!

1. A Windows PE ISO, built from 2003 Server + SP1
2. startrom.com from the 2003 Server + SP1 CD
3. ntdetect.com from the PE ISO
4. winnt.sif, with the same entries as the PE HDD to RAM post
5. setupldr.exe from the PE ISO. !!!NOTE!!! That's SETUPLDR.EXE that is 272KB - NOT NOT NOT setupldr.bin which is 292KB in size. Rename SETUPLDR.EXE to NTLDR. The file size is 272KB. Did I mention it needs to be the SETUPLDR.EXE renamed to NTLDR?

OK, so follow the instructions in the previous post to setup your free Microsoft TFTP server.

Put the 5 files mentioned above into the TFTPROOT directory.

Set option 066 on your DHCP server, with a value of the IP address of your TFTP server.

Set option 067 on your DHCP server, with a value of startrom.com

*Note* If your DHCP server and TFTP server are the same box, you also need to set option 060 on the DHCP server to tell PXE Clients that port 67 on the DHCP server is also serving up PXE boot images. DHCP listens on port 67 by default.

And voila, that's it!

"But n0000000000dles...", I hear you say, "we don't have DHCP running in our datacenters so we can't PXE boot."

Well, I think you're outta luck, but I'll look around and see if I can find some other solution.

Friday, October 21, 2005

Running a Windows TFTP Server

There are several 3rd party free TFTP servers for Windows out there, but why use a 3rd party product when you already have a free TFTP server on the install CD? Lets roll!

First, grab the Windows Server 2003 resource kit, and install it.

Now open a shell and go to your I386 directory (CD or distribution share - doesn't matter).

Run expand tftpd.ex_ %systemroot%\tftpd.exe. Note you could place the .exe elsewhere if you like.

Still in the shell, change to the Windows 2003 reskit install directory and run instsrv tftpd %systemroot%\tftpd.exe.

Create a TFTP root directory. It can be anywhere and named anything. For example, D:\TFTProot.

Run the following commands to create / modify the appropriate registry values

reg add hklm\system\currentcontrolset\services\tftpd /v DisplayName /t REG_SZ /d "TFTP Server"
reg add hklm\system\currentcontrolset\services\tftpd\Parameters
reg add hklm\system\currentcontrolset\services\tftpd\Parameters /v Directory /t REG_SZ /d d:\tftproot


And finally, do a net start tftpd

And that's it. Of course it would be a good idea to set the appropriate NTFS permissions on the TFTP root directory, and run the service with a low privileged account.

Why am I doing this? I'm looking to take the 'PE from HDD to RAM' to the next level, which is booting PE via PXE :-)