Jump to content











Photo
- - - - -

VHD_W7_Compact - Make Mini 7 -

win7 vhd usb mini7

  • Please log in to reply
99 replies to this topic

#76 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 10 June 2016 - 09:30 PM

Hi agni,

 

Direct install of Win 7 Professional in VHD is according to Microsoft not allowed.

It might be that integrating Firadisk driver in install.wim can help to solve this problem ....

 

But it is much easier to install first Win 7 Professional on harddisk partition and then Install Firadisk driver

and then use VHD_W7_Compact.exe to make Portable /Mini or Full Copy VHD.

Nice thing is that the native VHD driver of Microsoft is also working in that case and the limitation is gone.



#77 agni

agni

    Frequent Member

  • Tutorial Writer
  • 270 posts
  • Location:Bengaluru (Bangalore)
  •  
    India

Posted 11 June 2016 - 02:13 AM

Thanks Wimb,

 

I assume that after installing Windows 7 Professional to a harddisk partition, I need to boot from it and then install Firadisk in the live running Windows. and then use VHD_W7_Compact.exe from an offline PE or Windows.

 

I was looking for a way of installing Firadisk to an offline (sleeping windows ) either on a harddisk partition or mounted vhd.

I am looking also researching integration of Firadisk into install.wim.

 

I am referring to the below topics and I'll post my findings and results.

http://reboot.pro/to...-disk/?p=123736

http://reboot.pro/to...ot-os-from-vhd/

http://reboot.pro/to...o-install-nt6x/

 

Regarding your last statement 

 

 

Nice thing is that the native VHD driver of Microsoft is also working in that case and the limitation is gone.

 

How does this work in Win7 professional after using VHD_W7_Compact.exe to create a portable VHD? How does your tool remove the limitation ?



#78 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 11 June 2016 - 04:45 AM

How does this work in Win7 professional after using VHD_W7_Compact.exe to create a portable VHD? How does your tool remove the limitation ?

 

The MS VHD driver is not allowed by Setup of Win7 Professional for Install in VHD,

but when Professional is by other means "installed" in VHD, then the native VHD driver is working normally.

 

My tool just makes an entry in BootManager menu for booting the VHD and then the native VHD driver is used and everything works !

 

For direct Install in VHD you might be interested also in the tool Fix_7hdc of cdob.

http://www.911cd.net...showtopic=24245

 

Or have a look at the Tutorial #43 of steve6375

http://www.rmprepusb...ials/firawiniso



#79 agni

agni

    Frequent Member

  • Tutorial Writer
  • 270 posts
  • Location:Bengaluru (Bangalore)
  •  
    India

Posted 12 June 2016 - 07:19 AM

I figured out how to directly install unsupported versions of Windows 7 to a fixed size VHD using Firadisk.

 

I used WinNTSetup to create the VHD and install Windows 7 SP1 Home Premium(64 bit ). I had disable Native Checks by right clicking on the VHD button.

I used the below reg file in the Registry Tweak section of WinNTSetup. I got this after installing Firadisk on a working Windows 7 Ultimate which i installed and booted using native Microsoft VHD Driver.

I am not sure if the entries are hardware specific. I got this idea from this post by Karyonix - http://reboot.pro/to...-disk/?p=123736

I realised that the first set of reg entries are automatically created when firadisk is integrated using dism. So I just had to merge the below entries into the vhd.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\FiraDisk]

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\FiraDisk\0000]
"ConfigFlags"=dword:00000000
"Legacy"=dword:00000000
"DeviceReported"=dword:00000001
"Service"="FiraDisk"
"HardwareID"=hex(7):72,00,6f,00,6f,00,74,00,5c,00,66,00,69,00,72,00,61,00,64,\
  00,69,00,73,00,6b,00,00,00,00,00
"CompatibleIDs"=hex(7):44,00,45,00,54,00,45,00,43,00,54,00,45,00,44,00,49,00,\
  6e,00,74,00,65,00,72,00,6e,00,61,00,6c,00,5c,00,46,00,69,00,72,00,61,00,44,\
  00,69,00,73,00,6b,00,00,00,44,00,45,00,54,00,45,00,43,00,54,00,45,00,44,00,\
  5c,00,46,00,69,00,72,00,61,00,44,00,69,00,73,00,6b,00,00,00,00,00
