OSD PXE Step by Step
In this blog post I will go thought the operating system deployment process with PXE boot step by step. Since this scenario includes many technologies, troubleshooting the problems takes some extra effort. I’ll try to show and examine all the technologies involved.
PXE Boot Step by Step
Process steps for the PXE boot is as follows
- Client is booted from network
- Client contacts DHCP for IP address
- Client receives IP from DHCP and Boot Server, Boot File Name for the PXE boot
- Client contact PXE server and downloads the boot file
- Client boots into Win PE
- Client looks for available task sequence
- and deployment starts…..
Based the steps we are facing the problem we need different tools/logs for troubleshooting
Before starting PXE
To test the PXE boot I have created a test task sequence and deployed it to All Unknown Computers collection with the following settings;
We first need to check references to see if anything is missing from the Distribution points. Missing packages will cause task sequence to fail .
Step 1 - Enabling PXE Boot
In order to use PXE boot you need to enable this option from the BIOS of the computer. After enabling each vendor uses their own way of initiating the network boot. Most of the time its started either by pressing F12 or choosing network boot from the boot options.
Step 2 – Client Receives IP from DHCP Server
As first step of PXE client needs an IP address from the DHCP server. If the client does not getting the IP address best option is to check network connectivity between client and the DHCP server. You can use a network trace to find out if your client is actually reaching the DHCP server itself.
Tools to use : Microsoft Network Monitor (MNM) or any other network package capture tool
To use MNM download the latest version and install it on the DHCP server. After the setup you need to go to New Capture and click Capture Settings
Here we are only interested in DHCP traffic so we will specify DHCP as protocol in filter page and click apply. As
next step we will start the network capture and try to boot the client using PXE.
Client initiates the network boot. Here note the Mac address of the client as it will help us to track the request from the client.
Expected communication ;
First broadcast package shows up the mac address of the PXE client ;
If you don’t see this package this means broadcast messages are not reaching the PXE server so you need to inspect the network devices in between your client and DHCP server. Most probable cause would be the switch cl’ent connected to don’t have the IPhelper setup .
After the broadcast received CMPRi12 ( my DHCP server) replies and finally client gets the 192.168.1.5 ip address. If you inspect the reply message from DHCP it also includes the Boot server and Boot file name ;
In order DHCP to work you need some configuration on the server side. First DHCP server should be authorized and should have a scope, firewall should not block DHCP traffic. Also we need to configure the following options for PXE boot
Option 66 Boot server : This is the PXE server your ConfigMgr DP with PXE role
Option 67 Boot File Name : \smsboot\x64\wdsnbp.com
Option 60 PXEClient : PXEClient . You only need this if your PXE server and DHCP server is collocated. Since this is quite unlikely for a production environment most of the time you wont need to configure this setting.
At this point we will switch to ConfigMgr DP and look at the SMSPXE.log
Here I see my MAC address contacting to the PXE server but its not serviced. We got a warning message saying Architecture boot image not found.
This message means PXE server does not have the required boot image available. You need to go to ConfigMgr console and Boot image properties. Under datasource enable Deploy this boot image from the PXE enabled distribution point
After enabling this when PXE provide loads you will see your boot images (CAS00003.wim and CAS00004.wim in my environment) available in PXE
Step 3 – Downloading the boot image
Option 1 - machine is not in the ConfigMgr database and boot images are deployed to PXE .
Now we will retry the PXE boot . Here client contact PXE server and start downloading the boot image;
During this in SMSPXE.log
Here we can again see 00:15:5D:00:6C:4F our client has contacted to PXE server and after checking we can see device is not in the database . We can also see that advertisement CAS20001 will be used to deploy the client.
If you check the network trace of your PXE server you can see the TFTP traffic while downloading the boot image . You can capture this traffic by using TFTP as a capture filter.
Option 2 - If you try PXe boot with a machine already registered in ConfigMgr database you will see that machine will not be serviced by PXE.
Option 3 - If the machine is serviced before but deployment breaks before complementing you will see that machine will not be serviced by PXE.
As you can see machine is unknown but still will not be serviced. PXE has an internal protection mechanism to protect computers from being re-imaged so when a computer is serviced a record is being created in ConfigMgr database indicating the date and time it was serviced by PXE.
Here at this point if the deployment fails before the actual OS deployment you will end up with either
- a computer object named Unknown and PXE deployment will be cached on this resource
- If process breaks very early you will not have any object created in ConfigMgr but PXE deployment will still be registered in database.
In both conditions that device will not be serviced by PXE component until we clear this flag. You can see the list of computers already serviced by running the following query in ConfigMgr database.
SELECT * from v_LastPXEDeployment
To clear this flag ;
- if you have can see the computer object named Unknown with the details above you can right click and run Clear the PXE Deployment
- If there is no such computer object you need to import the computer again by using the details from that SQL table and then you will be able to right click and run Clear the PXE Deployment
Step 4 – Boot into Win PE
After downloading the boot image , client will boot into Win PE and will start the required advertisement.
If you receive any problems at this point SMSTS.log is your friend. You should enable command line support on the boot image and open a cmd by pressing F8 then check the SMSTS.log for further troubleshooting.
Good Luck …..