Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
winboot request - injecting or patching wim
2015-04-14, 03:16
Post: #1
winboot request - injecting or patching wim
I only took a short look at the winboot source.. was trying to find out how to include or inject files into a wim.. I was unsuccessful.

Would be nice if we could use something like the patching function in winboot/wimpatch.c to
inject files into a boot.wim.

this would
- reduce the pains of managing multiple boot.wim files.
- remove the need for imagex to add small scripts
- add simple dynamic install scripts from a webservice

initrd bcd BCD
initrd boot.sdi boot.sdi
initrd boot.wim boot.wim
initrd http://service/winpeshl.py?mac=${m} Windows/System32/winpeshl.ini
chain wimboot

Or perhaps something like:
initrd http://service/winpeshl.py winpeshl.ini
chain wimboot patch=boot.wim:winpeshl.ini:Windows/System32/winpeshl.ini
[/undefined]

if it's not possible ill take a simple no for an answer Smile
Thanks.
Find all posts by this user
Quote this message in a reply
2015-04-17, 19:11
Post: #2
RE: winboot request - injecting or patching wim
(2015-04-14 03:16)steverweber Wrote:  Would be nice if we could use something like the patching function in winboot/wimpatch.c to
inject files into a boot.wim.

this would
- reduce the pains of managing multiple boot.wim files.
- remove the need for imagex to add small scripts
- add simple dynamic install scripts from a webservice

wimboot currently has the ability to extract files from a .wim image (and so has some understanding of the .wim format), and also has the ability to apply arbitrary binary patches to a file exposed to the next-stage bootloader. It wouldn't be impossible to extend this to add the ability to inject files into the .wim image, but it would be non-trivial. I estimate 3-5 days of work.

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2015-04-17, 20:03
Post: #3
RE: winboot request - injecting or patching wim
I have investigated this myself.
An alternative approach that I'm working on is to generate the BCD on the fly (with python) and using "loadoptions" insert parameters that can be read from the registry at HKLM\SYSTEM\CurrentControlSet\Control\SystemStartOptions in winpe.

This way a script can determine what to do from the options without having multiple images.

Ofcourse if we had wim file patching supported much more could be done.

Read FAQ before first post!
Are relevant ipxe.org error urls and PCIIDs included?
Visit this user's website Find all posts by this user
Quote this message in a reply
2015-04-17, 20:18 (This post was last modified: 2015-04-21 02:41 by steverweber.)
Post: #4
RE: winboot request - injecting or patching wim
Thanks for the idea on patching the BCD. setting the loadoptions seems like a good solution.
Perhaps a simple patch for winboot with a commandline arg that can replace a signature in the BCD with a new value kinda like what is done with efi_patch_bcd_reg.

NiKiZe, something like this might remove your need to use python to insert the parameter. You would just need to edit the BCD once to add the signature as a loadoption.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)