"ContainerID"="{00000000-0000-0000-FFFF-FFFFFFFFFFFF}"
"Capabilities"=dword:00000000
"ClassGUID"="{4d36e97b-e325-11ce-bfc1-08002be10318}"
"Driver"="{4d36e97b-e325-11ce-bfc1-08002be10318}\\0001"
"Class"="SCSIAdapter"
"Mfg"="@oem15.inf,%mfakaryonix%;Karyonix"
"DeviceDesc"="@oem15.inf,%firadiskdevice%;FiraDisk Virtual Disk Enumerator"
"ParentIdPrefix"="1&2b2f4947&0"

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\FiraDisk\0000\LogConf]

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\FiraDisk\0000\Control]
"ActiveService"="FiraDisk"


Once WinNTSetup was done ( I choose not update bootcode as I will be using Grub4Dos to boot ), the VHD was still mounted as Z:.

 

I used the below command to install Firadisk into the VHD mounted as Z:

dism /Image:Z:\ /Add-Driver /driver:firadisk.inf /ForceUnsigned

Then I used Bootice to load the BCD from the VHD mounted as Z: and checked the Test Mode option. This is required as it is 64 bit and we need to load the unsigned firadisk driver. 

 

The above two steps can be done with WinNTSetup using some command line options,but i haven't tried yet.

 

Then I used the below Grub4Dos Menu.lst to boot from the vhd. This I copied from menu.lst created by vhd-w7-compact when I used it for Windows 7 Ultimate.

title TEST WIN7 HP Firadisk FILEDISK
find --set-root --ignore-floppies /Win7HP.vhd
map --heads=2 --sectors-per-track=18 --mem (md)0x800+4 (99)
map /Win7HP.vhd (hd0)
map --hook
write (99) [FiraDisk]\nStartOptions=disk,vmem=find:/Win7HP.vhd,boot;\n\0
rootnoverify (hd0,0)
chainloader /bootmgr
map --status
pause Press any key . . .

That's it , I was able to boot from this VHD and the installation completed. I am now posting this message from my Windows 7 SP1 Home Premium running from a fixed size VHD using firadisk and grub4dos.

 

I'll now try to use this VHD to make a portable Win 7 using VHD_W7_Compact and run it from RAM.



#80 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 12 June 2016 - 10:28 AM

At first sight I am not convinced of the .reg file (of it being "portable" I mean).

Particularly the oem15.inf reference seems to me "volatile" :unsure:

The .reg in the original post by Karyonix has 7 elements in HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\FiraDisk\0000:

 

 

  1. Capabilities
  2. Class
  3. ClassGUID
  4. CompatibleIDs
  5. ContainerID
  6. HardwareID
  7. Service
           

The one you posted has 14:

 

  1. Capabilities
  2. Class
  3. ClassGUID
  4. CompatibleIDs
  5. ContainerID
  6. HardwareID
  7. Service
  8. ConfigFlags
  9. DeviceDesc
  10. DeviceReported
  11. Driver
  12. Legacy
  13. Mfg
  14. ParentIdPrefix

Maybe some of these are not "really-really" needed.

 

:duff:

Wonko



#81 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 13 June 2016 - 06:42 PM

I figured out how to directly install unsupported versions of Windows 7 to a fixed size VHD using Firadisk.

 

...

 

I realised that the first set of reg entries are automatically created when firadisk is integrated using dism. So I just had to merge the below entries into the vhd.

 

 

Nice to hear about your succes to use Firadisk driver in direct Install of Win7 Professional into VHD created by WinNTSetup.

 

The Enum keys are generated by the Operating System, which enumerates the hardware found.

I think you should not add such Enum keys.

 

May be you can do a test without adding the Enum keys.

 

:cheers:



#82 agni

agni

    Frequent Member

  • Tutorial Writer
  • 270 posts
  • Location:Bengaluru (Bangalore)
  •  
    India

Posted 24 June 2016 - 10:30 AM

@Wonko and @Wimb. Thanks for your inputs. I will try this weekend. My school just started and I have been a little busy.



#83 agni

agni

    Frequent Member

  • Tutorial Writer
  • 270 posts
  • Location:Bengaluru (Bangalore)
  •  
    India

