Installing Windows 7 with PXE
Recently been doing some windows installation for some friends on these mini laptops without CD-ROMs. So I decided to test out PXE installations.
For this to work best you need a cross-over TP-cable or a hub/switch. If you already have a DHCP server in you network you may encounter some problems (This can probably be temporarly disabled in your router).
Setting up Server (Gentoo):
Sorry. Did not have my Gentoo computer… but I will test that too.
Setting up Server (Windows XP):
Create a Samba Share:
I ripped the Windows7 to an ISO file and mounted it as E: on my computer using DaemonTools Lite.Then I shared the device via Samba as “WIN7” with access to Everyone (make sure to turn off simple file sharing).
Configure Network Interface:
Set NIC to have a static IP. I chose “10.0.0.200” with netmask “255.0.0.0”.
Set up TFTP Daemon:
Download the TFTPBoot.exe linked in this blog (contains everything you need) and extract to C:.
Follow instructions on the site how to configure Tftpd32.
I configured an DHCP pool starting at 10.0.0.210 with a size of 10 and netmask 255.0.0.0, everything else blank.
Some notes on Samba Authentication:
The first time I tried this the authentication always failed when trying to mount the Samba Share. I tried changing passwords, creating new users but no go. WinPE requires NTLMv1/NTLMv2 authentication, and this solves the problem (at least on Windows XP):
Start > Run > secpol.msc Local Policies > Security Options > Network Security LAN Manager authenticatioin level Select Send LM & NTLM - use NTLMv2 session security if negotiated
Setting up Client:
I had to enable PXE booting in the BIOS. Then press F12 in the POST screen to activate NIC as boot device. It got a DHCP response and TFTP response and booted into WinPE.
Installing network drivers in WinPE environment:
The network drivers was missing from the WinPE boot image, so I copied the Vista 32bit drivers on an USB stick and ran:
Then I had to reconfigure my IP settings (Using the DHCP address I previously recieved).
netsh interface ipv4 set address name=”Local Area Connection” source=static address=10.0.0.210 mask=255.0.0.0 gateway=10.0.0.200
Then made sure I could reach the server (and check if NIC driver actually worked) by pinging:
Mapping network drive and starting setup:
Just type use this command to map a network drive from a Samba share:
net use Y: \\10.0.0.200\WIN7
It will promt for a username/password. Syntax for Username is “10.0.0.200\UserName”. Then type the password if any.
If you recieve login errors even you are sure you entered the right credentials – make sure the date and time is synced on both computers. Also check out the “Setting up Server” section again.
Then just run: