Jump to content











Photo
* - - - - 1 votes

VistaPE driver injection and PEIMG


  • Please log in to reply
16 replies to this topic

#1 Sirquil

Sirquil

    Frequent Member

  • Advanced user
  • 108 posts
  • Location:Indianapolis, Indiana
  •  
    United States

Posted 22 April 2008 - 04:30 PM

I am trying to to "inject" drivers using peimg.exe inside the Windows AIK (latest version) into a new boot.wim file in the VistaPE 12 beta, Target\Source\boot.wim.

I keep getting "The image directory specified is not a valid Windows PE image." displayed after having used the Imagex mount command successfully to mountrw and using the peimg /inf=<inf source path> <mountpath\windows>. Status code = 0x8007000d.

Could I be leaving out a step or is there something about the way WIM files are created that "locks" the file preventing "injecting" drivers. My usage of Imagex and peimg match those found googling the Internet

Using the Vista Home Prem. dvd boot.wim file and mounting it, then using the peimg /inf process works without errors.

Could the problem be with the different "Build Models" within Winbuilder's "Main Configuration"?

Bill

#2 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 23 April 2008 - 05:33 AM

I am trying to to "inject" drivers using peimg.exe inside the Windows AIK (latest version) into a new boot.wim file in the VistaPE 12 beta, Target\Source\boot.wim.
...


Hi Sirquil,

I'm a bit confused as to the exact location of this 'Target\Source\boot.wim'... and, more importantly, where it actually comes from. ... :lol: ...

If it's the final VistaPE boot.wim, there is probably 'something' in it that signals tp peimg that it is not a 'PE' image.

Can you post the output file from:
imagex /info /XML ??\Target\Source\boot.wim>&#91;your path to output.xml&#93;

... and maybe output files from the Vista boot.wim and install.wim too? Just to see if there are any obvious difference or similarities.

pkgmgr is the equivalent tool for 'non-PE' images. Try that.

Regards :thumbup:

BTW, another member, hoody, recently asked an almost identical question here.

#3 Sirquil

Sirquil

    Frequent Member

  • Advanced user
  • 108 posts
  • Location:Indianapolis, Indiana
  •  
    United States

Posted 23 April 2008 - 11:30 AM

Hi Sirquil,

I'm a bit confused as to the exact location of this 'Target\Source\boot.wim'... and, more importantly, where it actually comes from. ... :lol: ...


BTW, another member, hoody, recently asked an almost identical question here.


The boot.wim is the finial one produced by Winbuilder. I will upload the Imagex /info xml output as asked. Will have to do that later, as I am about to leave for work; after having been off a few days.

I am wondering if my problem and maybe Others is since the boot.wim is "packed" (compressed?) that you can not use peimg /inf. If so, is there a way to modify the code in 00-Post configuration script to prevent packing --just to see if this is what is preventing the use of peimg /inf. Thanks for the pkgmgr suggestion, I will give it a try. Not sure about the requirements for an unattended xml file... with pkgmgr use.

I will look up hoody's question and replies.


Bill

#4 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 23 April 2008 - 11:38 AM

I am wondering if my problem and maybe Others is since the boot.wim is "packed" (compressed?) that you can not use peimg /inf....


Oh. Sirquil!

You said that you mounted (RW) the Vista boot.wim, and peimg worked fine.

Was I right to assume you had mounted the boot.wim in question?

Forget everything else. You need to mount it!

Sorry if seem abrupt!

Regards :lol:

#5 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 23 April 2008 - 12:04 PM

... just to try to clarify - as I understand it, 'packed' in VistaPE means unmounted. So, I misunderstood. If you have mounted it, then the forget my previous post. I think I was a bit rash.

Regards :lol:

#6 Sirquil

Sirquil

    Frequent Member

  • Advanced user
  • 108 posts
  • Location:Indianapolis, Indiana
  •  
    United States

Posted 23 April 2008 - 08:42 PM

[quote name='allanf' date='Apr 23 2008, 08:04 AM' post='33925']
... just to try to clarify - as I understand it, 'packed' in VistaPE means unmounted. So, I misunderstood. If you have mounted it, then the forget my previous post. I think I was a bit rash.