Posted 28 December 2016 - 02:42 PM

I digged a little deeper and I realised that using the Product Policy Viewer by Erwan - http://reboot.pro/to...tpolicy-viewer/

, Unsupported versions of Windows 7 like (professional,homepremium etc) can be booted using native VHD driver. The advantage of this over integrating Firadisk is that the Native VHD driver supports dynamic VHD boot . Firadisk only supports Fixed Size VHDs.

 

  1. Create and Install Windows 7 Professional ( or any other unsupported  Win 7 version ) to dynamic VHD using WinntSetup. 
  2. Reboot from the VHD and the Sysprep and Window 7 Setup will continue.After the setup is complete and when you try to login, you get an error "License error: Booting from a vhd is not supported on this system"
  3. Reboot into your main OS and mount the VHD. Using Erwan's Product Policy Tool to set Kernel-NativeVHDBoot to 1. Also Load the System Registry hive from the VHD and disable sppsvc service.
  4. Reboot into your VHD and you should be able to start using it.


#84 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 28 December 2016 - 03:39 PM

As a side note the whole point about "dynamic VHD's" is that they make no sense whatsoever in actual use, particularly in something like mini Windows 7 like W7 Compact is.

In other VM's terminology, they are called also "sparse" or "growable".

 

The feature is very convenient for experimenting or for initial testing, you can have a "virtual" (say) 50 Gb image occupying only (still say) 2 Gb, but once you have your "final build" that fits inside 2 Gb, it is of no use to have a "potentially larger" image.

Choose, you either:

1) *need* to fill it with (say) 2 Gb of additional bloat

or:

2) you are OK with the 2 Gb size

 

If #2 you are better off with a fixed size 2 Gb Vhd, if #1 you are better off with a 4 Gb size fixed VHD.

 

:duff:

Wonko 



#85 agni

agni

    Frequent Member

  • Tutorial Writer
  • 270 posts
  • Location:Bengaluru (Bangalore)
  •  
    India

Posted 02 January 2017 - 03:56 AM

At first sight I am not convinced of the .reg file (of it being "portable" I mean).

Particularly the oem15.inf reference seems to me "volatile" :unsure:

The .reg in the original post by Karyonix has 7 elements in HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\FiraDisk\0000:

 

 

  1. Capabilities
  2. Class
  3. ClassGUID
  4. CompatibleIDs
  5. ContainerID
  6. HardwareID
  7. Service
           

The one you posted has 14:

 

  1. Capabilities
  2. Class
  3. ClassGUID
  4. CompatibleIDs
  5. ContainerID
  6. HardwareID
  7. Service
  8. ConfigFlags
  9. DeviceDesc
  10. DeviceReported
  11. Driver
  12. Legacy
  13. Mfg
  14. ParentIdPrefix

Maybe some of these are not "really-really" needed.

 

:duff:

Wonko

 

I finally got round to testing this. I used the below reg file and I was able to integrate firadisk and boot from a fixed size vhd

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\FiraDisk]

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\FiraDisk\0000]
"ConfigFlags"=dword:00000000
"Service"="FiraDisk"
"HardwareID"=hex(7):72,00,6f,00,6f,00,74,00,5c,00,66,00,69,00,72,00,61,00,64,\
  00,69,00,73,00,6b,00,00,00,00,00
"CompatibleIDs"=hex(7):44,00,45,00,54,00,45,00,43,00,54,00,45,00,44,00,49,00,\
  6e,00,74,00,65,00,72,00,6e,00,61,00,6c,00,5c,00,46,00,69,00,72,00,61,00,44,\
  00,69,00,73,00,6b,00,00,00,44,00,45,00,54,00,45,00,43,00,54,00,45,00,44,00,\
  5c,00,46,00,69,00,72,00,61,00,44,00,69,00,73,00,6b,00,00,00,00,00
"ContainerID"="{00000000-0000-0000-FFFF-FFFFFFFFFFFF}"
"Capabilities"=dword:00000000
"ClassGUID"="{4d36e97b-e325-11ce-bfc1-08002be10318}"
"Class"="SCSIAdapter"

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\FiraDisk\0000\LogConf]

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\FiraDisk\0000\Control]
"ActiveService"="FiraDisk"




