Share
View previous topicGo downView next topic
ismewor

Reduced wim won't post with VHD

on Wed 15 Feb 2017 - 20:55
Hi Winreducer Team,

I'm trying to get my reduced OS in wim format to load on VHD with imageX. after imagex wrote the wim file onto vhd is completed but However, it won't pass the window logo when i select the vhd from boot screen.

Any suggestion would help. I have selected keep sysprep but no help. 


Thanks,
ismewor
dim

Re: Reduced wim won't post with VHD

on Thu 16 Feb 2017 - 10:33
What i use:
[You must be registered and logged in to see this link.][You must be registered and logged in to see this link.] apply C:\Windows_10.wim 1 E:\ --compact=lzx (where E: is the mounted VHD)
BCDBOOT C:\Windows /s E: /f BIOS

Goto E:\Boot folder
drag BCD file on to Enum.cmd
Code:
@echo off
Setlocal

::Set path to bcdedit.exe (e.g. C:\Windows\System32\bcdedit.exe)
Set BCDEDIT=%Windir%\System32\bcdedit.exe

::Set path to BCD Store (e.g. C:\boot\BCD)
Set STORE=%1

%BCDEDIT% /store %STORE% /enum {default} /v
echo.
echo.

endlocal
pause
exit

then drag it again on to Win64.cmd if needed
Code:
@echo off
Setlocal

::Set path to bcdedit.exe (e.g. C:\Windows\System32\bcdedit.exe)
Set BCDEDIT=%Windir%\System32\bcdedit.exe

::Set path to BCD Store (e.g. C:\boot\BCD)
Set STORE=%1

%BCDEDIT% /store %STORE% /set {default} device boot
%BCDEDIT% /store %STORE% /set {default} osdevice boot
%BCDEDIT% /store %STORE% /set {default} path \Windows\system32\winload.exe
%BCDEDIT% /store %STORE% /set {default} systemroot \Windows
%BCDEDIT% /store %STORE% /set {default} detecthal yes
%BCDEDIT% /store %STORE% /set {default} TESTSIGNING ON
%BCDEDIT% /store %STORE% /deletevalue {default} winpe
%BCDEDIT% /store %STORE% /deletevalue {default} ems

echo.
echo.

endlocal
pause
exit

I use BootIce to set the VHD in to the boot menu 
and its good to go.
ismewor

Re: Reduced wim won't post with VHD

on Thu 16 Feb 2017 - 17:59
Thank you . I'll give it a try.
How to set the vhd to boot using bootice? Never try this tools but look promising.
ismewor

Re: Reduced wim won't post with VHD

on Fri 17 Feb 2017 - 1:49
Hi Dim,

I did try your method with imagex not the wimlib version and of course without the compact flat

But it still the same won't go through the little window icon on post.

Does the wimlib-imagex make a different?
ismewor

Re: Reduced wim won't post with VHD

on Fri 17 Feb 2017 - 2:01
Also i forgot to mention, when i do "BCDBOOT C:\Windows /s E: /f BIOS " on command. enum.cmd and win64.cmd doesn't get created.


I copied both file from friend of mine. I'm not sure if this have anything to do with it.


If so, how to create both of the files from within mounted VHD


Thanks,
ismewor
dim

Re: Reduced wim won't post with VHD

on Fri 17 Feb 2017 - 4:39
Windows edition should be enterprise or ultimate and make sure you didn't remove any Hyper-V drivers 
or disable the Hyper-V service. 
 
wimlib wont make any difference, image-x is fine by itself, compression is optional obviously
enum and win64 cmd do not exist, you need to create them, just copy paste each code in to notepad and save the files accordingly. They are absolutely necessary, without dragging the bcd on them it wont boot, 
you can delete them afterwards, but if you copied the files from elsewhere is the same thing i guess.

