dism mount WIM, update, wimlib append?

Comments, questions, bug reports, etc.
Post Reply
BiatuAutMiahn
Posts: 7
Joined: Sun Nov 29, 2015 3:57 am

dism mount WIM, update, wimlib append?

Post by BiatuAutMiahn »

Hello, I am working on an update system for WinPE, and I need to be able to mount currently booted wim, perform modifications, then push the changed image to a new image in the wim.\

My Process:
-Download proprietary update payload
-Create IMdisk Ramdisk/filedisk
-Modify/Create/Delete files/registry
-Capture result into new image.

-I tried to dism mount WIM, then capture that into new wim, however the size of the wim is 8MB, however wimlib captures ~2GB.
-I don't see the wimlib functionality to mirror/copy existing image into a new one (same wim)

Any ideas? Thank you
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: dism mount WIM, update, wimlib append?

Post by synchronicity »

> -I tried to dism mount WIM, then capture that into new wim, however the size of the wim is 8MB, however wimlib captures ~2GB.

Not sure what you mean here.

> -I don't see the wimlib functionality to mirror/copy existing image into a new one (same wim)

You could try using 'wimexport' to export an image from the WIM file into itself. I'm not sure if it will work on Windows, though, due to the way Windows handles file locking. But you could always export to a temporary file.
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: dism mount WIM, update, wimlib append?

Post by synchronicity »

It is also possible to perform modifications using 'wimupdate' rather than mounting with DISM. (Or you can mount with 'wimmount', but only on Linux.)
BiatuAutMiahn
Posts: 7
Joined: Sun Nov 29, 2015 3:57 am

Re: dism mount WIM, update, wimlib append?

Post by BiatuAutMiahn »

-> Not sure what you mean here.
I mounted the wim using dism, then i tried to capture the mountdir using wimlib into a new wim. The size of the resulting wim was around 8 MB, however the capture process of wimlib showed over 2 GB of data being archived
BiatuAutMiahn
Posts: 7
Joined: Sun Nov 29, 2015 3:57 am

Re: dism mount WIM, update, wimlib append?

Post by BiatuAutMiahn »

@synchronicity, it does look like I can export it to itself. I can then mount the wim using dism, make changes, then commit.

Should I use optimize to rebuild/recompress the wim afterwards to essentially perform a cleanup?
chungy
Posts: 30
Joined: Mon Feb 15, 2016 3:40 am

Re: dism mount WIM, update, wimlib append?

Post by chungy »

dism creates a whole tree on an NTFS volume and sets up reparse points so that the kernel and look back into a mounted WIM for the file data. wimlib will be capturing just these reparse points instead of the expected file data (it works quite different from how mounts work in Linux, for example). I don't think it'll be possible to capture a new image like this unless wimlib learns a new option to ignore reparse points (extending --dereference for Windows, maybe?).

Your best bet would just to let dism unmount/commit a new image, then perhaps using wimoptimize to clean it up.
Post Reply