#86 agni

agni

    Frequent Member

  • Tutorial Writer
  • 270 posts
  • Location:Bengaluru (Bangalore)
  •  
    India

Posted 04 January 2017 - 01:23 PM

I have figured out how to boot a 32 bit WIndows 7 into RAMDISK on a computer with 8GB of RAM.

Since the 32 bit Win 7 OS cannot access more than 4GB of RAM,it was not possible to boot a 3900MB (one of the dropdown options in VHD_W7_Compact) VHD file into RAMDISK.

 

I was initially looking at patching the kernel using https://github.com/wj32/PatchPae2, but I have found another alternative.

 

Using erwan.l's tool ProductPolicy Viewer , I was able to modify Kernel-WindowsMaxMemAllowedx86 and Kernel-MaxPhysicalPage to 16384 (from 4096 ) on Win 7 32 bit Home Premium. The max amount of RAM that can be used by Win 7 32bit using PAE is only limited by licensing policy.

 

I then used VHD_W7_Compact to create 3900MB vhd and boot it from RAM. It works very well and the OS is able to access the remaining part of 8GB RAM.

 

The motivation to use 32 bit instead of 64 bit Win7, is that the 32 bit Win7 has a smaller footprint. So in the same VHD size, I can have more apps and boot into RAM.

 

The other advantage of this could be that we no longer need to disable Software Protection service as this would be a RAMDISK and any changes reverted by sppsvc service to the product policy would not be persisted. ( I am yet to test and confirm this, but should work in theory).

 

FYI the regtweaks in VHD_W7_Compact disables the sppsvc service if the POST_W7_FIX is selected.

 

Ramdisk32bit.png

 

ResourceMonitor.png

 

 



#87 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 16 May 2017 - 03:59 AM

@wimb,

 

I've been using Portable Win7 made with VHD_W7C_80 for a long time. I like to boot from memory.

If I create a Portable Win7 now from a fully updated Win7 will it be secure from the WannaCry malware?

 

I have 32- and 64-bit Portable WIn7 (boot from memory) on both my systems, btw. Even though I have a SSD on one of my systems I still prefer to boot from memory. Thanks.



#88 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 11 June 2017 - 05:49 AM

I recently got a new PC with 8GB memory. I prefer to use 32 bit Windows - boot Portable 7 from memory. I realised that having more than 4GB memory did not help when using 32 bit Windows. I had to use a relatively small size VHD ( 1.6 GB ) so that when booting from memory, I had approx 1GB memory free after booting. I really wanted to use a larger VHD ( put some more stuff in C: ) and utilise all 8GB memory. I was finally able to do that :

 

Info : http://www.raymond.c...han-4gb-memory/

 

Download : http://wj32.org/wp/

 

Screenshot : https://sites.google...1-19_181510.jpg

 

Now I just have to create a new Portable 7 in a larger vhd.

 

But : Intel HD Graphics drivers cannot be used. 

 

 

Just a heads up. The latest Intel drivers are compatible with the PAE patch. Using Graphics driver win32_153633.4578.exe. Also the newer USB3 and LAN drivers seem to work OK.

I can get rid of the ATI Radeon I was forced to use.

Thanks to @wimb again. I really like booting Win7 from memory.

Latest PAE patch here btw : https://wj32.org/wp/.../#comment-16788. I extracted the contents and modified the cmd file a bit.

Attached Thumbnails

  • 2017-06-11_111622.jpg


#89 Camiel

Camiel

    Member

  • Members
  • 43 posts

Posted 11 December 2017 - 08:30 AM

Might been posted already but letting you know that with the addition of the wofadk.sys driver along with its registry settings, wimlib lzx compression on VHD_W7C, resulting to a minimal 892mb vhd, led to a successful boot from ram through grub4dos.


Edited by Camiel, 11 December 2017 - 08:31 AM.

  • wimb likes this

#90 agni

agni

    Frequent Member

  • Tutorial Writer
  • 270 posts
  • Location:Bengaluru (Bangalore)
  •  
    India

Posted 11 December 2017 - 11:53 AM

Might been posted already but letting you know that with the addition of the wofadk.sys driver along with its registry settings, wimlib lzx compression on VHD_W7C, resulting to a minimal 892mb vhd, led to a successful boot from ram through grub4dos.

