Jump to content











Photo

Windows Image File Boot (WIMBoot)

wimboot

  • Please log in to reply
158 replies to this topic

#26 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1902 posts
  • Location:Nantes - France
  •  
    France

Posted 25 April 2014 - 03:36 PM

@erwan.l
Can you please check (and possibly amend) the instructions linked to in this post here - the wimlib method commands appear incorrect. I don't use the .cmd files included in the download, however I did copy and paste the commands into my own batch file. I believe item 3 (Capture the installation) should read -


 

wimcapture.cmd c:\ e:\install.wim --wimboot
Note the --wimboot, not wimboot.

The same correction needs to be made to item 5 (Apply our wim file) - also I believe that an image number needs to be specified in this command.

It may also be worth stating in your instructions (for both the DISM and Wimlib methods) that the bcdboot command (bcdboot #:\windows /s #:\ - where # is the volume containing the applied wimboot files) needs to be applied. I doubt that both you and I would both have the same problem with BCD store not having been captured properly.

The following screenshot was taken in WinPE 5.0 -
attachicon.gifbootmgr50.jpg

This one was taken in WinPE 5.1 -
attachicon.gifbootmgr51.jpg

This is the same file - note the zero byte size (on disk) in WinPE 5.0. Also, when attempting to chainload this file in Grub4dos, I received the following error -
Error 13: Invalid or unsupported executable format
It is clearly not there - just linked to. I suspect the bcdboot command physically copies the required files to the volume - I'll check this out shortly.

Thanks again for taking the time out to document your experiments.

Regards,

Misty

 

 

 

Thanks for this feedback on the correction on my artice (a few readers only actually care to give feedback/correction!) :

 

About the "--wimboot" character mess, indeed ! wordpress doing nasty tricks on me ... FIXED

 

 

 

 

The same correction needs to be made to item 5 (Apply our wim file) - also I believe that an image number needs to be specified in this command.

 

Well no I thought so but actually if you have only one image in your wim, wimlib will be smart enough to pick that one.

 

 

 

bcdboot #:\windows /s #:\

 

Correct ! FIXED !



#27 misty

misty

    Silver Member

  • Developer
  • 702 posts
  •  
    United Kingdom

Posted 25 April 2014 - 03:52 PM

@erwan.l
The first time I tried using the command you originally listed, I was prompted to specify an image number. That might however, have been due to the use of –wimboot in my batch file - this was being parsed as ûwimboot and was causing an error and would not allow the command to execute. I haven't tried not specifing an image number with the correct --wimboot flag.

Regards,

Misty

P.s. I suspected that the instructions had somehow been corrupted. Thanks again - despite the nasty tricks played by wordpress your instructions still saved me considerable time. In fact, without this thread I'd not even have been aware of the wimboot feature.

#28 cdob

cdob

    Gold Member

  • Expert
  • 1314 posts

Posted 25 April 2014 - 04:15 PM

Wimboot with one partition only, booted from a Win 8.1 UP1 DVD.

diskpart
DISKPART> sel disk N
DISKPART> clean
DISKPART> create par primary
DISKPART> format fs=ntfs quick
DISKPART> active
DISKPART> assign letter=C
.
md C:\Scratch
md C:\windows\wimboot\
Dism /Export-Image /WIMBoot /SourceImageFile:E:\sources\Install.wim /SourceIndex:1 /DestinationImageFile:C:\windows\wimboot\wimboot.wim /scratchdir:C:\Scratch
Dism /Apply-Image /ImageFile:C:\windows\wimboot\wimboot.wim /ApplyDir:C:\ /Index:1 /WIMBoot
rd C:\Scratch

bcdboot c:\windows /s c:


#29 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1902 posts
  • Location:Nantes - France
  •  
    France

Posted 25 April 2014 - 04:22 PM

Wimboot with one partition only, booted from a Win 8.1 UP1 DVD.

diskpart

DISKPART> sel disk N
DISKPART> clean
DISKPART> create par primary
DISKPART> format fs=ntfs quick
DISKPART> active
DISKPART> assign letter=C
.
md C:\Scratch
md C:\windows\wimboot\
Dism /Export-Image /WIMBoot /SourceImageFile:E:\sources\Install.wim /SourceIndex:1 /DestinationImageFile:C:\windows\wimboot\wimboot.wim /scratchdir:C:\Scratch
Dism /Apply-Image /ImageFile:C:\windows\wimboot\wimboot.wim /ApplyDir:C:\ /Index:1 /WIMBoot
rd C:\Scratch

bcdboot c:\windows /s c:

 

Actually you are right, I think my current setup with one partition dedicated for WIM files is a waste of time and space :)

 

