wimlib-imagex - extract windows image

Hello

I formated my /boot partition in a UEFI system with my openSUSE installation (13.1 using KDE (gnome also installed)). Other partitions are fine, like “Restore”, “DATA”, “primary” and “Recovery” -windows partitions. Is there someone out here that know how to extract .wim files in a restore partition to a USB stick, or preferable edit/configure/setup grub in UEFI system to boot into “windows 8” again? Manufacture of laptop are not helpful, only saying I have to by a new windows copy:P Hope you have better information, I know you are more helpful!
I’ve installed wimlib-imagex but can’t figure out how to use it.
Command as (“user” = root) :

linux-qlrc:~ # wimlib-imagex extract /var/run/media/quinness/Restore/RecoveryImage/install.wim /dev/sdb
ERROR: "/dev/sdb" is not a valid image in "/var/run/media/quinness/Restore/RecoveryImage/install.wim"!
       Please specify a 1-based image index or image name.
       You may use `wimlib-imagex info' to list the images contained in a WIM.


Image looking like:

linux-qlrc:~ # wimlib-imagex info /var/run/media/quinness/Restore/RecoveryImage/install.wim 
WIM Information:
----------------
Path:           /var/run/media/quinness/Restore/RecoveryImage/install.wim
GUID:           0xdccf1d944df97641ae1efdf1f667f5db
Image Count:    2
Compression:    XPRESS
Part Number:    1/1
Boot Index:     0
Size:           12119219282 bytes
Integrity Info: no
Relative path junction: yes

Available Images:
-----------------
Index:                  1
Name:                   ASUS_HDI_Image
Description:            
Directory Count:        34570
File Count:             154558
Total Bytes:            22896907531
Hard Link Bytes:        6098633807
Creation Time:          Wed Dec 19 17:23:08 2012 UTC
Last Modification Time: Wed Dec 19 17:27:52 2012 UTC
Architecture:           x86_64
Product Name:           Microsoft® Windows® Operating System
HAL:                    acpiapic
Product Type:           WinNT
Product Suite:          Terminal Server
Languages:              da-DK en-GB fi-FI nb-NO sv-SE 
Default Language:       en-GB
System Root:            WINDOWS
Major Version:          6
Minor Version:          2
Build:                  9200
Service Pack Build:     16384
Service Pack Level:     0

Index:                  2
Name:                   ASUS
Description:            
Directory Count:        35276
File Count:             162213
Total Bytes:            29088155314
Hard Link Bytes:        6098633807
Creation Time:          Tue Dec 25 19:21:00 2012 UTC
Last Modification Time: Tue Dec 25 19:21:01 2012 UTC
Architecture:           x86_64
Product Name:           Microsoft® Windows® Operating System
Edition ID:             Core
Installation Type:      Client
HAL:                    acpiapic
Product Type:           WinNT
Product Suite:          Terminal Server
Languages:              da-DK en-GB fi-FI nb-NO sv-SE 
Default Language:       en-GB
System Root:            WINDOWS
Major Version:          6
Minor Version:          2
Build:                  9200
Service Pack Build:     16384
Service Pack Level:     0


Hi
Can we check a few things first? Can you post the output from the following commands;


lsblk

gdisk -l /dev/sda

efibootmgr -v

Hopefully the /boot/EFI partition is still present, which contains the efi files. Not sure if you can browse the wim file with an archive manager?

Yes, here is the output of the commands

quinness@linux-qlrc:~> su -
Lösenord: 
**linux-qlrc:~ # lsblk**
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk 
├─sda1   8:1    0   300M  0 part /boot/efi
├─sda2   8:2    0   900M  0 part 
├─sda3   8:3    0   128M  0 part 
├─sda4   8:4    0 186.3G  0 part 
├─sda5   8:5    0  86.1G  0 part 
├─sda6   8:6    0    20G  0 part 
├─sda7   8:7    0     2G  0 part [SWAP]
└─sda8   8:8    0   170G  0 part /
sdb      8:16   1  14.9G  0 disk 
└─sdb1   8:17   1  14.9G  0 part 
sdc      8:32   1  14.9G  0 disk 
└─sdc1   8:33   1   928M  0 part 
sr0     11:0    1    96M  0 rom  
**linux-qlrc:~ # gdisk -l /dev/sda**
GPT fdisk (gdisk) version 0.8.7

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): E805A24A-C0ED-4E17-B852-352C5CD6A9F7
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 22929 sectors (11.2 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          616447   300.0 MiB   EF00  EFI system partition
   2          616448         2459647   900.0 MiB   2700  Basic data partition
   3         2459648         2721791   128.0 MiB   0C01  Microsoft reserved part
   4         2721792       393431039   186.3 GiB   0700  Basic data partition
   5       393431040       574065899   86.1 GiB    0700  Basic data partition
   6       934809600       976773119   20.0 GiB    2700  Basic data partition
   7       574066688       578258943   2.0 GiB     0700  primary
   8       578258944       934789487   170.0 GiB   0700  primary
**linux-qlrc:~ # efibootmgr -v**
BootCurrent: 0002
Timeout: 2 seconds
BootOrder: 0002,0004,0003,0001,0000
Boot0000* opensuse      HD(1,800,96000,6b139546-f3e4-423c-8a5a-5429389899b4)File(\EFI\opensuse\grubx64.efi)
Boot0001* Windows Boot Manager  HD(1,800,96000,6b139546-f3e4-423c-8a5a-5429389899b4)File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...5................
Boot0002* opensuse-secureboot   HD(1,800,96000,6b139546-f3e4-423c-8a5a-5429389899b4)File(\EFI\opensuse\shim.efi)
Boot0003* Linux HD(4,298800,1749c000,a5dc35f6-5a5e-47f9-97d2-207ddf78489e)File(\elilo.efi)
Boot0004* Linux HD(5,17734800,ac444ec,274280a3-3ab5-4020-b524-0740bf2f2eea)File(\elilo.efi)


I can list the wim file at least using command

linux-qlrc:~ # wimlib-imagex dir /var/run/media/quinness/Restore/RecoveryImage/install.wim all

And if useful

linux-qlrc:~ # fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt


#         Start          End    Size  Type            Name
 1         2048       616447    300M  EFI System      EFI system partition
 2       616448      2459647    900M  Windows recover Basic data partition
 3      2459648      2721791    128M  Microsoft reser Microsoft reserved partition
 4      2721792    393431039  186.3G  Microsoft basic Basic data partition
 5    393431040    574065899   86.1G  Microsoft basic Basic data partition
 6    934809600    976773119     20G  Windows recover Basic data partition
 7    574066688    578258943      2G  Microsoft basic primary
 8    578258944    934789487    170G  Microsoft basic primary


Yeah, I have an option with Windows at boot, but that only tell me that anything is wrong. Sorry for not telling you that in previous post. :shame:

On Tue 17 Jun 2014 07:36:03 PM CDT, quinness wrote:

Yeah, I have an option with Windows at boot, but that only tell me that
anything is wrong. Sorry for not telling you that in previous post.
:shame:

Hi
So as a quick test, run the following command and the reboot. Dod you
pop into windows?


efibootmgr -n 0001
shutdown -r now

Is there an option in the ASUS BIOS to browse the efi files and
selectively boot?


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-11-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

When rebooted after

efibootmgr -n 0001
shutdown -r now

I got this message
https://www.dropbox.com/s/94jz8nbg71ikijo/IMAG0482.jpg

In my BIOS it looks like this

https://www.dropbox.com/s/2yz00u0ngkylkqo/IMAG0483.jpg

On Tue 17 Jun 2014 08:26:01 PM CDT, quinness wrote:

When rebooted after

Code:

efibootmgr -n 0001
shutdown -r now

I got this message
https://www.dropbox.com/s/94jz8nbg71ikijo/IMAG0482.jpg

In my BIOS it looks like this

https://www.dropbox.com/s/2yz00u0ngkylkqo/IMAG0483.jpg

Hi
When it’s booting as in at the BIOS part, keep pressing the F8 key,
does this give you the option in the windows boot menu to ‘Repair the
computer’? If so try that.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-11-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

At the windows error screen there is a short flash and the blue screen comes back. In BIOS F8 don’t do anything. In openSUSE boot menu F8 don’t do anything.
I say “in BIOS”, is it correctly, or is it change to UEFI when we communicate?

On Wed 18 Jun 2014 05:26:01 AM CDT, quinness wrote:

At the windows error screen there is a short flash and the blue screen
comes back. In BIOS F8 don’t do anything. In openSUSE boot menu F8 don’t
do anything.
I say “in BIOS”, is it correctly, or is it change to UEFI when we
communicate?

Hi
It’s the bit between BIOS and boot. Press the F8 key to get that
windows boot menu screen. Since you can select the boot via BIOS, use
that to booting into the windows boot manager.

Else, I think your going to have to contact the ASUS folks and get a
restore dvd from them…


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-11-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Thank you for putting time into this. I was in contact with the ASUS support in sweden, but they put less time in this than you, and only said that I have to buy a new copy of Windos… rotfl! Nahhh, don’t think so.
Again, thank you.

On Fri 20 Jun 2014 04:06:01 AM CDT, quinness wrote:

Thank you for putting time into this. I was in contact with the ASUS
support in sweden, but they put less time in this than you, and only
said that I have to buy a new copy of Windos… rotfl! Nahhh, don’t
think so.
Again, thank you.

Hi
Well you should be able to open the recover win image?
http://www.poweriso.com/tutorials/open-wim-file.htm

If you look in /boot/EFI is there an asus directory? Maybe provide a
listing of what is present in /boot/EFI.

Else would ASUS provide a recovery dvd? I got one for my HP 2000 it was
less than US$20 delivered in 2 days…


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-11-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!