Sounds interesting. Do you mind listing out the detailed steps you followed ?



#91 Camiel

Camiel

    Member

  • Members
  • 43 posts

Posted 11 December 2017 - 02:10 PM

  • Mounted the  VHD_W7C  (assuming letter drive: F)
  • Run the wofadk.cmd  (adds the necessary lines in an offline registry hive and copies the driver file in the \Windows\System32\drivers)
  • wimcapture.cmd F:\ C:\Win7.wim --compress=none
  • Detached F:
  • Created new dynamic VHD around 1G size
  • Attached this new VHD as F:
  • wimlib-imagex.exe apply C:\Win7.wim 1 F:\ --compact=lzx
  • Took ownership and deleted both  \Boot folder and bootmgr file on F:
  • BCDBOOT C:\Windows /s F: 
  • Copied Enum.cmd and WIN64.cmd (only needed if x64 system) to F:\Boot folder
  • Either Drag-n-Drop the BCD file on both of them respectively or type f:\Boot\ENUM.cmd BCD and f:\Boot\WIN64.cmd BCD in a command prompt.
  • Detach F:
  • Added a new grub4dos entry (supports loading dynamic VHDs for some time now)
title Win 7 Lxz
find --set-root --ignore-floppies --ignore-cd /VHD_W7C.vhd
map --mem /VHD_W7C.vhd (hd0)
map --hook
root (hd0,0)
chainloader /bootmgr
boot 

If complains for unsigned drivers use F8 and disable driver signing

 

This is an outline. If there's a need for more details please let me know.

There's many tutorials and people to thanks for this here on Reboot.

 

Edit to add: forgot to mention this under 1g size is without .net framework or big drivers like nvidia

but i doubt it will go more than 1.5g even with them installed.


Edited by Camiel, 11 December 2017 - 02:30 PM.


#92 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 11 December 2017 - 02:33 PM

Before they will get lost in the mist of the interweb, wofadk.cmd:



@echo off
SET TARGET=F:

cls
echo This batch will add registry settings for wofadk.sys
echo and will copy the file to the drive %TARGET%
echo.
pause

cls
echo Loading registry Hive -
echo.
reg.exe load HKLM\_SYSTEM %TARGET%\Windows\system32\config\system
echo.
echo.
echo.

echo Adding WofAdk registry settings - 
echo.
reg.exe add HKLM\_SYSTEM\ControlSet001\services\WofAdk /v Discription /t REG_SZ /d "WofAdk Mini-Filter Driver" /f
reg.exe add HKLM\_SYSTEM\ControlSet001\services\WofAdk /v DisplayName /t REG_SZ /d "WofAdk" /f
reg.exe add HKLM\_SYSTEM\ControlSet001\services\WofAdk /v ErrorControl /t REG_DWORD /d 1 /f
reg.exe add HKLM\_SYSTEM\ControlSet001\services\WofAdk /v Group /t REG_SZ /d "FSFilter Compression" /f
reg.exe add HKLM\_SYSTEM\ControlSet001\services\WofAdk /v Start /t REG_DWORD /d 0 /f
reg.exe add HKLM\_SYSTEM\ControlSet001\services\WofAdk /v SupportedFeatures /t REG_DWORD /d 3 /f
reg.exe add HKLM\_SYSTEM\ControlSet001\services\WofAdk /v Type /t REG_DWORD /d 2 /f
reg.exe add HKLM\_SYSTEM\ControlSet001\services\WofAdk /v DebugFlags /t REG_DWORD /d 0 /f
reg.exe add HKLM\_SYSTEM\ControlSet001\services\WofAdk /v AutoAttach /t REG_DWORD /d 1 /f
reg.exe add HKLM\_SYSTEM\ControlSet001\services\WofAdk /v Tag /t REG_DWORD /d 2 /f
reg.exe add HKLM\_SYSTEM\ControlSet001\services\WofAdk /v DependOnService /t REG_MULTI_SZ /d FltMgr /f
reg.exe add HKLM\_SYSTEM\ControlSet001\services\WofAdk /v ImagePath /t REG_EXPAND_SZ /d \SystemRoot\System32\drivers\wofadk.sys /f
reg.exe add "HKLM\_SYSTEM\ControlSet001\services\WofAdk\Instances" /v DefaultInstance /t REG_SZ /d "WofAdk Instance" /f
reg.exe add "HKLM\_SYSTEM\ControlSet001\services\WofAdk\Instances\WofAdk Instance" /v Altitude /t REG_SZ /d 40730 /f
reg.exe add "HKLM\_SYSTEM\ControlSet001\services\WofAdk\Instances\WofAdk Instance" /v Flags /t REG_DWORD /d 0 /f
echo.
echo.
echo.

