Jump to content











Photo
- - - - -

reWIM

waik raw create extract wim

  • Please log in to reply
63 replies to this topic

#1 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10452 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 21 May 2012 - 10:06 AM

Posted Image

File Name: reWIM
File Submitter: Nuno Brito
File Submitted: 21 May 2012
File Updated: 17 Jul 2012
File Category: Tools

With the introduction of Windows Vista back in 2007 our traditional process to create Windows PE boot disks got complicated, requiring end-users to download a 1Gb WAIK package and install a WIM driver on their machines.

Over the past years we saw developers including the Windows AIK drivers on their works without permission from Microsoft, causing a serious problem from a legal standpoint.

Furthermore, the handling of WIM archives is plagued with problems in regards to the correct version of drivers, with compatible use of either x86 or x64 binaries and the requirement of administrative permissions. In overall these conditions provide a serious problem to modern boot disk projects.

With this library/tool we aim to provide the means to create a bootable WIM archive for use in Windows PE projects and similar technologies without such nuisances.

This work is freeware. Made available to the members and developers that support our community. Please read the licensing chapter for further details.



What does it do?
  • Creates a new WIM archive from an existent folder
  • Can add/remove single files from existent WIM archives
How to use?
To use this library, you need to have Java installed on your machine.


Graphical User Interface:
- Under Windows double-click on the exe file,
- Under Linux and Mac OSX type "java -jar reWIM.exe"

Command Line Interface
- type "java -jar reWIM.exe" followed by one of these options:
  • /Custom to add a custom file onto the XML portion of the WIM archive
  • /Boot to set the WIM archive as bootable
  • /Capture to add the files from a given folder onto a new WIM archive
  • /Add to add a file onto an existent WIM archive
  • /Remove to remove a file from a WIM archive
  • /Dir to list all files inside an image from a WIM archive
  • /Apply to extract all files from an image onto a directory
Below is a full example of this syntax:
java -jar reWIM.exe /Boot /Capture WIMsource WinPE/sources/boot.wim /Custom custom.txt "WindowsPE"



An example is provided inside the file run.bat that demonstrates how to capture a folder onto a WIM archive.


Licensing
reWIM was developed with the sponsorship of our community members and is made available under the reboot.pro community license that you find at http://reboot.pro/about/license


Future
Request for changes and bugfixes are welcome. We will provide support whenever humanly possible. Please place your feedback on the support topic.

Thanks!

Click here to download this file

#2 paraglider

paraglider

    Gold Member

  • .script developer
  • 1716 posts
  • Location:NC,USA
  •  
    United States

Posted 21 May 2012 - 11:52 AM

Looks like its biggest problem is that there is no compression - I extracted a 423MB wim file and rebuilt. Its now 1077MB.

#3 paraglider

paraglider

    Gold Member

  • .script developer
  • 1716 posts
  • Location:NC,USA
  •  
    United States

Posted 21 May 2012 - 11:53 AM

Also on my machine java was not in the path.

#4 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10452 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 21 May 2012 - 12:10 PM

Thanks for testing.


Looks like its biggest problem is that there is no compression - I extracted a 423MB wim file and rebuilt. Its now 1077MB.

LZX and XPRESS compression algorithms can be added later. On my tests, the image without compression are faster to load and start.

If your uncompressed WIM archive is above 1Gb, don't forget to adjust the memory of your virtual machine to at least 1.2Gb of available RAM.

:cheers:

#5 ericgl

ericgl

    Frequent Member

  • Expert
  • 314 posts
  •  
    Israel

Posted 21 May 2012 - 12:22 PM

Extracting single files from WIM archives is already supported by 7Zip, which is freeware.

But it's always nice to have a (free) alternative.
Thanks Nuno!

#6 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10452 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 21 May 2012 - 12:54 PM

Just to clarify, I don't claim that this is the only tool capable extracting single files outside of WAIK. In past events I have defended the use of 7zip to create a Windows PE rather than depending on MS drivers, albeit the creation of WIM archives was always an obstacle.

Reading and extracting has been done in the past. The innovative part provided by this tool is the capability of adding files to a bootable WIM archive under Windows.

I'm glad you like this work.
:cheers:

#7 ericgl

ericgl

    Frequent Member

  • Expert
  • 314 posts
  •  
    Israel

Posted 21 May 2012 - 01:21 PM

Nuno,
I tried to open Boot.WIM, which I extracted from Windows 8 Server ISO.
I right-clicked on wimlib.jar and selected to open with Java Platform SE Binary.
In WIM Explorer, I clicked on the Plus sign to open a WIM file.

Posted Image

I received the following error (I'm running WinXP Pro SP3 eng x86 with Oracle Java JRE 7):

javax.xml.bind.JAXBException: Provider com.sun.xml.internal.bind.v2.ContextFactory could not be instantiated: javax.xml.bind.JAXBException: "com.guujiang.wimtool.core.xml" doesnt contain ObjectFactory.class or jaxb.index

- with linked exception:

[javax.xml.bind.JAXBException: "com.guujiang.wimtool.core.xml" doesnt contain ObjectFactory.class or jaxb.index]

at javax.xml.bind.ContextFinder.newInstance(Unknown Source)

at javax.xml.bind.ContextFinder.find(Unknown Source)

at javax.xml.bind.JAXBContext.newInstance(Unknown Source)

at javax.xml.bind.JAXBContext.newInstance(Unknown Source)

at javax.xml.bind.JAXBContext.newInstance(Unknown Source)

at com.guujiang.wimtool.h.a(Unknown Source)

at com.guujiang.wimtool.gui.m.run(Unknown Source)

Caused by: javax.xml.bind.JAXBException: "com.guujiang.wimtool.core.xml" doesnt contain ObjectFactory.class or jaxb.index

at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at javax.xml.bind.ContextFinder.newInstance(Unknown Source)

... 7 more


Posted Image

#8 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10452 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 21 May 2012 - 02:01 PM

The WIM explorer is not yet fully functional, that is the reason why it was not even announced on the first topic.

For the moment only the command line syntax is available, sorry if you run into this issue.

An example of the command line syntax:
java -jar wimlib.jar /Boot /Capture WIMsource WinPE/sources/boot.wim /Custom custom.txt "WindowsPE"

Where:
/Boot is a flag to make the WIM archive bootable
/Capture will use a given folder as source for the WIM archive and the second parameter as destination WIM file.
/Custom is a set of XML data specific to Windows PE that needs to be added on the WIM archive (I make available a custom.txt file with an example)
"WindowsPE" represents the title that you want to set for this image

To open the boot.wim that you have from Windows 8 and extract files, I recommend that you use 7zip. At the moment I am more focused on the archive creation and once this is stable to finish the extraction part as well.

I hope this helps.
:cheers:

#9 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12688 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 21 May 2012 - 03:10 PM

Great enhancement! :1st:

I integrated WimLib into multiPE version 36 :rofl:
wimlib.gif
custom.txt is generated using actual data.

Peter
  • Nuno Brito likes this

#10 patpat

patpat

    Member

  • Banned
  • 48 posts
  •  
    United States

Posted 21 May 2012 - 03:21 PM

Congratulations for your library.

I think you are probably not familiar with a C library called wimlib originally published by Carl Thijssen at UDA December 31st 2010 which is also used for handling WIM files...
http://www.ultimated...org/wimlib.html

Now continued by a guy called "Synchronicity" at
http://sourceforge.n...rojects/wimlib/

I think you should call your library after a different name in order to avoid developer confusion, future licensing issues,
and also to respect other's people intellectual property.
  • Icecube likes this

#11 homes32

homes32

    Gold Member

  • .script developer
  • 1021 posts
  • Location:Minnesota
  •  
    United States

Posted 21 May 2012 - 03:50 PM

Congratulations for your library.

I think you are probably not familiar with a C library called wimlib originally published by Carl Thijssen at UDA December 31st 2010 which is also used for handling WIM files...
http://www.ultimated...org/wimlib.html

Now continued by a guy called "Synchronicity" at
http://sourceforge.n...rojects/wimlib/

I think you should call your library after a different name in order to avoid developer confusion, future licensing issues,
and also to respect other's people intellectual property.


a good idea. as the wimlib patpat is referring to is written for *NIX and not compatible with windows it would also avoid user confusion when searching and trying to get support.

#12 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10452 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 21 May 2012 - 04:17 PM

Let's change the name then. Suggestions for a new name? :)

#13 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12688 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 21 May 2012 - 04:19 PM

DirectWIM / WIMDirect ?
RawWIM / WIMRaw ?
WIMFactory ?

Peter

#14 homes32

homes32

    Gold Member

  • .script developer
  • 1021 posts
  • Location:Minnesota
  •  
    United States

Posted 21 May 2012 - 04:42 PM

...
WimMgr
jWIM
WIMBuilder ;)
  • pscEx likes this