Thus I would have gone for a folder outside of c:\Windows by (probably stupid) fear of smashing it when applying.

 

Thanks for sharing !

 

Next I'll be adding a second wim file (a WinPE) so that from the bootmgr menu, I can choose to launch my WinPE to apply/capture whenever I feel like to.



#30 cdob

cdob

    Gold Member

  • Expert
  • 1314 posts

Posted 25 April 2014 - 04:56 PM

Actually you are right, I think my current setup with one partition dedicated for WIM files is a waste of time and space :)

Well, one partition is a option. Testing the limits.
We are free to use one, two or several partitions.
Different conditions gives different approaches.

http://technet.micro...y/dn594399.aspx
A own restore partition is nice: Better to hide that from a end user.
Install.wim isn't required for this approach.

At a USB boot media, one partition may be nice. At another case two partitions.
Can be inside a VHD file too.

#31 cdob

cdob

    Gold Member

  • Expert
  • 1314 posts

Posted 27 April 2014 - 06:21 PM

USB UEFI - VHD Wimboot

Wimboot file layout

W:\Win8\wimboot.wim Wimboot file
w:\win8\wimbase.vhd base vhd file, parent to wimboot.vhd
w:\win8\wimboot.vhd difference vhd file


http://bbs.pcbeta.co...502685-1-1.html

1. partiton the USB SSD disk
DISKPART> list disk
DISKPART> sel disk N
DISKPART> clean
DISKPART> convert gpt
DISKPART> create partition efi size=100
DISKPART> format quick fs=fat32 label=EFI
DISKPART> assign letter=S

DISKPART> create partition primary size=8192
DISKPART> format quick fs=ntfs label=WimVHD
DISKPART> assign letter=W
.
2. create Wimboot.wim file
md W:\Scratch
md W:\Win8
Dism /Export-Image /WIMBoot /SourceImageFile:F:\sources\Install.wim /SourceIndex:2 /DestinationImageFile:W:\Win8\wimboot.wim /scratchdir:W:\Scratch
rd W:\Scratch
.
3. create the base VHD file
DISKPART> create vdisk file=w:\win8\wimbase.vhd type=expandable maximum=4400
DISKPART> attach vdisk
DISKPART> clean
DISKPART> convert gpt
DISKPART> create partition primary
DISKPART> assign letter=B
DISKPART> format fs=ntfs quick label="WimBase"
.
4. apply the wimboot file
Dism /Apply-Image /ImageFile:W:\Win8\wimboot.wim /ApplyDir:B:\ /Index:1 /WIMBoot
.
5. Adjust offline registry b:\windows\system32\system
[HKEY_LOCAL_MACHINE\wimboot\ControlSet001\Services\FsDepends\Parameters]
"VirtualDiskExpandOnMount"=dword:00000004
.
6. Create the difference VHD file
DISKPART> detach vdisk
DISKPART> create vdisk parent=w:\win8\wimbase.vhd file=w:\win8\wimboot.vhd
DISKPART> select vdisk file=w:\win8\wimboot.vhd
DISKPART> attach vdisk
.
7. create boot environment
bcdboot B:\windows /s S: /f UEFI
DISKPART> detach vdisk
  • ReTokener and misty like this

#32 misty

misty

    Silver Member

  • Developer
  • 702 posts
  •  
    United Kingdom

Posted 27 April 2014 - 07:53 PM

So WinPE 5.1 contains the WOF driver.

And it was possible to extract previous versions of WinPE to a hard disk and run it from there - not in RAM (see here).

So what about a wimboot WinPE 5.1? Here's what I did -

1] Formatted volume D:\ (this is going to be my WinPE drive)
2] Applied the contents of boot.wim (this was from a Windows 8.1 Update 1 .ISO file - modified in MistyPE to add bblean shell, etc)
wimlib-imagex apply E:\boot.wim D:\
3] Copied bootmgr to D:\
4] Created a BCD Store (D:\Boot\BCD) using the following batch file (Diddy's BCDEdit Notes (here) were useful - I adapted some of the examples) -
@echo off
setlocal

:: Do not use spaces in paths and do 
:: NOT wrap in quotes

set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE=D:\Boot\BCD

ECHO Creating new BCD Store...
ECHO.
%BCDEDIT% /createstore %BCDSTORE% 

ECHO Creating {bootmgr} entry...
ECHO.
%BCDEDIT% /store %BCDSTORE% /create {bootmgr}
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} description "Boot Manager"
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} device boot
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} timeout 20