echo Unloading registry Hive -
echo.
reg.exe unload HKLM\_SYSTEM
echo.
echo.
echo.

echo Copying wofadk.sys 
echo.
copy %~dp0wofadk.sys %TARGET%\Windows\System32\drivers
echo.
echo.
echo.
pause

enum.cmd:



@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

WIN64.cmd:



@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

Just for the record, there is no need to put an endlocal, nor an exit statement at the end of a batch file, it will end the setlocal and it will exit when done running automatically.

 

Are you sure that it is:

 

BCDBOOT C:\Windows /s F:

:unsure:

I mean, shouldn't the source be F:\Windows?  :unsure:

 

:duff:

Wonko



#93 Camiel

Camiel

    Member

  • Members
  • 43 posts

Posted 11 December 2017 - 03:55 PM

Forgot one more step:

  • WimBootCompress.ini must go in to F:\windows\system32

It can be found in the wofadk.7z i linked in the post or inside the \Tools folder of WinNTSetup

 

Thanks @Wonko for the convenience.

To answer the question, i don't know what I'm doing really, i just connecting the dots of the various tutorials i can find,

so i don't really know if F:\Windows in the bcdboot command will make or not any difference or what endlocal even is.

I didn't write the batch, i found it here on the forum.

I'm also quite sure the intermediate Win7.wim I'm making is pretty much unnecessary.

There must be a wimlib command  that does the compact job without it, but I'm clueless about it.



#94 agni

agni

    Frequent Member

  • Tutorial Writer
  • 270 posts
  • Location:Bengaluru (Bangalore)
  •  
    India

Posted 11 December 2017 - 04:29 PM

Thanks. I will try this out sometime.But before i try it i have some questions.

 

From what I understand wofadk.sys allows booting into RAM from dynamic VHD. Is that right ? We dont need firadisk or winvblock drivers to boot into RAM ?

What other functionality does wofadk.sys provide ?

 

Also, can you please share the links from where you got the batches.

I found this link - http://reboot.pro/to...npe-31-wimboot/



#95 Camiel

Camiel

    Member

  • Members
  • 43 posts

Posted 11 December 2017 - 06:02 PM

Wofadk allows win7 system real time compression just like win10 natively does aka compact-os.

Firadisk is already installed in the VHD_W7C system. Wimb added it by default.

The bcd enumeration batch files are from here: http://reboot.pro/fi...ile/182-winram/

The rest you found them yourself.

 

If anyone be so kind help with driver signing and why this happens even tho the bcd is configured to disable integrity checks.

Why it happens to the various usb*.sys drivers and does it have something to do with the system being patched  for usb booting. 



#96 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 11 December 2017 - 08:01 PM

To answer the question, i don't know what I'm doing really, i just connecting the dots of the various tutorials i can find,

so i don't really know if F:\Windows in the bcdboot command will make or not any difference or what endlocal even is.

 

 

Seemingly you are telling "fix the boot mechanism on drive F: by using the copy of the needed files you can find in C:\Wndows (and set the \boot\BCD, yadda yadda)":

https://docs.microso...ions-techref-di

 

So if the Windows in your C:\Windows is EXACTLY THE SAME as the one in the Win7.wim (mounted as F:\ ) AND the booting mode is the same (BIOS vs. UEFI) everything is fine and dandy, but if it is a "mixed environment" (possibly 32 bit vs 64 bit, different version of running Windows, UEFI vs. BIOS, unless the /f switch is used, etc. ) it is likely to create issues :unsure:

 

As well, most probably one should make sure to use the BCDBOOT inside Win7.wim (mounted as F:\ ). 

 

