Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an Asus netbook, and its recovery partition and recovery DVD have several images in .WIM format.

Are there any Linux/Ubuntu tools to handle those images? Im looking for the equivalents of dism, ImageX, etc. But any tool (GUI or CLI) that could mount or extract or view its contents would be nice.

share|improve this question

4 Answers 4

up vote 9 down vote accepted

Gathering @fossfreedom 's and @Rinzwind 's ideas about 7z and Archive Manager, and tweaking with some of my own, I guess ive found a nice solution:

Archive Manager (actually File Roller) supports 7z (as long as p7zip package is installed), and 7z supports WIM (thanks guys!). But here is the catch: File Roller does not know that 7z supports WIM. So the trick consists in "fooling" File Roller to think WIM files are actually 7z. Sure, renaming (or appending) WIM filenames with ".7z" extension works. But it can be more elegant than that.

Ive downloaded and and examined File Roller's source code, and found out that it (thankfully) detects files by mime types, not filenames.

So the complete solution could be:

  • Make sure you have p7zip Download p7zip package installed. You can install it with the following command:

    sudo apt-get install p7zip-full
    
  • For Mime-Type dababase editing, install assoGiate (File Types Editor) Download assoGiate. Its a very easy, intuitve, well-polished tool. A must-have for mime-type editing. Saved me more than once, including now

  • Open it in Menu > System Tools > File Type Editor

  • At it, go to Type > Find (CTRL+F, or search icon), type "7z".

assogiate1

  • Select x-7z-compressed, go to Type > Edit

  • Go to Filenames tab, click on Add button

  • Type *.wim, click Add

assogiate2

  • Close all dialogs, and presto!

  • Nautilus now show the WIM archives as a 7-zip archive. Which, given that is 7-zip that handles them, it is not entirely false. No renaming needed, filenames are intact.

assogiate4

  • Double-click them, and good ol' Archive Manager opens them with no complains. No need of wine or any weird GUI

enter image description here

Note: these changes in the mime-type database are valid for the current user only. For a system-wide change, open File Type Editor as root:

gksudo assogiate &

Last but not least, for command line, all these steps can be skipped, and the following can be used:

7z x INPUTFILE.wim -oOUTPUTFOLDER
share|improve this answer

EDIT: From comments received, Archive Manager should in theory have WIM support. However for me trying to open a WIM gives a "Archive Type is not supported" error message. However, copying the WIM to my desktop and added a .7z extension allows Archive Manager to open the WIM directly. N.B. you need to install the 7Zip from the software center.

P7Zip has the ability to read WIM files. If you search for "7Zip" in software center, it will install the command line tool "7z"

use 7z --help for the options.

An example from my Windows 7 Recovery disc is as follows:

7z e /media/Recovery3/Patch/Modules/Acer-HQ1/SET/WinRE\ LP\ Setup/MOD01SET74EN0N0006.WIM 1.xml

7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30
p7zip Version 9.04 (locale=en_GB.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

Processing archive: /media/Recovery3/Patch/Modules/Acer-HQ1/SET/WinRE LP Setup/MOD01SET74EN0N0006.WIM[enter link description here][1]

Extracting  1.xml

Everything is Ok

Size:       1386
Compressed: 265513728

the .exe from the download site (link above) installs OK under wine (I'm using wine 1.3) - so you can browse the wim using a GUI:

enter image description here

Googling around, a native linux GUI is in short supply - here is one I've found, but I haven't tested this one myself

enter image description here

share|improve this answer
    
The archive manager also supports 7zip. –  nickguletskii May 28 '11 at 11:32
    
@nickguletskii - I initially tried using that on my Windows 7 WIM - it threw an error when I tried to right click and "open with archive manager" –  fossfreedom May 28 '11 at 11:35
    
@nickguletskii: I got same error as @fossfreedom when using Archive Manager to open WIM files. Its says "Archive type not supported." –  MestreLion May 28 '11 at 11:49
    
@MestreLion you need 7zip installed and then you can use archive manager ;) same goes for rar: install unrar and archive manager can unrar. –  Rinzwind May 28 '11 at 14:14
1  
@Rinzwind - curious - I've got 7zip installed but archive manager doesnt work with my windows 7 wim's. Maybe works only with some older wim's. –  fossfreedom May 28 '11 at 14:22

Anyone also must look to:

http://sourceforge.net/projects/wimlib/

From home page:

*wimlib-imagex* may be used to create customized images of Windows PE,
or to back up, install, or restore Windows operating systems.
share|improve this answer
1  
The included wimmount program can also be used to mount .wim files read-only using FUSE. (For read-write, use wimmountrw). –  Lekensteyn Sep 18 at 10:13

I wish a regular mount could do that job , some tracks using fuse

http://code.google.com/p/fuse-zip/issues/detail?id=13

-- http://rzr.online.fr/q/mount

share|improve this answer
    
It can't be mounted in a regular way because WIM files are just archives (a collection of files like ZIP, TAR, RAR), they lack a filesystem. That makes it plataform-indepedent, but also prevents themfrom being directly mounted (as filesystem images like ISO) –  MestreLion Oct 12 '11 at 11:13
    
fuse is just for that ... if it can mount ssh it can mount anything :) –  rzr Oct 13 '11 at 21:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.