ECHO Creating WinPE entry...
ECHO.
for /f "Tokens=3" %%A in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID=%%A

%BCDEDIT% /store %BCDSTORE% /set %GUID% path \Windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice partition=D:
%BCDEDIT% /store %BCDSTORE% /set %GUID% device partition=D:
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "WinPE 5.1"
%BCDEDIT% /store %BCDSTORE% /displayorder %GUID% /addlast

echo.
echo.
echo.
pause
:_end
endlocal
5] Captured D:\ using wimlib-imagex (with a custom config file (end of post) so that D:\Boot\BCD and D:\bootmgr are copied back to the hard disk and not just pointer files)
wimlib-imagex capture D:\ E:\new.boot.wim "WinPE 5.1 on HDD" --config=E:\wimbootcompress.ini --wimboot
6] Formatted D:\
7] Applied the wim file captured in step 5 back to D:\
wimlib-imagex apply E:\new.boot.wim D:\ --wimboot
8] Booted to WinPE - it worked. Second time lucky - in my first attempt I wasn't using the correct entries in the BCD store.

In terms of used disk space -
  • After being formatted (after step 6, prior to step 7) - used space = 90.6 MB
  • After .wim was applied in step 7 - used space = 128 MB
  • When booted - used space = 1.52 GB (see screenshot below)
  • Checked the drive whilst Offline (using WinPE 3.1 booted in RAM) - used space = 1.52 GB (pagefile = 1.37 GB)
Attached File  winpe.on.hdd.jpg   30.35KB   9 downloads

Steps 1 - 7 were carried out using WinPE 3.1.

Regards,

Misty

Config file E:\wimbootcompress.ini had the following added to the [PrepopulateList] list section -
\bootmgr
\boot\BCD

  • ReTokener likes this

#33 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1902 posts
  • Location:Nantes - France
  •  
    France

Posted 27 April 2014 - 08:12 PM

Beware that with this line:

 

for /f "Tokens=3" %%A in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID=%%A

 

It wont work on localised (mine is french for example) windows since French has always more words/characters than English :)

 

Instead you could/should use:

for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}

 

Based on Diddy's work, I made a post here putting it all in a batch.



#34 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1902 posts
  • Location:Nantes - France
  •  
    France

Posted 27 April 2014 - 08:15 PM

Next test could be : what about having one volume (partition) pointing to multiple wim files

 

-one for the base O.S

-one for programs like Office, etc ?



#35 misty

misty

    Silver Member

  • Developer
  • 702 posts
  •  
    United Kingdom

Posted 27 April 2014 - 08:28 PM

...It wont work on localised (mine is french for example) windows since French has always more words/characters than English :)
 
Instead you could/should use:
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}

Thanks for the tip :thumbsup:
 

Next test could be : what about having one volume (partition) pointing to multiple wim files
 
-one for the base O.S
-one for programs like Office, etc ?

Sounds complicated - good luck ;)

Regards,

Misty

#36 alacran

alacran

    Frequent Member

  • Advanced user
  • 443 posts
  •  
    Mexico

Posted 29 April 2014 - 05:51 AM

Hi

 

Could it be possible to wimboot a Win7.wim image made with wimlib-imagex adding WimBootCompress.ini mod and using Win 8.1u1 bootmanager file and boot folder?

 

I did something like this replacing win7 bootmanager file and boot folder of win7 with the ones of Win8 in an exFAT formated USB flash disk with all the other Win7 files and folders from install CD, and it booted very well up to "select version of Win7 to install" and I stop there, but previously it did not boot  from exFAT using unchanged Win7 you can see it here http://reboot.pro/to...ve/#entry171378

 

Best Regards



#37 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1902 posts
  • Location:Nantes - France
  •  
    France

Posted 29 April 2014 - 06:03 AM

Hi Alacran,

 

I believe it is more than the boot manager.

The OS also requires the WoF driver which manages the reparse points (pointers to file within the WIM file)

 

 

Regards,

Erwan



