Jump to content











Photo
- - - - -

Mini Windows made with WinNTSetup

mini-vhd

  • Please log in to reply
163 replies to this topic

#151 alacran

alacran

    Platinum Member

  • .script developer
  • 2633 posts
  •  
    Mexico

Posted A week ago

JFYI

 

There is also another option in WinNTSetup Mode:  Wimboot:WIMCOPY

 

This is just as Wimboot mode, but in this case the linked WIM file is copied into System Volume Information folder located on the Root of the VHD NTFS partition.

 

This could save a few MBs in used space, compared with a LZX Compact mode installation.

 

In fact It seems to me this approach may create future issues during re-capture and re-apply, if not done as Tusted Installer as System Volume Information is a System folder, and highly protected.

 

Nevertheless I think we could safely use Wimboot:WIMCOPY mode only for final VHDs that will not be re-captured, but it is always good to keep a copy of the original WIM file used to build the VHD.

 

Anyway I will test this approach and comment back.

 

alacran



#152 alacran

alacran

    Platinum Member

  • .script developer
  • 2633 posts
  •  
    Mexico

Posted A week ago

Testing an aproach similar to WinNTSetup Mode:  Wimboot:WIMCOPY

 

PREAMBLE:

 

For this test I builded a new 5 GB MinWin VHD in Compact LZX Mode, since the begining, with my usual programs installed after first boot:

  • 7-Zip x64
  • Classic Shell (Only Start menu was applied).
  • SumatraPDF x64
  • SVBus driver v1.3 (installed manually) but the REG file was pre-installed during first installation.

From MinWin ReadMe.txt file:

 

This folder contians the minwin profiles.

A minwin profile has 3 optional subfolder
    Add
        The content of this folder will added to the root of the applied or captured image

    Reg
        *.reg files will added to the applied or captured image
    Remove
        *.txt files with file pattern that should be excluded from apply or capture operation
        *.reg files will added to the applied or captured image

It also should have a WinSxS.ini
    This contians a whitelist for the \Windows\WinSXS folder
        Wildcards should only match one component, outdated version of this component will be removed

The default profile should show a minmal setup-able and useable installation.
    Don't report program xyz.exe does not work
    Alternative profiles or constructive reports are welcome

 

 

Making use of my Add folder, it allowed me to copy:

 

Port_Apps folder to VHD root, same used in Win_Reduce by wimb, but I also included PowerRun.

 

Utilities folder to VHD root, same used in Win_Reduce.

 

Users\Default\desktop folder with my favorite short cuts to some Portable Programs located on Y drive, same used in Win_Reduce, with some modifications.

 

Users\Default\AppData\Roaming\Microsoft\Windows\SendTo\ folder with my favorite links to some Portable Programs located on Y drive, same used in Win_Reduce, with some modifications.

 

\Windows\System32 folder containig RunScanner files, same used in Win_Reduce.

 

Additionally I created Reg-files folder and during installation in WinNTSetup in Tweks window I selected it, and all REG files were applied during first installation, it contains:

  • EVRootCA.reg  >>> Installs SVBus v1.3 certificate.
  • DisableMitigations.reg  >>>  Disables Meltdown and Spectre mitigations (improves performace in some CPUs).
  • FireFoxPortable_Default_Browser.reg  >>> Makes Y:\FirefoxPortable the default browser.
  • Remote_Regedit.reg  >>> REG file of RunScanner 2 by Paraglider a tool to offline access and edit a Remote Registry..
  • VLC_Fix_Y.reg  >>>  Makes Y:\VLC portable default audio and movie player.

NOTE: Some of this REG files are similar to those used in Win_Reduce, but were moddified to install them this way.

 

NOTE-2: I used for this build my Modded_SySWoW_2022-08-01.7z   2.89KB, for more info see post No. 132

 

Just in case some reader may want to try using my Reg-files folder, I attached it here:

 

Reg-files.7z   Password = alacran

 

After this I captured a WIM image of the NTFS partition using Wimlib-clc by Tokener.

 

 

INSTALLATION:

 

As so far WinNTSetup fails if installing a WIM file captured from a MinWin VHD, I decided to build a very similar approach to test this.

 

Manually made a 1390 MB VHD where:

 

Fist Primary active partition is 40 MB FAT-32

Second primary partition NTFS the rest

 

I created in root of NTFS partition a folder named Wimboot, and copied into it the MinWin WIM file.

By means of Wimlib-clc I installed into NTFS partition it, in Wimboot mode having as source the WIM file into Wimboot folder.

 

The new MinWin-WBCOPY.vhd Rambooted very fine without any issue.

 

To re-capture it I previously created a new WimbootCompress-WBCOPY.ini file and used it during recapture.

 

