Windows Network Install
How-To Install Windows from the network?
Introduction
This guide will help you to setup a computer to « serve » a Windows installation from a network share. With this, you’ll be able to install Windows on a computer without a floppy or CD drive, or, if you want to slipstream a service pack or create a custom installation source, without burning a CD.
Microsoft already provides a way to install windows from the network, called RIS (Remote Installation Services), but you’ll need a Windows Domain. This guide explains how to emulate part of RIS infrastructure for our simpler needs.
Prerequisites
To proceed with this guide, you will need the following:
- A network-able computer with windows already installed to serve the installation
- The computer you want install windows on
- Drivers for its network card (they must be RIS-compliant)
- A windows XP or 2003 CD (medium, image or installation files)
- A DHCP/TFTP server : use tftpd32.
- The pseudo-binl server by Gianluigi Tiesi. Unfortunately, the Author doesn’t provide a Windows version. Don’t worry; I’ve compiled it for you.
- The .inf parser for the binl server. As it’s originaly a python script I’ve also compiled it.
- Some patience
- Knowledge of how to deflate cab files
Staging
First, create a folder to contain all the files. For example, D:\RIS\. To avoid headaches writing this guide, I will refer to this folder as the RIS folder (but you can call it whatever you want).
Then, copy your Windows source on a subfolder of the RIS folder. Say RIS\winxp.
On RIS\winxp\i386, locate theses files: NTDETECT.COM, STARTROM.N1_, SETUPLDR.EX_ and, if present BOOTFONT.BIN and copy them to the RIS folder.
STARTROM.N1_ and SETUPLDR.EX_ are cab-compressed. You need to deflate them (time to use your knowledge – or google). Leave the startrom.n12 file as-is, rename the setupldr.exe file as ntldr (without any extention).
Put tftpf32 and binl-server executables on the RIS folder (no really need to place them here, but simpler).
Preparing Network Drivers
Surely the most complicated part of this guide.
A network driver is composed of two main files: the information file (*.inf), and the driver service (*.sys). Copy the .sys file to RIS\winxp\I386.
Note that sometimes, the manufacturer provides a special driver for RIS purposes. Use It ! (For EEE users, the driver is here and you’ll find the L251X86.SYS file under « Lan_XP_071011.zip\lan\Attansic\ris\WinXP_32\ ». You can also skip to the Network Share step by downloading the nics.txt file here.)
The Network boot loader doesn’t know how to read .inf files. So it’ll need to ask the “RIS” server for help. Instead of letting you press F6 and insert à floppy, it will send a request to the boot server with the vendor and model ID of the used network card.
Our tiny BINL server is just here to answer to that request. However, it doesn’t know either how to handle .inf files, so we’ll have to do the work for it before. Time to decompress the infparser into a temporary folder.
Launch a command prompt and execute the following command: “ infparser path_to_inf”, where path_to_inf is either the inf file name, or a folder containing all your inf files (if you want to support more than one computer / network card).
This will generate two files : devlist.cache and nics.txt. The first one is for the python binl server, and the second one is for our tiny native server.
Once done, check the nics.txt file and copy it to the RIS folder (where the binl server resides). It should look like this :
1022 2000 pcntpci5.sys PCnet 10b7 6055 EL556ND5.sys EL556ND5 10b7 6056 EL556ND5.sys EL556ND5
The two first rows are respectively the VendorID and ProductID. The third is the *.sys file name and the fourth is the corresponding name. The .sys file must be in the windows i386 folder. If you just have an .inf file, you may find the .sys file on the driver.cab archive.
Network Share
If the boot files and drivers are downloaded via TFTP, the main setup files are downloaded via a Windows File Share. Create a network share on the D:\RIS folder. I will call it RISSHARE.
The Windows setup login’s anonymously, so make sure that the guest account:
- Is enabled
- Has read access right on both share and file system
- Hasn’t any network logon restriction (see FAQ)
Configuration File
The Windows Setup loader needs to know what to do right after the boot. So we must provide a .sif file. Open notepad, copy the following, and save it to the RIS folder, named winnt.sif :
[data] floppyless = "1" msdosinitiated = "1" ; Needed for second stage OriSrc = "\\SERVER\RISSHARE\winxp" OriTyp = "4" LocalSourceOnCD = 1 DisableAdminAccountOnDomainJoin = 1 [SetupData] OsLoadOptions = "/fastdetect" ; Needed for first stage SetupSourceDevice = "\Device\LanmanRedirector\SERVER\RISSHARE\winxp" [UserData] ComputerName = * ProductID=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
There you must provide the location where the loader will find the setup files. SERVER can be either the name or IP address (recomended) of the server.
File Checklist
Before going any further, check that you have something like :
- \RIS\
- winxp\
- I386
- ….
- .sys file for your network card
- I386
- ftpd32.exe
- binlsrv.exe
- nics.txt
- ntdetect.com
- ntldr
- startrom.n12
- winnt.sif
- winxp\
If you miss something, check the previous steps. You must have forgotten something (or I may have).
Launching the Servers
Start both binlsrv and tftpd32.
Binlsrv does not need any configuration.
On tftpd32.exe, go to the DHCP server tab. Configure the DHCP pool starting address and the mask according to your network configuration. Set the bootfile to “startrom.n12”. Then press the “save” button.
You’re up and ready to proceed to your windows installation.
Boot the computer where Windows needs to be installed from the network, and follow instructions on the screen.
What’s happening behind?
First, the BIOS initiate a DHCP request to get an IP address and the location of the bootstrap.
The startrom.n12 gets loaded via TFTP and is then launched by the BIOS.
This bootstrap file purpose is to download and launch (also via TFTP) the bigger NT Loader (ntldr).
The NT loader:
- Downloads ntdetect.com and bootfont.bin (via tftp)
- Downloads the winnt.sif and read the base path
- Uses ntdetect to detect the hardware, including the network card
- Asks the binl server for the driver service file name for the network card.
- Downloads the kernel, all the standard and network card drivers (via tftp)
- Boots the kernel
The kernel is launched, and instructed to load the windows setup from the windows share.
The text mode install continues as usual, asks for disk partition, the copies setup files from the share, then reboots to the GUI install.
What’s next?
Once you get it right, you can make it unattended or nLite it as you need.
Any Questions ?
I did this How-To in a few hours. I may have forgotten some useful info. If so, just ask at tzim@tzim.net.
Excellent guide.. Do you have the source to the pseudo-binl server by Gianluigi Tiesi as well as the source to the infparser mentioned here? I would really like to get ahold of these.
Check here : http://oss.netfarm.it/guides/pxe.php
nice one, it helped me alot to sort out my problem. But i couldnt figure out one thing, « infparser path-to-.inf??????? ». i didnt get it which path u have mentioned here. In simple word, where i would find that .inf. is it in the RIS folder. please help in figuring out this problem.
The inf file is part of the Network card driver.
Many many many thanks for this tutorial. Just wanted to add a little thing. If TFTP32d is giving errors on file transfer for ntldr or ntdetect.com in options for TFTP check the box for « Option Negotiation ». 🙂