#38 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1902 posts
  • Location:Nantes - France
  •  
    France

Posted 29 April 2014 - 06:06 AM

About wimboot, follow latest developpement of Wimlib-Imagex here.

 

One can now capture and apply a wimboot wim file without using a Windows 8.1 Update 1 source/winpe.

You still need a Windows 8.1 Update 1 O.S thus to boot from a wimboot applied volume.



#39 misty

misty

    Silver Member

  • Developer
  • 702 posts
  •  
    United Kingdom

Posted 29 April 2014 - 07:04 AM

...I believe it is more than the boot manager. The OS also requires the WoF driver which manages the reparse points (pointers to file within the WIM file)...

Now if someone can trace any other file dependencies (in addition to WoF.sys) and registry settings it might be possible to add wimboot support to WinPE 3.*/4.0/5.0. Or even Windows 7/8.

And no, I'm not volunteering :P

Regards,

Misty
  • milindsmart likes this

#40 alacran

alacran

    Frequent Member

  • Advanced user
  • 443 posts
  •  
    Mexico

Posted 29 April 2014 - 02:34 PM

@ misty

 

From the info in post # 32 you were able to wimboot from a WinPE 5.1 x86 (you said what you were downloading in post # 17).

 

I unpacked a boot.wim index 2 from an x64 Win8.1u1 install ISO (Spanish) finding:

 

Windows\System32\drivers\wof.sys   153 KB

Windows\WinSxS\amd64_microsoft-windows-overlayfilter_31bf3856ad364e35_6.3.9600.17031_none_e4a7e770176e5bfa\wof.sys   153 KB

 

and

 

Windows\System32\es-ES\wof.sys.mui   5.50 KB

Windows\WinSxS\amd64_microsoft-windows-o..layfilter.resources_31bf3856ad364e35_6.3.9600.17034_es-es_36194f7a532d6c2d\wof.sys.mui 5.50 KB

 

As the last two are mui files (for the Spanish version), we can just ignore them, so there are only two occurrences of wof.sys in an x64 boot.wim and they seem as the same file in two different locations both having same size (157,528 bytes), date and version.

 

It seems the only driver required to wimboot a boot.wim is wof.sys

 

Unpacking install.wim from the same source found several occurrences of "wof" like wof.sys, wofTask.dll and wofUtil.dll,  so trace any other file dependencies and registry settings in a full OS is not an easy job, but starting from a boot.wim x86 looks less complicate. Is there any volunteer?

 

Here a link to images from a quest in boot.wim x64 and install.wim x64 https://www.mediafir...lkhiu8lgtppkii4

 

Regards



#41 alacran

alacran

    Frequent Member

  • Advanced user
  • 443 posts
  •  
    Mexico

Posted 30 April 2014 - 06:02 AM

I loaded offline the boot.wim registry (from x64 ISO source) finding only a few occurrences of WOF in it:

 

Spoiler

 

Spoiler

 

Spoiler

 

Spoiler

 

I guess it's not very hard for a programmer to port this to a Win7PE and verify if wof.sys can run under that environment.

 

According with this page http://batcmd.com/wi...8/services/wof/ Windows Overlay File System Filter Driver won't start, if the FltMgr service is stopped or disabled.  It seems to be the only dependence.



#42 alacran

alacran

    Frequent Member

  • Advanced user
  • 443 posts
  •  
    Mexico

Posted 30 April 2014 - 11:57 AM

WinNTSetup now supports Wimboot files http://www.msfn.org/...34#entry1076310



#43 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1902 posts
  • Location:Nantes - France
  •  
    France

Posted 30 April 2014 - 12:26 PM

Interesting.

 

I am sure the new "format" (xpress compression 4096 bytes chunks + wimboot xml tag) will gets it way in most software in the coming days.

 

Rufus is probably next as I am not sure it can this new compression for now (it uses 7zip internally which I am not sure supports it yet).



#44 misty

misty

    Silver Member

  • Developer
  • 702 posts
  •  
    United Kingdom

Posted 30 April 2014 - 07:10 PM

@alacran
I tried adding wof.sys (in both \Windows\system32\Drivers and the WinXsX WinSxS directories) and the registry settings you listed in your post to WinPE 3.1. It failed to wimboot :frusty:

Oh well, it was worth a try.

Regards,

Misty

P.s. I used bootmgr from Windows 8.1 Update 1 as I'm pretty sure this is also required. And FltMgr was already present and the service was started.