The new WimbootCompress-WBCOPY.ini is the same as the original WimbootCompress.ini just with the addition in [ExclusionList] of following line:

 

\Wimboot

 

The re-capture was made fine, and as expected, the Wimboot folder was not captured, the resulting WIM file was same size as the original WIM file used.

 

Using this approach we can make smaller size VHDs having about the same free space than if appling in Compact LZX mode.

 

Please see attached photo of NTFS partition, left is just after installed and right is just after Ramboot.

 

It seems to me for a building not using WinNTSetup, it's better and easier to copy the WIM file to Wimboot folder than copy it to System Volume Information folder that is a System folder and very hard to access it, only way is as Trusted Installer.  But we need to keep in mind just having the precaution to edit the WimbootCompress.ini adding the previously mentioned line or use a pre-edited custom WimbootCompress-WBCOPY.ini as I did.

 

Using this approach we have following benefits:

  1. Used space just after installed is smaller than in Compact LZX mode, (37 MB smaller).
  2. All info is contained into a single file, (the VHD), just as in Compact LZX mode.
  3. All the info is fully loaded to Ram, just as in Compact LZX mode.
  4. No issues if the USB 3.0  device in not relly very fast, except longer loading to Ram time.
  5. Smaller file size if the VHD is externally lz4 compressed when compared with a Compact LZX VHD also lz4 compressed, (21 MB smaller).

Well, it seems to me this is the smallest build that can be created without editing the text files into Reduce folder to delete things as PowerShell and the very minimum .Net framework required to run PowerShell, any thing beyond that will be very risky.

 

IMHO it works very fine as it is, and the size is fantastic, and I will not try to further reduce it.   As I said some time ago my goal was a VHD about 1.5 to 1.6 GB and this MinWin build went further than my wishes.

 

alacran

Attached Thumbnails

  • MinWin-WBCOPY.png
  • Comparative.png

Attached Files


  • devdevadev likes this

#153 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1495 posts
  •  
    Italy

Posted A week ago

my dear alacrán,

 

as I know u r a man of good intellect and understanding, would u pls be so kind as to explain to me where to put the winboot:wimcopy instruction on a GUI? if it is on the command prompt, what is the full command? what is the advantage (meager or pointless though it might be) of having the wim file in the system volume information folder? thanx in advance, I m just curious.



#154 alacran

alacran

    Platinum Member

  • .script developer
  • 2633 posts
  •  
    Mexico

Posted A week ago

@ antonino61

 

my dear alacrán,

 

as I know u r a man of good intellect and understanding, would u pls be so kind as to explain to me where to put the winboot:wimcopy instruction on a GUI? if it is on the command prompt, what is the full command? what is the advantage (meager or pointless though it might be) of having the wim file in the system volume information folder? thanx in advance, I m just curious.

 

For now WinNTSetup fails if installing a WIM file captured from a MinWin VHD.

 

From my previous post:

 

INSTALLATION:

 

As so far WinNTSetup fails if installing a WIM file captured from a MinWin VHD, I decided to build a very similar approach to test this.

 

 

Benefits of having the WIM source file embeded into the VHD are:

 

From my previous post:

 

Using this approach we have following benefits:

  1. Used space just after installed is smaller than in Compact LZX mode, (37 MB smaller).
  2. All info is contained into a single file, (the VHD), just as in Compact LZX mode.
  3. All the info is fully loaded to Ram, just as in Compact LZX mode.
  4. No issues if the USB 3.0  device in not relly very fast, except longer loading to Ram time.
  5. Smaller file size if the VHD is externally lz4 compressed when compared with a Compact LZX VHD also lz4 compressed, (21 MB smaller).

 

 

The option to install in Wimboot:WIMCOPY mode is in Mode same plece where all other install mode options are, see attached picture.

 

alacran

Attached Thumbnails

  • WIMCOPY.png

  • antonino61 likes this

#155 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1495 posts
  •  
    Italy

Posted A week ago

I have just made it! Gonna tell u how to in a bit. Wish my wife's laptop had been more powerful. Just get a wimboot imago of ur miniwin with good old vhd wimboot, and then base it in miniwim + wimboot:wimcopy mode (made sure both are activated). It will do it and boot ok. Alas here it is damn slow

Edited by antonino61, A week ago.


#156 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1495 posts
  •  
    Italy

Posted A week ago

i have written the above from a cell phone and only now have I managed to come back here, it is frustratingly slow, my wife's 2-thread cpu is at pains with its 99% activity. make sure u have a powerful cpu to try this. space gain is as u said.



#157 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1495 posts
  •  
    Italy

Posted 6 days ago

One more thing in favor of this config i think i have found is used space does not grow overnight

#158 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1495 posts
  •  
    Italy