Regards :lol:
[/quote

I took the boot.wim produced by Winbuilder built using VitaPE-12-Beta project and tried to inject drivers by mounting the boot.wim file.

Imagex /mountrw c:\roject\copy\boot.wim 1 c:\project\mount this was successful.

Next I used: peimg /inf=c:\project\drivers\ich9core.inf c:\project\mount\windows --this is what fails.

Next thing I did was to take the boot.wim file from the Windows Vista install DVD --same process. This time both steps worked. I was able to inject drivers into the Windows Vista install DVD boot.wim file.

Output of Imagex /Info <path-of-boot.wim> is attached.

#7 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 23 April 2008 - 11:51 PM

If you look in the output file for the Vista DVD boot.wim, you will see an Element called 'Flags' for each of the two images. You need to get the same Element into the VistaPE boot.wim for image #1 (the only image), and it needs to the value set at '2' or '9' for peimg to recognize the image as a 'PE' image.

(Don't get the 'Flags' Element mixed up with the term 'Flags' used to describe a particular type of parameter/argument for the imagex command.)

You are looking for a way to set an image EditionID equal to 'Windows PE' (or perhaps 'WinPE' - I don't know the correct ID).

Try:
imagex /export /flags “Windows PE” c&#58;\project\copy\boot.wim * c&#58;\project\copy\boot_test.wim &#34;Boot Test Wim&#34;

Regards :lol:

#8 Sirquil

Sirquil

    Frequent Member

  • Advanced user
  • 108 posts
  • Location:Indianapolis, Indiana
  •  
    United States

Posted 24 April 2008 - 12:50 AM

If you look in the output file for the Vista DVD boot.wim, you will see an Element called 'Flags' for each of the two images. You need to get the same Element into the VistaPE boot.wim for image #1 (the only image), and it needs to the value set at '2' or '9' for peimg to recognize the image as a 'PE' image.

(Don't get the 'Flags' Element mixed up with the term 'Flags' used to describe a particular type of parameter/argument for the imagex command.)

You are looking for a way to set an image EditionID equal to 'Windows PE' (or perhaps 'WinPE' - I don't know the correct ID).

Try:

imagex /export /flags “Windows PE” c&#58;\project\copy\boot.wim * c&#58;\project\copy\boot_test.wim &#34;Boot Test Wim&#34;

Regards :lol:


I tried your code, same result. Tried some different names -same result. Change line the Imagex command line in 00 Postconfiguation.script to change the Name (EditionID?). Same result. Tried adding the /compress none on the same line, same script as name change. Same result. All results so far are Invalid WinPE image.

I am attaching the output text from Imagex /info <winpe.wim path> Winpe latest included with the Windows AIK.
This one works with driver injection and has no flags.

There are three compression ratios, I still need to try /compress medium to see if that is LZX --VistaPE-wim.txt output has XPRESS compression. Just something to try.

I appreciate the input you are giving.

#9 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 24 April 2008 - 01:52 AM

I am attaching the output text from Imagex /info <winpe.wim path> Winpe latest included with the Windows AIK.
This one works with driver injection and has no flags.

There are three compression ratios, I still need to try /compress medium to see if that is LZX --VistaPE-wim.txt output has XPRESS compression. Just something to try.


hmmm... You're right. No 'flags' in that one. Maybe that's why it is undocumented... redundant idea from MS?

I don't think it has anything to do with the compression... once the image is mounted, it's uncompressed, so shouldn't make any difference. Who knows?

There is definitely something in the VistaPE image that signals to peimg that it is not a 'PE' image. There is a difference. Did you try pkgmgr on it?

You did try the peimg on the new exported .wim...? Should be 'boot_test.wim' if you followed the code in my previous post.

Do you know how to get a log file out of peimg?

Regards :lol:

#10 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 24 April 2008 - 02:22 AM

... also, can you try a different peimg command to see if you get the same error...

peimg /lang=en-US c&#58;\project\mount\windows

or whatever language you might have installed.

Otherwise, mount the VistaPE boot.wim and re-capture (not /unmount /commit) it... is this what you are doing to test the different compressions?

BTW, why don't you install the drivers during the building process of VistaPE? It's all very interesting - what you are trying to do...
... but a bit frustrating... :lol: ...

#11 Sirquil

Sirquil

    Frequent Member

  • Advanced user
  • 108 posts
  • Location:Indianapolis, Indiana
  •  
    United States

Posted 25 April 2008 - 12:09 AM

... also, can you try a different peimg command to see if you get the same error...

peimg /lang=en-US c&#58;\project\mount\windows

or whatever language you might have installed.

Otherwise, mount the VistaPE boot.wim and re-capture (not /unmount /commit) it... is this what you are doing to test the different compressions?

BTW, why don't you install the drivers during the building process of VistaPE? It's all very interesting - what you are trying to do...
... but a bit frustrating... :lol: ...


Yes, it is frustrating...

Worked a little more tonight. I was able to set the name, description, and the flag. Still an invalid image. we all know in fact it is a good image, it will produce a bootable CD or USB thumb drive. It is just peimg will not recognize the boot.wim file as valid.

I used this command line: Imagex /info boot.wim 1 Imagename Imagedescription /flags "9"

I will be going back thru the process/s we have discussed to be sure I have done it all correctly. I want to use the same steps each time. It may take awhile. The reason I want to do this is to better understand what makes an invalid boot.wim.

Hate it when the computer appears to have won; after all its just binary! :thumbup:

Bill

#12 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 25 April 2008 - 12:38 AM

I used this command line: Imagex /info boot.wim 1 Imagename Imagedescription /flags "9"
...

The reason I want to do this is to better understand what makes an invalid boot.wim.
;;;


Nice one! Maybe you should offer to re-write the WinPE users guide ... :lol: ...

I was going to suggest setting the flag to "ultimate", just to see what number came up. I might try it with winpe.wim to see if peimg will still work with that...

...and what happens if the flags are rearranged on the Vista install DVD ... what will setup.exe think? ... hmm ... maybe that is why it is undocumented?

Regards :thumbup:

#13 hoody

hoody

    Newbie

  • Members
  • 29 posts
  •  
    United States

Posted 28 April 2008 - 01:54 AM

I am tracking this post. This will answer my same question i asked some time ago. I am currently on a business trip and can not test it. Hopefully I can hear good news when I get back to home. Thank you guys.

#14 grunge

grunge
  • Members
  • 2 posts
  •  
    United States

Posted 04 September 2008 - 03:09 PM

Does anyone have a solution to this. I am experiencing the same problem now.

#15 grunge

grunge
  • Members
  • 2 posts
  •  
    United States

Posted 04 September 2008 - 06:20 PM

I figured it out...

Copy the users folder from a "real" pe image to the root of your vistape image.

#16 Guest_sucker_*

Guest_sucker_*
  • Guests

Posted 11 November 2008 - 01:33 AM

Don't include the Windows directory.

...assuming boot.wim is mounted with imagex in c:\project\mount

peimg /inf=c:\project\drivers\ich9core.inf c:\project\mount

#17 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 11 November 2008 - 02:04 PM

SERVICE POST:

Member "sucker" was a bugmenot account.

We would like to have members of the board not anonymous, "casuals" users.

jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users