April 2007 - Posts

Microsoft Windows PE 2.0 is an improvement over the previous versions of Windows PE.  This new version is built on the Vista kernel and has updated components.  But with this upgrade come a couple of caveats.

In PE 1.x, there was a difference between factory -minint and factory -winpe in how plug and play device enumeration and driver installation was handled.  With the -minint switch, the enumeration occurred only once.  With the -winpe switch, enumeration was much more exhaustive.

My example where this makes a difference is the Broadcom NetXtreme II Gigabit Ethernet NICs (specifically in Dell PowerEdge x950 servers, but also in models from HP and others).  This NIC has a dual-layer driver model.  Essentially, there is one driver (matched to the hardware's PCI device ID) that creates a virtual driver bus.  A second driver is necessary (matched to the virtual bus's device ID for the NIC) that is the actual network layer driver.  This was done so that the NIC could be used as an iSCSI interface (same VBD driver matched to the physical layer but a different top-level driver).

With -minint, the VBD driver would be installed but the driver for the NIC itself would not be loaded.  With -winpe, an exhaustive check was performed that would catch the "installation" of the new virtual bus, enumerate it, and then install the network layer driver.

Windows PE 2.0 no longer has the -minint or the -winpe switches.  Instead, it appears (in my experience) to operate equivalent to the -minint switch mode -- it will only install drivers for devices found during the initial enumeration.

In a previous post, I mentioned the use of HWPNP.EXE from Paraglider to work around this issue.  I found this utility from the Bart's PE build documentation.  This utility works well and quickly.  However, it only works under 32-bit Windows PE 2.0.  I do not know if they plan on providing a 64-bit version in the future, but it became necessary for me to have something that would work under 64-bit Windows PE 2.0 (because I was in the process of installing Windows Server 2003 Enterprise x64 which requires a 64-bit PE shell to launch from).

So, I took the idea of what HWPNP does and coded it up as a VB script file.  Essentially this file locates the INF directory in Windows PE 2.0, enumerates the INF files and builds a list of device IDs that are supported by those INF files.  Then it enumerates all devices via WMI and, if no driver is currently installed, it uses the DRVLOAD command to attempt to load the matching driver (via the discovered INF files).  It then repeats this process until it has enumerated through the WMI list and not installed a driver.

Save the attached TXT file and change the extension .WSF.  In our environment, we have modified the UNATTEND.XML file for the Windows PE build so that it calls the script prior to either launching a command prompt (or in the case of BDD, launching the wizard).  That way, network and devices are present for the BDD driver injection scripts.