[How-to] Easy guide to PXE Network S.O. install

Shivansps

Diamond Member
Sep 11, 2013
3,875
1,530
136
I did this for my old job, and now im sharing it, this is a easy guide to enable PXE lan boot, and able to install Windows, from XP to 8, Linux, run memtest, boot a live linux, and (opcional, i leave the option, but i cant share that) to boot modified live 7 and XP WinPE images.

The metod is very easy as ive made a simple .cmd script that does all the job, so you only need to put everything in place.

This will run on a Windows host in order to enable PXE and file host, but it can be adapted to run on OpenWRT routers and linux.

*Tested the script on Windows 7 x64 and Windows 8.1 x64.
**Target pcs needs a min of 512MB of ram to boot from ram and install S.O.

1) Requeriments and downloads

A) The first thing that will gona need is Ethernet LAN drivers of the target pcs, if the images does not have a driver it will be unable to install the Windows O.S. what i do is just download a massive ethernet lan driver pack and add any driver missing, you will need drivers for Windows 7 x86, because those are the driver the winpe will be using and driver must be decompressed, in the same state that they whould be to do a manual driver install in any windows.

What you gona do is to make a folder called "drivers" on "C: \", so "C: \drivers", yes all folders will be creating will be on the root of C. And just put in there all the drivers.

This is a link to a driver pack ive using http://driverpacks.net/driverpacks/windows/7/x86/lan/12.08

Its missing new and old drivers, for example, the old SIS 900 is not in there, thats because it never had a Win7 driver, in those cases you may use Windows XP x32 drivers instead.

The max size for the driver folder will be about 100 to 120mb.

B) Download Windows 7 AIK and install it.
http://www.microsoft.com/en-us/download/details.aspx?id=5753

C) Download PENetwork, unzip and copy executable and other files to PENEtwork folder on C, it must be "C: \PENetwork\PENetwork.exe"
http://sourceforge.net/projects/penetwork/

D) Download grub4dos
https://grub4dos-chenall.googlecode.com/files/grub4dos-0.4.6a-2014-01-17.7z

E)Download tftpd32 or 64 is the same thing.
http://tftpd32.jounin.net/tftpd32_download.html
Download the standart one, ive having troubles with the service one.

F) This is the script, download and move it to C:
https://www.dropbox.com/s/j5zklgklinixzg8/pxe1.2.cmd

**Whats is in the quote its only if you want to be able to install Windows XP, if not you may skip.

*In C, create a root folder called "xp", inside it you gona need to place a file called "unattend.txt", thats the Microsoft standart way to create unattended installs of Windows XP and is needed here, as im not using the normal way of installing Windows XP.
In order to generate the "unattend.txt", you will need the Windows XP CD or iso, go to "*CD*\SUPPORT\TOOLS", unzip the file called "DEPLOY.CAB", then run the "setupmgr.exe", that app will help you to generate the unattend.txt, you will need to create a full unattended install (its gona ask you). The file it generates its gona have a different, you gona need to rename it to "unattend.txt" and copy it to "C: \xp".

* Download "AOMEI Partition Assistant Standard" http://www.disk-partition.com/free-partition-manager.html, rename the file to "PAssist_Std.exe" and place it on "C: \xp".

* Download "FreeCommander" portable .zip version http://www.freecommander.com/fc_downl2_en.htm
unzip and rename it to "FreeCommander" and copy folder to "C: \xp", it must be "C: \xp\FreeCommander\FreeCommander.exe", becarefull with double folders.

* Download shellstyle.dll and place it on the "xp" folder http://www.dlldump.com/download-dll-files_new.php/dllfiles/S/shellstyle.dll/5.1.2600.0/download.html

2) Set up fileserver
We gona need to network share all install files, so create a folder called "Server", anywhere you whant, inside it create "win7", "win8", "winxp" folders.
-Copy the "sources" folder from Windows 7 DVD or ISO inside win7 folder, the structure must be "Server/win7/sources".
-Copy the "sources" folder from Windows 8 DVD or ISO inside win7 folder, the structure must be "Server/win8/sources".
-Copy the "I386" folder from Windows XP CD or ISO, the structure must be "Server/winxp/I386".

Them you share the "Server" folder, normal way, read-only its enoght.