#45 alacran

alacran

    Frequent Member

  • Advanced user
  • 443 posts
  •  
    Mexico

Posted 30 April 2014 - 08:04 PM

@ misty

 

Thank you very much for trying, like you said was worth a try.    I could not live with doubt.

 

It seems wof.sys driver needs to be adapted to run under Win7 environment.

 

Best Regards



#46 alacran

alacran

    Frequent Member

  • Advanced user
  • 443 posts
  •  
    Mexico

Posted 07 May 2014 - 12:25 PM

First installed W8.1u1 x86 to USB HDD first partition (boot and Windows), no pagefile, no hiberfile, updated, and installed some applications, rebooted and Syspreped generalize off option.

Following erwan.l procedure # 3 (wimlib), I was able to wimboot W8.1ui x86 from a USB 2.0 HDD having install.wim on internal second HDD (all HDD's mechanical).

Later I cut install.wim and paste it to USB HDD second partition, formated first USB HDD partition and reapplied (using wimlib) boot files and folders to first partition again but this time from install.wim new location, the system didn't boot ok, no BSOD or system freezing just a screen with thin lines same colors as wallpaper screen and a blinking cursor.

So in order to wimboot the source install.wim file has to be in a internal HDD, but the boot installation can be in an internal or external device.



#47 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1902 posts
  • Location:Nantes - France
  •  
    France

Posted 07 May 2014 - 12:52 PM

Thanks for this report !

First one including an external USB HDD installation!

 

About methods you mentionned, here below a recap for future readers :

#1 Standard MS DISM way here (requires win8.1u1 winpe).

#2 CloneDisk wimgapi way here (requires win8.1u1 winpe).

#3 WimLib way here (does NOT require win8.1u1 winpe).

 

Cheers,

Erwan


  • ReTokener likes this

#48 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 19 August 2014 - 04:34 PM

If anyone needs an automated tool to update a WinRE 5.0 to a 5.1 (or at least add the WOF driver and related settings), see here:

http://reboot.pro/to...ssues/?p=186535

 

:duff:

Wonko



#49 milindsmart

milindsmart

    Frequent Member

  • Advanced user
  • 198 posts
  • Location:Bangalore
  •  
    India

Posted 28 August 2014 - 12:12 PM

What are the chances that this can be made to work with other versions of Windows too? :)

In stages :

  1. Can Windows 8.1 (u0) be booted this way?
  2. Can Windows 8 be booted this way?
  3. Can Windows 7 sp1 be booted this way?

What are the changes in W8.1u1 apart from the addition of wof.sys driver that allows it to boot from WIM?



#50 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 334 posts
  •  
    India

Posted 30 August 2014 - 03:23 AM

Hello Everyone...

 

Most of us are always worrying about the Low Disk Space problem within Windows Installation Drive (C drive) of our PC/Tablet/Laptop. All of us who can't afford greater storage within C: drive install only limited and lightweight third party software. Sometimes we stuck in big trouble whenever free space reached to 50-150 MB. And we don't want to re-format C: drive at that time. Don't worry guys.....

 

Microsoft introduces 'WIMBoot' features in 'Win 8.1 U1' in order to keep size of C: drive smaller. But it  require fresh Windows Installation within from PE Environment. So in real sense WIMBoot doesn't help for those guys who have left only 50-150 MB free space in their C: drives. Don't worry guys once again.....

 

Actually I was also facing low free space problem till now. But now low free space is not a big problem. All thanks to Simon King for creating magical tool ZIPmagic 12.2 (DoubleSpace, DriveSpace, Stacker). Simon King have built truly one-click software which converts any pre-existing Windows 8.1 Update 1 system to WIMBoot. This tool is called DoubleSpace and is available from http://www.zipmagic.co/doublespace.html ZIPmagic DoubleSpace uses WIMBoot technology to safely double storage on your boot disk. 

 

You will not need external storage, a Windows PE environment, manually created images - or anything of the sort - to use DoubleSpace. DoubleSpace runs in one-click, and all you need to choose is compression strength - 4 are available, between MaxSpeed - MaxSpace.
 
You can even re-compress a disk that has been previously compressed.
 
I trust you will enjoy using the tool as much as I enjoyed it. Try it..........It works just like magic !
 

Regards.......







Also tagged with one or more of these keywords: wimboot

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users