Posted 6 days ago

Things seem 2 go a tiny bit better if u ramboot the vhd, for all that might matter

#159 alacran

alacran

    Platinum Member

  • .script developer
  • 2633 posts
  •  
    Mexico

Posted 5 days ago

New version WinNTSetup 5.2.6

 

Dowloads:

 

Mega - MediaFire

 

 

 

WinNTSetup 5.2.6

- fixed Feeds did not got disabled on Windows 10
- added log files wimgapi_error.log and wimlib_error.log
- added VHD-DIFF option
- added commandline option VHD-DIFF -file:{file} -parent:{file}
- added commandline switch for VHD-CREATE -mbresp
- added commandline switch for VHD-CREATE -vhdbootletter:{0|1}
- added commandline switch for NT6 -vhdbootfiles:{0|1}
- new commandline switch -syspart and -tempdrive support VHD(X) files
- workaround: added AMD's Shadercache to wimscript exclusion (buggy SecurityDescriptors)

 

alacran


  • antonino61 likes this

#160 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1495 posts
  •  
    Italy

Posted 5 days ago

Will we get a bit of briefing on each of them command switches?

#161 alacran

alacran

    Platinum Member

  • .script developer
  • 2633 posts
  •  
    Mexico

Posted 5 days ago

JFYI

 

I can confirm WinNTSetup v5.2.6 is now capable to install a WIM file captured from a MinWin VHD.

 

I tested this applying the image using WinNTSetup in Wimboot mode to a 2 partitions  512 MB VHD:

 

Comparative wih same image applied using wimlib to a similar VHD:

 

MinWin-WB-Fix.png  >>>  512 MB Wimboot, made with WinNTSetup VHD, used space in NTFS partition is 315.5 MB, 32% fragmented.

MinWin-WB.png  >>>  512 MB Wimboot, VHD made with wimlib v1.13.5, used space in NTFS partition is 58.4 MB, 0% fragmented.

 

NOTE: Wimboot mode was used in both cases.

 

As you can see the resulting used space into the VHD NTFS partition is 5.4 X the used space compare with the used space if applying the image using Wimlib-clc or directly wimlib-imagex, also the VHD applied using  WinNTSetup is highly fragmented 32%, when the other is 0% fragmented.  Please see attached photos.

 

In order to find the cause of this big difference, using WOF_Compress by wimb, I made Full list of Wof Status of both, and compared theby means of notepad++ and its Compare plugin, I was able to find there are 2034 full size (real) files, that in the VHD made with wimlib are Pointers with 0 bytes files each.

 

I verified the WimbootCompress.ini file into it, and it is there my last modded version, create during testing a similar approach to Wimboot:WIMCOPY mode, commented on this post,  where I only added to the original the following lines:

 

[PrepopulateList]

 

\Windows\System32\pwdrvio.sys
\Windows\System32\pwdspio.sys

 

[ExclusionList]

 

\Wimboot

 

CONCLUSION:

 

As WinNTSetup used wimlib v1.13.5, and the WimbootCompress.ini file is the same in both cases, all this increase in size, caused by 2034 full size (real) files, is caused for an additional process that decompressed this files and making them real files, that is coded into WinNTSetup, and should no apply to at least Windows 10 2004 (20H1) and newer (haven't tested before this), maybe is not a bad idea to verify the WimbootCompress.ini into 2019 versions just to confirm (but I don't have them).

 

Also attached here:

 

Full size files.7z   >>>   Password = alacran

 

WimBootCompress_for_WIMCOPY_.7z   >>>   Password = alacran

 

alacran

Attached Thumbnails

  • MinWin-WB-Fix.png
  • MinWin-WB.png

Attached Files



#162 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1495 posts
  •  
    Italy

Posted 5 days ago

Just tried ur modded wimboot compress - space gain is sensible, but no booting. Then i added the previous prepopulation list and it
got bigger again and did boot. I guess iwill have to do some Turing in wimboorcompress

#163 alacran

alacran

    Platinum Member

  • .script developer
  • 2633 posts
  •  
    Mexico

Posted 4 days ago

@ antonino

 

That modded version of WimbootCompress.ini file is for Win 10, AFAIK you are using Win 11, so you will have to mod your own.

 

alacan


  • antonino61 likes this

#164 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1495 posts
  •  
    Italy

Posted 4 days ago

You will have twigged that i am modding my version on a trial and error basis - by ;ing every item and de-;ing it back if the vhd has not booted or deleting that string if it has.

well, despite my trial-and-error criterion, or rathr, thanx to it, i have managed to identify the wimbootcompress,ini string that wants adding to let win11 boot - \Windows\AppPatch\drvmain.sdb
hope it helps
  • virgus likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users