Jump to content











Photo
- - - - -

Compact mode installs

compact mode

  • Please log in to reply
80 replies to this topic

#26 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 26 July 2020 - 06:46 PM

If you think your WIM file used for your final Compact install may be usefull some time in the future for an stardard install, better keep it safe, or you will have to start from scratch making a new lite WIM.

alacran
  • antonino61 likes this

#27 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 26 July 2020 - 06:57 PM

@ Wonko

 

This is what I got

 

Total Free bytes = 2.891754150390625 GB

 

This info is right as Explorer reported 2.89 GB free.

 

alacran

Attached Files



#28 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 26 July 2020 - 11:37 PM

Maybe there is after all some issues with hidden or filesystem files and what not.

 

Another (easier) way try:

fsutil volume diskfree I:

 

:duff:

Wonko

this is what I got:

Attached Files



#29 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 27 July 2020 - 04:32 AM

Some time ago a friend from MDL forum sended me to  test his final version of this usefull commands, they worked fantastic and they are now included in another tool he was improving.

 

All commands do is add links to the contex menu of PC link located on desktop, and the Explorer contex menu, but those links are very usefull to save several steps in many cases, the link names applied are localized on each system lang, also included commansd to remove the links if required. Usually they need to be run as admin.

 

I want to share with you this commands, see attached 7-zip.

 

NOTE: Good from 7 to 10, But on 10 they need to be run as Trusted Installer, see: http://reboot.pro/to...est-privileges/

 

alacran

Attached Files


Edited by alacran, 16 September 2020 - 05:15 AM.

  • wimb likes this

#30 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 27 July 2020 - 07:28 AM

@ Wonko

 

This is what I got

 

Total Free bytes = 2.891754150390625 GB

 

This info is right as Explorer reported 2.89 GB free.

 

alacran

Good :), so this is the "right" way.

One day, when we have some spare time, I would be curious to know why you convert byte data into fractional GB (which are actually GIB). :unsure:

The output of the command is 3104997376.

The data in the image posted 3104997376 bytes 2.89 GB.

Check.  :thumbsup:

The only (minor, very little) issue is that unlike the GUI, the command does not provide directly the "used bytes" (which can be obtained anyway by subtracting free byte from total bytes).

 

this is what I got:

 

Alacran's report is useful as - if read together with the image in this post:
http://reboot.pro/to...talls/?p=215547

 

confirms that fsutil volume diskfree gets the "right" anount of free bytes, in the sense as "same as volume right click->Properties  in GUI".

 

A comparison with "nothing" does not help much. :dubbio:

 

:duff:

Wonko



#31 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 27 July 2020 - 07:34 AM

Good news wimb just released VHD_WIMBOOT Version 3.0, now also capable to make Compact mode installs at 4K or LZX compression.

 

 

Update VHD_WIMBOOT Version 3.0
 
- Extra Mode Options:  APPLY       WIM File in Normal or WimBoot Mode or Compact Mode with XPRESS4K or LZX Compression
- Extra Mode Options:  CAPTURE WIM File in Normal or WimBoot Mode with XPRESS4K or LZX Compression 
- wimlib 1.13.2   https://wimlib.net/
- in WimBoot Capture file makebt\WimBootCompress.ini is used and copied to WIM folder Windows\System32  (property of wimlib wimboot)
  and in Normal Capture  WimBootCompress-Normal.ini is used as config file but Not copied - https://wimlib.net/m...wimcapture.html
 
Download: VHD_WIMBOOT-30  Or from GitHub VHD_WIMBOOT-30  
 

Manual:  pdf.gif  VHD_WIMBOOT.pdf   785.98KB   2 downloads

 

post-9517-0-45036400-1595821458_thumb.jp

 

From this post: http://reboot.pro/to...-10#entry215557

 

Just tested it recapturing my 6 GB VHD, copmpresed LZX and Reduced using cdb command base_winsxs.cmd, as said on a previous post the used espace on it was 3.1 GB, see: http://reboot.pro/to...ls/#entry215543

 

It was recaptured to a LZX compressed W10x64_MX_1.wim 2.42 GB and latter reapllied in Compact LZX mode to a 3.8 GB W10x64_MX_1.vhd having 2.91 GB of used size before firs boot, this size will vary a little after booting it, but right now it has 912 GB of free espace, see attached photo.

 

alacran

Attached Files


  • wimb likes this

#32 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 27 July 2020 - 07:52 AM

here it yields file and folder counts, not lists.

Before I forget, possibly this (among the various nice Gammadyne tools):
https://www.gammadyne.com/cmdline.htm

https://www.gammadyn...line.htm#sizeof

 

Might be useful to both list and count.

 

And - while I am at it - gpatch:

https://www.gammadyn...line.htm#gpatch