BootIce > Bcd Edit > Other BDC file 
(depends if you wana mess with your system's boot or just create a boot usb stick and edit that BCD )
browse for a BCD > select it > Easy mode > Add > New VHD boot entry > 
Disk: BOOOT(WIM/LOCATE(VHD)) > File: \my.vhd

check "test mode" and no "integrity checks" if you like also
save current system > reboot from your USB stick if you made one or just reboot if you edited your system's BCD
it should boot fine.

Alternatively you can use the hassle free [You must be registered and logged in to see this link.] that does all the above for you.
ismewor

Re: Reduced wim won't post with VHD

on Fri 17 Feb 2017 - 17:22
My reduced image, i have took out the Hyper-V. is that why it doesn't boot? i will have to create a new image that include the hyper-V is that correct?
dim

Re: Reduced wim won't post with VHD

on Fri 17 Feb 2017 - 19:32
Indeed, without Hyper-V windows can't boot vhd.
ismewor

Re: Reduced wim won't post with VHD

on Sun 19 Feb 2017 - 1:10
When I try to drop the bcd file to enumerate.cmd or win64.cmd it come up error like "bcdedit type incorrect or something similar ". Where can I find or how do I create a bcd file that work with my own vhd.
dim

Re: Reduced wim won't post with VHD

on Sun 19 Feb 2017 - 3:36
In fact, and if you are loading the vhd from an external BCD you don't have to enumerate it.
That is, suppose you add a VHD entry to your current system's BCD in C:\Boot, you don't have to "BCDBOOT C:\Windows /s E:" at all, forget it, and thereby you don't have to drag the BCD to anywhere.
The C:\Boot\BCD will load windows from your vhd just fine.
If it doesn't, the problem is elsewhere.
What error you getting trying to load windows from the vhd ?
Are your windows Enterprise or Ultimate ? else they wont load from a vhd.
ismewor

Re: Reduced wim won't post with VHD

on Sun 19 Feb 2017 - 4:06
I finally got it to load on vhd. I'm now trying to use grub4dos and boot it from ram.
dim

Re: Reduced wim won't post with VHD

on Sun 19 Feb 2017 - 14:12
Using grub4dos to load it in to ram will definitely need it's very own /boot/bcd
in order to boot it,
This is where the /bcdboot /s "drive": comes in to play, and enumeration is needed.
Also you will now need wimlib-imagex to compress it. Win 10 support Lzx compression on the fly, you can achieve very small vhds and save loading times.
I personally managed as small as 1.2G win 10 vhds (without net.framework tho)
ismewor

Re: Reduced wim won't post with VHD

on Sun 19 Feb 2017 - 23:42
Would you mine walk me through it with the process.
Currently I got it to be 1.92GB in wim file on vhd.
dim

Re: Reduced wim won't post with VHD

on Mon 20 Feb 2017 - 3:31
in wim on vhd ? i'm not sure i get that but anyhow what i do is:
WinReducer to remove stuff, end up with a wim
WinNTSetup that wim to a vhd
Boot that vhd to let windows sysprep and finish installing
Configure windows, add any missing drivers, don't forget firadisk or else the vhd wont boot from ram.
Reboot to any other windows installation
Mount that ready vhd to lets say drive E:

Code:
wimcapture.cmd E:\ C:\Win10.wim --compress=none

Detach E:
Create new vhd (size varies depending the installation, fixed is best for now)
Attach the new vhd as E:

Code:
wimlib-imagex.exe apply C:\Win10.wim 1 E:\ --compact=lzx

Code:
BCDBOOT C:\Windows /s E: /f BIOS (grub4dos doesn't support EFI Boot)

Copy Enum.cmd and Win64.cmd inside E:\Boot
open elevated command prompt, switch to E:\Boot
   
Code:
Enum.cmd BCD
   
Code:
Win64.cmd BCD

Optional: wipe free space on E: and defrag it
Detach E:
Place the vhd to the root of any hard disk, not inside any folder.
Add an entry to your grub4dos menu.lst 

Code:
color light-gray/black white/black light-gray/black light-gray/black
timeout 3
default 1

title BOOTMGR (hd0,0)
root (hd0,0)
chainloader /bootmgr

title Windows 10 Boot From Ram
find --set-root --ignore-floppies --ignore-cd /Win10.vhd
map --mem /Win10.vhd (hd0)
map --hook
root (hd0,0)
chainloader /bootmgr
boot

Reboot.
ismewor

Re: Reduced wim won't post with VHD

on Tue 21 Feb 2017 - 17:32
Thanks, I finally got it to run.
Does firadisk afterward should I include it in wim?
dim

Re: Reduced wim won't post with VHD

on Wed 22 Feb 2017 - 2:52
Firadisk must somehow has to be installed in the windows that is to run from a vhd that boots from ram.
They way you do it is up to you.
I do it while configuring windows.
You can let WinReducer install it through driver add option.
You can install it through dism afterwards.
You can boot the final vhd from hard disk and install it normally, like you would whenever want to make any changes to your installation.
No matter what, is got to be there or the vhd wont boot at all from ram.
View previous topicBack to topView next topic
Permissions in this forum:
You cannot reply to topics in this forum