Jump to content

Discovering/exporting drivers from WinPE 1.2


gregorsamsa11

Recommended Posts

We currently have a small application that runs from WinPE 1.2 bootable media. I know that there are a number of 3rd party drivers included in our WinPE 1.2 image, but there is no documentation about what they are and where to find them. Now that I'm tasked with integrating the application into new WinPE 2.0 bootable media, I need to discover all of these 3rd party driver files and add them to the WinPE 2.0 image in order to ensure this application works on all of the necessary hardware. Since there is no documentation about these drivers, I'm not sure how to do this, or if it's even possible. Even if I can't firmly identify all of the 3rd party drivers, I can settle for injecting all drivers from our WinPE 1.2 image into the new 2.0 image (if that makes sense).

I started by diff'ing between our WinPE 1.2 image and a standard 1.2 image built by mkimg. This turned up a lot of .inf, .sys, and .dll files, as well as a few others. I think that .inf files are instructions for driver setup, and I know what .dll files are. What are .sys files? Furthermore, how can I determine which files in addition to the .inf are necessary for injecting the driver into the WinPE image? In other words, how can I discover the groups of files that are associated with one particular driver? I think I've identified some .inf files that represent 3rd party drivers that I need, but when I try to inject them using $peimg /inf="" I get an uninformative error (just an error code*, which I've so far been unable to find a translation for). I'm assuming that during the injection process, peimg failed to find the actual drivers, but this is not confirmed.

Any advice would be appreciated. If there is anything unclear about the situation, please ask. I wrote this in a hurry.

Thanks,

gregor

* The error is "PEIMG failed to complete the operation with status code 0x80070002." If anyone knows where I can find a table to translate PEIMG error codes, that would be helpful.

Link to comment
Share on other sites


The 2 versions of WinPE are based on different OS versions (1.2 is XP, 2.0/2.1 is Vista). As the drivers that are compatibile with XP are not compatible with Vista, you will need to identify ech driver you need and find the Windows Vista / Windows Server 2008 equivalent. The good news is a large number of the drivers will probably be already included in the New WinPE.

To answer your question, a driver for a device will usually have a .inf file and .sys file, but may also have a .dll and/or a .cat file.

In WinPE 1.2, the following locations contain the driver files:

i386\inf contains the .inf files from each driver, open these in notepad to see what they apply to.

i386\system\drivers contains the .sys files from each driver.

If it is a mass storage controller driver, look at the i386\system\WINPEOEM.SIF to see what drivers are being loaded from which folders in addition to the basic set of drivers included with WinPE. (This assumes the person integrating the drivers followed standard practices).

In reality, rather than trying to reverse engineer what was previously added, best bet is to fire up the default WinPE 2.1 on each hardware and see what is not detected. You can then use the command line program DRVLoad.exe included to load Vista / Server 2008 drivers manually and see if the hardware works under a newer driver.

Link to comment
Share on other sites

This is the full error code:

PEIMG Failed to complete the operation with status code 0x80070002

The image directory specified is not a valid Windows PE image

1. What version of the Win PE are you using? 1.2, 2.0, 2.1 are not valid version numbers. For example, the version I use is v6.0.6000. You can get this version by either booting into your PE and look at the command prompt, or adding your winpe.wim into the Boot Images container in the WDS Snap-in.

2. Are you attempting to update a WinPE image using a different version of the WAIK or OPK Tools than the one that intially created the PE?

3. Are you attempting to inject the driver into a Windows XP image?

A better clarification:

1. INF files tell Windows how to install the driver files.

2. DLLs are resource files that the driver needs to make its calls to the OS or other programs.

3. SYS files are the actual driver file.

And I agree, make sure you are only using Vista 32bit drivers for your PE, unless it is a 64bit PE. Do not use XP or other OS drivers.

Link to comment
Share on other sites

That clears it up a bit. Thanks for the help.

I think my main problem is that I don't have a list of the devices that need to be supported, so I'll tackle it from that end. Once I have that, I can hunt down the Vista drivers I need. Hopefully they all exist.

Thanks again.

Link to comment
Share on other sites

1. What version of the Win PE are you using? 1.2, 2.0, 2.1 are not valid version numbers.

Try telling that to MS! 'Windows PE 2.0', 'Windows PE 2.1', and 'Windows PE 3.0' are the terms used by MS in the Documentation accompanying the WAIK. You should have a browse through the Users Guides. They're quite informative.

For example, page 1 of the 'Windows Preinstallation Environment (Windows PE) Users Guide for Windows 7':

Windows PE 3.0 is the latest release based on the Windows 7 operating system.

Also, everywhere on the web. For example:

http://www.svrops.com/svrops/articles/winvistape2.htm

@gregorsamsa11, regarding the peimg error...

It would be helpful to state the steps that you have used to customize the WinPE 2.0 leading up to the error with peimg. It's an issue that I have not really understood. What is it that signals to peimg whether or not the image is a Windows PE image - particularly when doing extensive customizations. But it should always work with a fresh winpe.wim from the WAIK.

It may be best to execute the peimg command immediately after mounting the image - before all other customizations.

Some XP drivers do work OK with Windows PE 2.x.

Regards

Edited by allanf
Link to comment
Share on other sites

1. What version of the Win PE are you using? 1.2, 2.0, 2.1 are not valid version numbers.

Try telling that to MS! 'Windows PE 2.0', 'Windows PE 2.1', and 'Windows PE 3.0' are the terms used by MS in the Documentation accompanying the WAIK. You should have a browse through the Users Guides. They're quite informative.

For example, page 1 of the 'Windows Preinstallation Environment (Windows PE) Users Guide for Windows 7':

Windows PE 3.0 is the latest release based on the Windows 7 operating system.

Also, everywhere on the web. For example:

http://www.svrops.com/svrops/articles/winvistape2.htm

I understand what you mean, but it is possible to have an older version of the PE with newer functionality. And this specific combination could cause problems in certain instances. I will use the PE I maintain as an example. It is a Windows PE 2.0 (hence my version number) but it has the 2.1 Servicing module installed into it. A PE 2.1 and my hodgepodge PE 2.0 would be different.

So to say that I have a Win PE 2.1 with a Win PE 2.0 version number. Do you see what I mean?

Link to comment
Share on other sites

1. What version of the Win PE are you using? 1.2, 2.0, 2.1 are not valid version numbers. For example, the version I use is v6.0.6000. You can get this version by either booting into your PE and look at the command prompt, or adding your winpe.wim into the Boot Images container in the WDS Snap-in.
So to say that I have a Win PE 2.1 with a Win PE 2.0 version number. Do you see what I mean?

Not really ... :) ...

How would quoting the kernel version help anyone when you have hacked the Servicing Stack? ... :huh: ...

Regards

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...