might be useful as a replacement for hexalter (which homepage is MIA).

 

:duff:

Wonko



#33 wimb

wimb

    Platinum Member

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

Posted 27 July 2020 - 07:55 AM

 

It was recaptured to a LZX compressed W10x64_MX_1.wim 2.42 GB and latter reapllied in Compact LZX mode to a 3.8 GB W10x64_MX_1.vhd having 2.91 GB of used size before firs boot, this size will vary a little after booting it, but right now it has 912 GB of free espace, see attached photo.

 

 

Very good figures for your Mini Win10x64  and Apply in Compact LZX Mode

 

For me some work to do according to your instructions

Before first install, first thing is remove all (CR)Apps and other unwanted things from the original WIM file using MSMG Toolkit,  in order to reduce  your WIM file used for installs.

 

but my present Mini 10x64 is already promising

 

M_04_2020-07-26_191217.jpg

  • alacran and antonino61 like this

#34 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 27 July 2020 - 08:27 AM

Your actual figures look very fine to me, I decided to start all this test with 10x64 Edu as many teachers and studends may have the possibility to activate it on the KMS service of the high school or college, then once legaly activating the first install, it is totally portable. An option to legaly activate the Home or Pro versions could be using your MS account, but I haven't tested this option.

 

Of course you have to be very careful when removing packages from the original WIM in order to don't have troubles latter, or you will have to repeat all the procedure. There is not a guide for this because all user needs are different.

 

Also the WIM and final VHD sizes depend a lot of additional installed software.

 

alacran



#35 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 27 July 2020 - 11:08 AM

Wel, it is time to also talk about 7, 8.0, 8.1 and 8.1 Update 1 and their Compact and Wimboot installs capabilities.

 

8.1 Update 1: This was the first version having native Wimboot installs capability by means of the new wof.sys driver. I ran my first Wimboot test on this OS, and by extention it is also capable to Compact Installs, wof.sys driver (new versions) is same driver used by 10 but now also capable to handle Compact Installs.

 

So for Compact installs wofadk.sys is required on all OSs before Win10.

 

NOTE: See this post for additional info: http://reboot.pro/to...e-3#entry216154

 

All other mentioned OSs are not capable to run natively from a Compact and Wimboot install, but this is very easily solved if during first install using WinNTSetup we select Mode: CompactNONE, WinNTSetup will take care to install the wofadk.sys driver on the new install.

 

How this works:

 

When we download WinNTSetup and extract it to a folder and then run it for the first time it request user permision to download some files from MS servers, and wofadk.sys driver is one of them, it is stored on WinNTSetup\Tools\x64\DISM folder and on WinNTSetup\Tools\x86\DISM folder to use it when required.

 

But at the same time (if required by the OS) it also copies the driver (x86 or x94 version as required) to Windows\System32\drivers and  creates a new service on our current OS,  to load the driver every boot, making the OS now capable to make Wimboot and Compact install by means of WinNTSetup.

 

Then this way 7, 8.0 and 8.1 will be capable to run from a Winboot or Compact install, thanks to JFX the author of WinNTSetup.

 

Take a look close to the bottom right corner of the attached photo.

 

Or see this old post to install wofadk.sys, where you can also download the required reg file: http://reboot.pro/to...10/#entry210893

 

If for some reason, we want to install the wofadk.sys driver without installing WinNTSetup, it can be downloaded with GetWaikTools from JFX and to install it, it is just put it into Windows\System32\drivers folder and run the attached reg file and reboot the OS.

 

 

 

 

alacran

Attached Files


Edited by alacran, 16 September 2020 - 05:48 AM.


#36 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 31 July 2020 - 12:54 PM

You can also create Junction Links on Wimboot or Compact Installs, if the need arise:

 

See: http://reboot.pro/to...nks-on-windows/



#37 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 01 August 2020 - 12:29 PM

You can also create Junction Points on Wimboot or Compact Installs, if the need arise:

 

See: http://reboot.pro/to...nks-on-windows/

Please review my comment on that thread, a Junction is NOT a Symbolic Link and a Symbolic Link is NOT a Junction.

They are similar but they are not the same thing.

 

:duff:

Wonko



#38 wimb

wimb

    Platinum Member

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

Posted 15 August 2020 - 06:31 AM

 

A comment about Win10 Compact mode installs, if using Compact 4K (Win10 native mode), all new files added to the drive after the install, will be 4K compacted automatically by the OS.

 

But if using Compact 8K, 16K or LZX all new files added to the drive after the install, will be written at is full size, without any compression (user added files, temp files. etc), then in this case it is good to use CCleaner to reduce garbich, and WOF_Compress from wimb on user documents and user installed programs folders periodically.

 

Quote from http://reboot.pro/to...e-7#entry215505

 

Are you sure ?  

 

The behaviour that new files added will be compacted automatically occurs for NTFS Compression (compact /C option)

According to my observation such automatic compression does NOT occur for WOF Compression with XPRESS4K Algorithm (compact /C /EXE:XPRESS4K option)

In case of WOF Compression in all cases the new added files are UnCompressed having Status WOF = 0

 

 

C:\Windows\system32>compact /?

Displays or alters the compression of files on NTFS partitions.
 
COMPACT [/C | /U] [/S[:dir]] [/A] [/I] [/F] [/Q] [/EXE[:algorithm]]
        [/CompactOs[:option] [/WinDir:dir]] [filename [...]]
 
  /C         Compresses the specified files.  Directories will be marked
             so that files added afterward will be compressed unless /EXE
             is specified.
 
  /EXE       Use compression optimized for executable files which are read
             frequently and not modified.  Supported algorithms are:
             XPRESS4K  (fastest) (default)
             XPRESS8K
             XPRESS16K
             LZX       (most compact)


#39 wimb

wimb

    Platinum Member

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

Posted 15 August 2020 - 11:23 AM

For Compact Install of Full Win10x64 version 2004 in 25 GB VHD the steps taken are:
 
1. Disconnect Internet LAN Ethernet cable as to avoid automatic download of Windows Updates
2. WinNTSetup  - Install in 25 GB Fixed Size VHD Win10x64_2004_C.vhd - using 2004 ISO + Drivers + Unattend Local Account
3. Reboot with VHD for Install of Win10x64 in VHD
4. After Install and on arrival at Win10x64 Desktop then Disable LAN Network adapter and Disable Windows Update for 35 days
5. Connect to WLAN to allow Install of missing Drivers and to allow Activation of Win10x64 - Disconnect WLAN
6. Option - Install 7-zip - VLC player and Office and registry_backup_portable
7. Reboot normal - Swith off Defender - In VHD_WIMBOOT - Select Win10x64_2004_C.vhd
8. VHD_WIMBOOT Capture WimBoot LZX mode to make Win10x64_2004_C_LZX.wim
9. VHD_WIMBOOT Apply     Compact LZX mode of WIM  Win10x64_2004_C_LZX.wim in VHD Win10x64_2004_C.vhd
10. Option - in Trusted Installer cmd window use base_winsxs.cmd to Reduce WinSxS in mounted VHD
11. Reboot with VHD - Full Win10x64 2004 + All Drivers
 
Typical  = plus Office = plus step 6 and without step 10
Minimal = without Office and After WinSxS Reduce = without step 6 and plus step 10
 
More Info: ==

 

WinNTSetup == VHD Capture LZX == VHD Apply LZX == Typical Result == Minimal Result  
 
Attached File  WinNTSetup_2020-08-15_093438.png   38.34KB   0 downloads == Attached File  VHD_Capture_LZX_2020-08-15_105621.png   54.16KB   0 downloads == Attached File  VHD_Apply_LZX_2020-08-15_105925.png   65.97KB   0 downloads == Attached File  Win10x64_2004_C_LZX_2020-08-15_111119.png   68.97KB   0 downloads == Attached File  Win10x64_2004_LZX_2020-08-13_184848.png   69.54KB   0 downloads


#40 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 August 2020 - 01:06 AM

Are you sure ? That's what I understood from this comment from JFX, Please see my post here: https://msfn.org/boa...omment=1162793

This is old JFX post: https://msfn.org/boa...comment=1123163



#41 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 August 2020 - 01:57 AM

There is something wrong on forum software, no Replay Headers, as Code, Quote, Bold, etc.



#42 wimb

wimb

    Platinum Member

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

Posted 16 August 2020 - 06:26 AM

Are you sure ? That's what I understood from this comment from JFX, Please see my post here: https://msfn.org/boa...comment=1162793 This is old JFX post: https://msfn.org/boa...1162793 alacran

 

Then I think you misunderstood. Testing shows that new files in Compact Install are NOT Compressed and have Status WOF=0

 

 

All files from the WIM file are applied using the compact mode you choose.

Expect the files that are need at early boot state.

New files will not be compressed and files open with write access
will be instantly decompressed by the WOF driver. 

Only Windows 10 version of compact.exe has the "/compactos:always" option

it will start compression the OS and properly using maintenance task to compress
new files once in a while.

I consider adding a "Recompress Compact OS" option.

 

from: JFX Comment



#43 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 August 2020 - 10:36 AM

And what about this:

 

 

All files from the WIM file are applied using the compact mode you choose.

Expect the files that are need at early boot state.

New files will not be compressed and files open with write access
will be instantly decompressed by the WOF driver.

Only Windows 10 version of compact.exe has the "/compactos:always" option

it will start compression the OS and properly using maintenance task to compress
new files once in a while.


I consider adding a "Recompress Compact OS" option.

 

alacran



#44 wimb

wimb

    Platinum Member

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

Posted 17 August 2020 - 09:55 AM

The best thing is to test by adding files to your Compact Install

and determine what is actually the WOF Status of the new added files.

 

I think adding files to an XPRESS4K Compact Install is not different as compared to adding files to the other Compact Install modes.

In all cases the new added files are UnCompressed and have Status WOF = 0

 

I cannot find a Microsoft reference for the statement of JFX about the maintenace task that would compress new files once in a while.



#45 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 August 2020 - 10:49 AM

I cannot find a Microsoft reference for the statement of JFX about the maintenace task that would compress new files once in a while.

Even it there is one, it will only work on "selected files".
For our "crazy" experiments, it would be interesting the /EXE:<compression algorithm> option:
https://docs.microso...optimize-images
for non-MS executable and .dll's.

:duff:
Wonko

#46 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 18 August 2020 - 05:43 AM

From: https://docs.microso...optimize-images

 

Enabling Compact OS will compress OS files and some select set of program files, highly optimized for executables and read-only binary files.

 

I ran Compact /compactos:always  in a elevateted command prompt from a running 10x64 (standard install, not compact) on a VHD,  In my test got a compression of 1.8 to 1, I assume they were 4K compacted (standard Compact value on 10), see attached picture.

EDIT: Using new WOF_Compress-38, I was able to verify it was 8K compressed, then 8K seems to be the new stardard for Win10 Compact on this 10 19H1.

 

But all Portables under Documents folder remained uncompressed.  This was not the behaviour I was expecting,  Then I assume I missunderstood how  Compact /compactos:always works, even if it creates a task to compress added files, that task would apply only to the OS Directory, not to the OS Drive.

 

Of course all files into Documents folder could be compressed separately by means of Compact.exe or WOF_Compress even using a higher compression level as 8K, 16K or LZX.

 

But it is better if we add all required on our first created VHD, and after capture, apply it with our prefered compression by means of wimlib-imagex (as we have being recommending to do so far).

 

My misunderstanding started since my old post here: http://reboot.pro/to...10/#entry210865

 

Spoiler

 

I will edit all my previous post where I mentioned that supposedly on 10 using 4K, will automatically compress new files added to the drive, to avoid confusion of future readers.

 

alacran

Attached Files


Edited by alacran, 21 August 2020 - 08:59 PM.

  • wimb likes this

#47 wimb

wimb

    Platinum Member

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

Posted 18 August 2020 - 07:50 AM

Good that everything about Compact Install is clear now  :)

 

I like VHD_WIMBOOT Apply in Compact LZX mode in 25 GB Fixed VHD for booting as FILEDISK

as to have a very much smaller footprint (Used Size is about 25 % as compared to normal install).

 

For booting from RAMDISK I prefer Apply in WIMBOOT mode,

where the very small Used Size of about 500 MB enables to use small Expandable VHD of say Size 3.9 GB



#48 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 18 August 2020 - 08:11 AM

Yes my friend, agree in both cases.

 

Now, I'm going to start experimenting with UWF, wich seems very useful to keep our Compact install almost impoluted after filedisk booting.

 

EDIT: I tested it on 10 Education, following by the letter the instructions and it never worked fine, it does not give more info on the page about what versions can use this feature, but the link itself seems that apply only to Enterprise, see the link is to: docs.microsoft.com/en-us/windows-hardware/customize/enterprise/unified-write-filter.

 

I forgot about it, I think it is easier to Ramboot a MiniVHD having enought RAM, or Ramboot a Wimboot VHD (full on Mini) when you have low RAM, and you get same results on ANY version (unpolluted OS every boot), and valid also from 7 to 10, with less complications and limitations.

 

alacran


Edited by alacran, 09 June 2021 - 08:55 PM.

  • wimb likes this

#49 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 21 August 2020 - 02:00 PM

Suppose I have a VHD with Windows 10 installed. Almost all files are LZX compressed (the WimBootCompress.ini from WinNTSetup was used).

 

Is it OK to :

- run chkdsk on the VHD

- defrag the VHD

from a Windows 7 PE (with wof installed)?

 

Or do I have to use a Windows 10 PE?



#50 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 21 August 2020 - 08:22 PM

I usually boot from my Win10XPE_x64 for everything, and never had a problem when defragmenting a mounted 10 VHD from it, or mounted from a 10 OS, with Defraggler in both cases, but never tried with a 7 WinPE, so you will have to test this yourself if you want to use a 7 WinPE.

 

But it seems to me it is always a good practice to be consistent with the PE and OS versions to avoid potential troubles, and it is always better be on the safe side, at least just in case, remember 10 is a very special and changing beast.

 

alacran


  • gbrao likes this


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users