#15 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12688 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 21 May 2012 - 04:45 PM

WIMBuilder ;)

:clap:

Peter

#16 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10452 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 21 May 2012 - 05:20 PM

WIMBuilder

:rofl:

I like jWIM, seems simple and intuitive. Will take care of the rename within some days.
:)

#17 patpat

patpat

    Member

  • Banned
  • 48 posts
  •  
    United States

Posted 21 May 2012 - 08:19 PM

your library does not handle files properly.

While the lack of compression when adding a small number of files is not a big deal
not handling the files resource correctly could lead to several inconsistencies.

i.e. if you create a WIM with just an unique file copied on tree different directories
your library creates the metadata resource table correctly but
the hash table (lookup table) is broken having 3 entries with the same hash
and the stack of files resources gets incorrectly populated 3 times with the same file body.
(this is very easy to see with a hex editor seeing the file body is present 3 consecutive times)

Within WIMs identical multi-instance files must have a single hash entry with an increasing reference counter
and the file resource stack must always have just a single instance of the body of the multi-instance file.

I think your library needs some more developing time
  • Nuno Brito and pscEx like this

#18 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12688 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 21 May 2012 - 08:28 PM

i.e. if you create a WIM with just an unique file copied on tree different directories
your library creates the metadata resource table correctly but
the hash table (lookup table) is broken having 3 entries with the same hash
and the stack of files resources gets incorrectly populated 3 times with the same file body.
(this is very easy to see with a hex editor seeing the file body is present 3 consecutive times)

Thanks patpat, for your explanations!

I think that is the reason that WimLib WIMs ase remarkably bigger (400+ MB <> 500+ MB) than (uncompessed) ImageX or WimCaptEx WIMs.
I already was wondering about that.

Peter

#19 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 21 May 2012 - 10:42 PM

Wouldn't it be more logical to start from the 7zip library for extracting wims, than to start completely from scratch?

:cheers:

#20 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 22 May 2012 - 08:42 AM

@Nuno

Just out of curiosity, is it an extension of the original RawWIM project or did you start writing it from scratch?

#21 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 22 May 2012 - 08:59 AM

Wouldn't it be more logical to start from the 7zip library for extracting wims, than to start completely from scratch?

:cheers:

In that case Nuno needs to release the code under the LGPL.

#22 paraglider

paraglider

    Gold Member

  • .script developer
  • 1716 posts
  • Location:NC,USA
  •  
    United States

Posted 22 May 2012 - 12:03 PM

Don't think there is any need to support extraction - 7zip does the job perfectly well and does not have the license problems of MS products - unless you intend to add support for hard links which 7zip currently does not support.

Think the next step should be to add support for maximum compression. Could be at some stage that support for creating hard links in the wim file may be useful.

#23 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10452 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 22 May 2012 - 12:05 PM

@patpat
My thanks for the detailed comparison, this is helpful feedback.


Wouldn't it be more logical to start from the 7zip library for extracting wims, than to start completely from scratch?

Yes, it is logic and I tried this option before starting the new project, talking personally with Igor Pavlov about the matter. At the time I offered to directly sponsor the development of WIM support on 7zip but he had other priorities in need to attend.


Just out of curiosity, is it an extension of the original RawWIM project or did you start writing it from scratch?

This project was written from scratch by a freelance developer hired specifically for the task.

#24 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 22 May 2012 - 01:02 PM

but he had other priorities in need to attend.

Too bad. :(

:cheers:
  • Nuno Brito likes this

#25 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13748 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 22 May 2012 - 02:06 PM

@patpat
My thanks for the detailed comparison, this is helpful feedback.



Yes, it is logic and I tried this option before starting the new project, talking personally with Igor Pavlov about the matter. At the time I offered to directly sponsor the development of WIM support on 7zip but he had other priorities in need to attend.



This project was written from scratch by a freelance developer hired specifically for the task.


I don't get it.I see a few logical fallacies. :(
Why the "freelancer" could not use the available 7-zip source as base?
What was the reason to start (yet-again) from scratch?
Why was java chosen as "engine"?
BTW no actual *need* to answer these questions, should these answers involve - even marginally - decisions/infos/whatever you don't like to make public.
:cheers:
Wonko





Also tagged with one or more of these keywords: waik, raw, create, extract, wim

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users