About endlocal and exit on the other hand I am pretty sure ;) they are unneeded.

 

:duff:

Wonko



#97 agni

agni

    Frequent Member

  • Tutorial Writer
  • 270 posts
  • Location:Bengaluru (Bangalore)
  •  
    India

Posted 21 April 2018 - 04:56 AM

 

  • Mounted the  VHD_W7C  (assuming letter drive: F)
  • Run the wofadk.cmd  (adds the necessary lines in an offline registry hive and copies the driver file in the \Windows\System32\drivers)
  • wimcapture.cmd F:\ C:\Win7.wim --compress=none
  • Detached F:
  • Created new dynamic VHD around 1G size
  • Attached this new VHD as F:
  • wimlib-imagex.exe apply C:\Win7.wim 1 F:\ --compact=lzx
  • Took ownership and deleted both  \Boot folder and bootmgr file on F:
  • BCDBOOT C:\Windows /s F: 
  • Copied Enum.cmd and WIN64.cmd (only needed if x64 system) to F:\Boot folder
  • Either Drag-n-Drop the BCD file on both of them respectively or type f:\Boot\ENUM.cmd BCD and f:\Boot\WIN64.cmd BCD in a command prompt.
  • Detach F:
  • Added a new grub4dos entry (supports loading dynamic VHDs for some time now)
title Win 7 Lxz
find --set-root --ignore-floppies --ignore-cd /VHD_W7C.vhd
map --mem /VHD_W7C.vhd (hd0)
map --hook
root (hd0,0)
chainloader /bootmgr
boot 

If complains for unsigned drivers use F8 and disable driver signing

 

This is an outline. If there's a need for more details please let me know.

There's many tutorials and people to thanks for this here on Reboot.

 

Edit to add: forgot to mention this under 1g size is without .net framework or big drivers like nvidia

but i doubt it will go more than 1.5g even with them installed.

 

I finally got round to testing this and it works very well. Disk Usage reduced from 1.77GB to 1.15GB with compact LZX.

 

After Step 3 i.e, wimcapture, I used WinNTSetup for all the remaining steps.

The Mode option has to be ticked with Compact:LZX. The mounted VHD needs to selected as both the boot and installation drive. This avoids running the apply commands, bcdboot command and creating BCD store as WinNTSetup takes care of this.

 

The only problem being that I had to create a larger dynamic VHD first so that WinNTSetup does not complain about size not enough. Then shrink and resize the large vhd to a smaller size.



#98 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 27 March 2019 - 10:46 PM

I join the club after some years.
@all Thanks for the solutions and ideas.

Considerations:
XP (PosReady 2009) and Windows 7 (PosReady 7) support time is limited.
Firefox dosn't support XP anymore. Firefox 52 creates one processes at task manager.
A current Firefox creates several processes at task manager. Each task occupies seperate RAM.

Idea: boot a Windows 7 SP1 from RAM disk and run FireFox.
Changes are lost on reboot, yes this is good.

VHD W7 compact, grub4dos RAM loaded by svbus driver.
Source: 32 bit Windows 7 SP1 transfered to a 2 GiB VHD image file, about 700 MB space occupied finally.
The system is wofadk compactos compressed.
And early boot files are NTFS compressed (compare bootlog.txt)

Given a 8 GiB RAM machine, grub4dos top loaded the 2 GiB VHD image:
and ProductPolicy x86 PAE RAM set to max 128 GiB.
100 MB RAM goes to the system, 2 GiB to the RAK disk, about 5.9 GB RAM for the running windows.

#99 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 28 March 2019 - 06:05 AM

I join the club after some years.
@all Thanks for the solutions and ideas.
 

 

Good  :)

 

VHD RAMBOOT is hot.

 

Thanks for using VHD_W7_Compact



#100 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 24 April 2019 - 06:57 PM

*** Update VHD_W7C - Version 88 ***

 

- Solution for missing file Boot\bootvhd.dll in case Boot Manager BCD menu was made earlier by MediaCreationTool

 

File Boot\bootvhd.dll is essential to make the VHD entry appear in BIOS Boot Manager menu.

 

Download :  VHD_W7C_88  - Encrypted with password =  bootwimb







Also tagged with one or more of these keywords: win7, vhd, usb, mini7

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users