Having an older Vaio VGN-A115B laptop with not enough disk space on the system partition (running the setup.exe from the older OS it says it requires 16 GB free, although it will happily install later on a 12 GB partition), a shot DVD drive that couldn’t read a DVD-RW disk with Windows 8 installer and on top of that didn’t seem to power the USB ports at boot, the only option I was left off was to do a network boot (
PXE) – something I always wanted to try. So after two days and a lot of failed attempts, here it is.
Somehow I always thought booting through PXE would be easy (just as easy as the USB or DVD boot) – and how wrong I was, as it requires both a DHCP server that allows to specify a boot program and TFTP server, neither of which is easily found on the net (details on
Intel Boot Agent).
Eventually I did stumble onto
TFTPD32/64 and
Serva32/64 – both looking fairly similar which is fair enough cause the second is based on code from the first one. They seemed to have done the job well for other people, but for me the embedded TFTPD server failed a lot on transferring the BCD store during tests with a local VM, so I finally stopped using that and eventually found
SolarWind TFTP Server much more reliable.
To make things even more complicated, you have to prepare the boot image with
Windows PE (Preinstallation Environment) – you can find a lot more information for that one the web, but it does require quite a large download of the
Windows Automated Installation Kit (AIK) – in my case I downloaded version 3.0 for Windows 7.
A few things to note about my setup
Since I already have a router on the network with a DHCP server running, to avoid conflicts I used an Ethernet hub I had around to connect the two laptops directly. I manually setup the Ethernet adapter on my “server” to use
10.0.0.1 IP address (easier to type) and disabled the firewall as well as the wireless adapter for the duration of the exercise (you can probably just as easily add the server programs below as exceptions to the firewall) – if you do it like me, remember to re-enable the firewall back on when finished and to set the Ethernet adapter for automatic IP allocation later on.
You may also notice that I also configured the DHCP server to server IP addresses from the same private class (10.0.0.xxx).
To point out we will prepare a 32 bit WinPE image in
C:\WinPE directory and then use the
C:\TFPT-Root\Boot to place the boot files (SolarWind TFTP server defaults to
C:\TFTP-Root, feel free to change).
Windows PE image preparation
Installing
Windows Automated Installation Kit (AIK) is fairly straight forward so I’m not going to go into details on that. For preparing the WinPE image I started from this Microsoft
Walkthrough: Deploy an Image by Using PXE although I’m not going to follow it to the letter, feel free to use that if you want.
Run Windows AIK Command prompt:
Run the
copype.cmd command (will automatically change to the image directory and will use relative paths from then on) – remember I’m building an image for an x86 system :
copype.cmd x86 C:\WinPE
imagex /mountrw winpe.wim 1 mount
copy mount\Windows\Boot\PXE\*.* C:\TFTP-Root\Boot
Now for copying boot.sdi you can use the full path to AIK tools or simply close the console and run a new Deployment console and use relative paths.
copy x86\boot\boot.sdi C:\TFTP-Root\Boot
Back to the WinPE directory and unmount the image (cleanup).
cd /d C:\WinPE
imagex /unmount mount
Copy winpe.wim in the TFTP boot directory as boot.wim (might just work as winpe.wim, but the BCD commands below will mention boot.wim).
copy winpe.wim C:\TFTP-Root\Boot\boot.wim
Now moving on to preparing the BCD store. You might notice that instead of specifying the full path to the BCD I will change directory to the Boot directory and do it from in there. Personally I reuse the previous command (press up arrow) and change the parts at the end.
cd /d C:\TFTP-Root\Boot
bcdedit -createstore BCD
bcdedit -store BCD -create {ramdiskoptions} /d "Ramdisk options"
bcdedit -store BCD -set {ramdiskoptions} ramdisksdidevice boot
bcdedit -store BCD -set {ramdiskoptions} ramdisksdipath \boot\boot.sdi
bcdedit -store BCD -create /d "MyWinPE Boot Image" /application osloader
Note the highlighted GUID value – you will need to copy that and use it in the subsequent commands (replace {guid} with the one generated for you).
bcdedit -store BCD -set {guid} systemroot \Windows
bcdedit -store BCD -set {guid} detecthal Yes
bcdedit -store BCD -set {guid} winpe Yes
bcdedit -store BCD -set {guid} osdevice ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
bcdedit -store BCD -set {guid} device ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
bcdedit -store BCD -create {bootmgr} /d "Windows BootManager"
bcdedit -store BCD -set {bootmgr} timeout 30
bcdedit -store BCD -displayorder {guid}
This is what I eventually got in the Boot folder.
Sharing Windows 8 installation files
As you will see later on, when the remote computer will boot up and load the WinPE image it will take you to a command line where you need to map a network drive to the computer sharing the image files.
In my case, I took the Windows 8 ISO image, mounted in
Virtual Clone Drive and shared it as
Windows8 folder. I also created a
pxe user with
pxe password (you can use an existing user if it has a password assigned to it), and you will see how you will need to map a network drive from the remote computer to the installation files in order to start the actual Windows setup.
Serva32/64 DHCP server
As noted below, I will configure Serva64 (in my case again, running Windows 7 x64) to only enable the DHCP server and disable the other services.
IP pool / size : 10.0.0.100 / 100 (IP range .100 to .200)
Boot file : Boot\pxeboot.com
Subnet mask : 255.255.255.0
SolarWinds TFTP server
Not much to configure there, go to File > Configure and start the service (change the storage location to point to your files – note we’re not pointing to Boot, but the parent directory). Otherwise the software is smart enough to bind to the interface and allow to serve files.
Test run with Windows Virtual PC
Simply create a VM with a blank VM and it will try to automatically boot from the network – if everything works fine you will notice that it gets an IP in DHCP server console and it will start transferring files from the TFTP server.
Old laptop (PXE booting)
I should note that in the case of my VAIO I had to enable the Network Boot in BIOS (press F2 at boot) and then press ESC to get the boot devices listing and choose Network Boot. Then it will move to a screen similar to the above if everything is setup ok.
Pressing F12 will continue the boot process, where it downloads the boot manager, WinPE image etc. Ignore the errors in the TFTP console about not finding
boot.ini and
wgl4_boot.ttf.
Eventually the remote computer will start loading boot.wim and get you the setup background and a command line prompt. Now you will map that network drive to point to the installation files (remember I created a new user pxe/pxe and shared the Windows8 installation files – the
net use command will fail if a user is not specified saying something about Server service not being started).
From the remote computer console run the statements:
net use y: \\10.0.0.1\Windows8 pxe /user:pxe
y:\setup.exe
And finally now you are running the Windows 8 setup and continue with the usual stuff… It only took me 2 days to figure it out and get it running, hopefully this is going to useful to someone else as well, I know I’ll definitely try it again, although I will be zipping up the boot files and keeping them for future use, what might change is the setup files on the share.
Keep in mind that when we prepared the image in the first place it was for an x32 platform and you will probably need to go through the process again to build for an x64 platform, replacing all the
.