3) Create WinPE images with script
A) Open "Deployment Tools Command Prompt" run as admin (AIK installs this)
B) Do "cd.." until you get to root of C, C: \
C) Run pxe1.2.cmd
D) Its gona ask you the IP or name (as seem in the network) of the pc that is sharing the install files, name seems to work better for some reason, only pc name, dont add any // or anything else.
After the name its gona ask for user, them password in order to access from network, so you gona need to input the username sharing the files, and its password, if basic sharing with not password is enabled still you gona need to input something in there, dont leave it blank, put a "1" or something.
-Simple put- the info the scritp ask in the same info you gona need to access the "server" folder from another pc on the network.

Its in spanish but it ask in this order: 1) Pc name, 2) user name, 3) Password

If everything goes OK, it must go like this and it will take several minutes to complete http://pastebin.com/VZyye8wp it should have no errors (well it will if you skip the xp part).

The end result is a "root" folder on C, you may keep it there or move it somewhere else.

4) Configure tftpd32
-Open the program, on "Current directory" you must select the "root" folder that was created with the scritp

-Go to settings, "Global", check ONLY TFTP and DHCP Server.

-Go to TFTP, "base directory" select the "root" folder, check "bind TFTP to this address" and select thet pc IP from the list

-Go to DHCP
*IP pool start address, my pc ip "192.168.100.103", so for example i use "192.168.100.200", you gona need to do something similar.
*size of pool: 54
*lease: 1
*boot file: grldr

*def. Router: put here your router IP, this is because tftpd32 will take over the DHCP from the router, and it need to have the correct config for internet to keep working on the network.
*mask: 255.255.255.0
*DNS server: router ip

*uncheck persistant leases
*check bind DHCP to this address: and select that pc ip

-OK and restart program

-unzip "grub4dos-0.4.4.zip", and copy "grldr" file inside the "root" folder.


5) EXTRAS
The Grub4dos menu is on root/menu.lst/default, here you can do with grub wharever you want. I left set up to boot up memtest and a livexp isos as examples, if you want to boot these you need to get the isos and place them on "root" folder.
You can get the memtest one here http://www.memtest.org/ download iso and rename it to memtest.iso

I also left as a example how to boot up a live Linux (DSL), for linux you gona need a linux that have all the files inside the initrd. To try that download this http://distro.ibiblio.org/damnsmall/current/dsl-4.4.10-initrd.iso, extract, and copy the "DSL" folder inside "root".


NOTE: The good about this is that is very easy to add drivers to the images, i dont even bother to edit already generated images to add them, i just place the drivers inside the drivers folder and re-run the scritp, them copy the files.

Keep in mind that in order to re-run the scritp the "root" folder must not exist on C: \, so if the folder is still there, delete it.

**Keep in mind that router may still take over DHCP on the network, not letting clients to boot PXE, its recomended to disable DHCP on router to avoid router and tftpd32 fighting each other.

***To boot from PCs with dedicated ethernet lan cards that have no PXE built-in, you can use iPXE, http://ipxe.org/ just download the pre-built .iso and burn a cd, if you boot from the cd, you gona boot from the network, i use that for pcs that have dedicated lan because the onboard one not longer works.

****About speed, its gona depend on each pc but its not fast, a pendrive is always the faster way.

*****The XP install instructions its in spanish, sorry for not editing them, the XP install mode is,
Step 1: backup, it gives a pop up about that and it opens up freecommander, i do that because in pcs that i need to reinstall pc i did not wasted time to copy files first, i just boot up the XP install system i a did a network backup of files in this stage, if you dont need to do so, just close freecommnder to continue.

Step 2: it fires up AOMEI Partition assistant, the first pop up warns you about that, and it opens the program, what you need to do is close the 2nd popup but keep the 3rd one, before closing the 3rd pop up msg you need to format and partition with AOMEI, remember to apply, Windows XP will be installed to "C" drive, as soon you close the 3rd popup the install will begun, thats why you need to partition and format the hard disk first.

After that you dont need to do any input until the system is running.
 
Last edited:

riahc3

Senior member
Apr 4, 2014
640
0
0
Kind of long

Ive never found a decent 100% easy way to install Windows XP or above over PXE.

I think I used a guide but what happened is what you mentioned about drivers missing. Will have to retry again in the future...
 

Shivansps

Diamond Member
Sep 11, 2013
3,875
1,530
136
The result is something like this

https://www.youtube.com/watch?v=ntTUSlQ-eP0

That is a old video and it was slow because drivers where not integrated and loaded live.

About easy, its as easier as it can get, there whould be an extra 40 steps if you have to do everything that the script does manually.
 
Last edited: