Hi! I recently noticed W11 mod with installed size below 4GB And I want to ask if anybody have idea what "tricks" he (creator of mod) used to achieve that? My best was ~8GB of disk drive, and I want to go lower because I have mini-pc with 16gb soldered storage All I know, he used some form of compression but compact.exe says otherwise Here are the screenshots to help you: imgur(dot)com/a/m5OkT7z Thanks for any help.
"And I want to ask if anybody have idea what "tricks" he (creator of mod) used to achieve that?" You need to ask how did the updates go after that achievement.
Updates in my case are not as much important. But that <4gb installed size is more interesting to me. Although size is ~7gb but allocates half of it making it ~3,5 gig on hdd/ssd
Compare file lists with BCompare. The lowest I have achieve is 2.70 GB. Then I decided to keep a few more things, some UWP apps, integrate .Net 3.5 and final size was 3.40 GB But I did not use any kinda compression, I don't like compression. If you can PM me the link to the build, I'll check it out how they did it.
LZX compression is manual, future files are not compressed. I got the ratio 2 to 1. Code: compact /c /i /q /f /exe:lzx /s:C:\Windows
I don't suggest to do that. Unlike the old NTFS compression, the new compression doesn't stick after a file is modified/added, so it grows unnecessarily during the daily usage. Way better. First compress with the good old NTFS compression (the blue files), which has relatively poor compress ratio (1.3-1.6 on average) but inherits the compressed status, and has almost no impact on a modern CPU usage. Then capture the image of the OS using wimlib, then format and restore the image using wimlib with the compact=lzx flag. This way everything will be LZX compressed, but added/modified files will retain the NTFS compressed flag so your install grows way less during the normal usage and monthly updates.
Apply the image with the /compact option: DISM /Apply-Image /ImageFile:install.wim /Index:1 /ApplyDir:Z:\ /compact Disabled=8.8GB used space Enabled=5.6GB used space Works well and will be adding as a menu-option (+compact VHDX) in the next update.
Obviously this works as well, but wimlib works also on linux, macos and other unixes. and it's also faster with better compression, and more options. wimlib-imagex.exe apply X:\whatever.wim 1 Z:\ --compact=LZX would be the equivalent command