Jump to content











Photo
- - - - -

Reducing OS footprint

wimlib-imagex wimlib-clc winsxs_reduce reduce os footprint

  • Please log in to reply
444 replies to this topic

#76 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 08 October 2020 - 04:43 AM

@ wimb

 

Thanks my friend, I really appreciate your hard work, I was waiting for it.

 

In the mean time I was running some tests:

 

Normal install NO compression

(10 2004 + Classic Shell, 7zip, Sumatra PDF & CCleaner installed, + Portables on Documents folder 156 MB, NO drivers installed.

 

Size installed                                                                  7.40 GB

Reduced:

\Windows\WinSxS                                                          6.09 GB     Used to reduce: WinSxS_Reduce_Trusted
\Windows\SysWOW64                                                   5.47 GB     Used to reduce: wimlib-clc

Chopped by brute force:

\Windows\ImmersiveControlPanel
\Windows\Microsoft.NET
\Windows\Speech
\Windows\Speech_OneCore

After chopped:                                                                5.09 GB     Used to remove: wimlib-clc


WIM file sizes

install.wim                                                                      2.91 GB
After After WinSxS_Reduce + Reduced SysWOW64    1.89 GB
After Chopped                                                               1.75 GB

 

 

Error events: None.

 

Issues:

 

Not able to run Event viewer.

 

Fix: Use aida64, NOT free but 30 days trial: https://www.aida64.com/downloads

EDIT: Better free option: FullEventLogView Expanded: 208 KB, Download: 100 KB

 

Not able to change resolution.

 

Fix: Download MultiMonitorTool Free, extract it to a folder (I used %SystemDrive%\MultiMonitorTool) and made a shortcut on desktop to %SystemDrive%\MultiMonitorTool\MultiMonitorTool.exe /Setmax Primary

 

MS Office (32 bits) do not run.

 

Fix on this Post: Install and run Office 2003

 

Alternatives, (to be tested): LibreOffice Portable, Apache OpenOffice Portable

 

alacran

Attached Files


  • wimb likes this

#77 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 08 October 2020 - 05:18 AM

Tested with updated W1064. on hard disk partition.

Worked ok. Boots ok. I'll test with the programs I normally use and update this post.

Thanks. See attached pics.

 

Suggestions :

- option to delete servicing->LCU

- option to delete folders in Software distribution

- option to retain Manifests in WinSxS

 

Edit : - and maybe delete folders in Logs

Edit 2 - the files were uncompressed, btw. :-)

Attached Files


  • wimb likes this

#78 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 08 October 2020 - 05:41 AM

After :

- delete servicing->LCU

- delete software distribution

- delete winre.wim

- delete logs

- delete display driver from driverstore

 

if defender can be removed by msmg, would be even better.

 

Thanks again. Will update after running programs etc.

 

 

Attached Files



#79 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 08 October 2020 - 07:05 AM

wonderful job, but it must be chopped carefully



#80 wimb

wimb

    Platinum Member

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

Posted 08 October 2020 - 07:30 AM

After :

- delete servicing->LCU

- delete software distribution

- delete winre.wim

- delete logs

- delete display driver from driverstore

 

if defender can be removed by msmg, would be even better.

 

Thanks again. Will update after running programs etc.

 

Thanks all for testing.

 

Good idea to remove \Windows\servicing\LCU

 

You can modify in folder File_List the file remove_sub_Windows.txt for removal of subfolders in folder Windows

; Adjust to your needs - Only rules with leading backslash are used - Wildcards like * and ? are Not allowed in Folder Names
;
\Windows\Speech
\Windows\Speech_OneCore
\Windows\servicing\LCU

Everything can be adjusted to your needs.

The idea is that we communicate about what files / folders can be removed successfully to Reduce UsedSize while keeping core functionality.

Then gradually we can find out what is the optimum for the lists given in folder File_List and I will make appropriate changes in folder File_List in the Distribution.

 

In case of remove_files list then we can use wildcards e.g. in remove_files_Windows.txt

; Adjust to your needs - Only rules with leading backslash are used - Wildcards like * and ? are allowed in FileNames but Not in Folder Names

Attached File  File_List_2020-10-08_093327.jpg   111.4KB   0 downloads == Win_Reduce_2020-10-07_154939.jpg



#81 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 08 October 2020 - 08:32 AM

How about syswow64_org?

#82 wimb

wimb

    Platinum Member

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

Posted 08 October 2020 - 08:34 AM

How about syswow64_org?

 

You just Uncheck the checkbox SysWOW64 to keep original SysWOW64

 

Same for Microsoft.NET, if you need it (I never do and prefer to avoid .NET) then Uncheck the checkbox



#83 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 08 October 2020 - 08:40 AM

I mean syswow64_org beside syswow64 in windows after the chopping. What is it for?

#84 wimb

wimb

    Platinum Member

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

Posted 08 October 2020 - 08:54 AM

I mean syswow64_org beside syswow64 in windows after the chopping. What is it for?

 

SysWOW64_org should have been removed by the program after making the reduced SysWOW64 folder .....

In my case it has disappeared. Is there a special circumstance in your case that it is not deleted ?

 

What is the Attribute of your folder SysWOW64_org ?  System Or Hidden Or Read Only ?



#85 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 08 October 2020 - 09:11 AM

JFYI

I just made an interesting discovery: Windows\servicing\Editions\WimBootConfig.ini

Spoiler


As far as Wimboot is deprecated, I think this settings should apply to Compact installs same as WimBootCompress.ini does.

But that's not all, there are the settings on registry to control the zize of all event logs, If that settinsg are applied the maximum size for each category is 10 MB, on Services we have eventlog,

I will set those values on the registry of the Normal install I'm using for tsting now and check if they act as expected and comment back.

 

alacran


  • Tokener likes this

#86 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 08 October 2020 - 09:11 AM

I'll check when I get home

#87 wimb

wimb

    Platinum Member

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

Posted 08 October 2020 - 09:26 AM

About the blue colored text:

I'm thinking having a reduced OS and enough Ram it should be possible to Ramboot directly from the captured WIM file (both ways MBR and UEFI), no SVBus driver + grub4dos required then.

 

AFAIK technically all required is the WIM file has the bootable attribute, and it can be very easily applied during capture with wimlib-imagex ( --boot) or using its GUI wimlib-clc.  For wimlib-clc please see attached picture.

 

From: https://wimlib.net/m...wimcapture.html

 

EDIT: This WIM file should boot as C:, as there isn't anything modified to make it boot as X:

 

And if the we are able to make the WIM image size of 1.5 GB, it could be bootable on all PCs having at least 4 GB of Ram (as I have proved with Wimboot VHDs).

 

alacran

 

Did you try the idea already to make the Captured WIM file bootable ?

 

I thought this option is meant to mark a WIM file as bootable with WinPE boot.wim,

but booting directly with install.wim I think is not possible ....



#88 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 08 October 2020 - 11:51 AM

Did you try the idea already to make the Captured WIM file bootable ?

 

I thought this option is meant to make a bootable WinPE boot.wim, but booting directly with install.wim I think is not possible ....

In fact I did, my 2004-R.wim is loaded to Ram as any other boot.wim, but just after finish there is a message:

 

Cant find winload.exe (maybe not same words but that's the meaning).

 

As we know a boot.wim uses: \Windows\System32\Boot\winload.exe, and a OS uses \Windows\system32\winload.exe 

 

I have tried:

 

boot file: \Windows\System32\Boot\winload.exe and \Windows\system32\winload.exe

sys root: \Windows

 

I have being thinking what can be the cause of this, It is very possible it looks for it in the wrong place.

 

To start, when loaded to Ram, I don't know to what drive letter it was loaded, so next I will try:

 

boot file: \Windows\System32\Boot\winload.exe and \Windows\system32\winload.exe

sys root: X:\Windows and sys root: C:\Windows and see what happends.

 

And all possible combinations, and adding drive letters to boot file too, etc, and see what happend.

 

If there is a way to solve this, I already know next issue is going to be the possible need of a cache. But I will worry for that on the right time.

 

Well, it is 6:50 a. m. here and I haven't sleep, so I'll go to bed now, see you latter.

 

EDIT: I decided to stop making test and concluded that booting a regular windows WIM file (just adding bootable attribute) as PE is not possible. For more info see: http://reboot.pro/to...e-5#entry216627

 

alacran


  • wimb likes this

#89 wimb

wimb

    Platinum Member

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

Posted 08 October 2020 - 11:55 AM

OK, thanks for testing and your reply about using Captured as Bootable WIM file.

 

Have some sleep and Good Luck, see you ...



#90 Atari800XL

Atari800XL

    Frequent Member

  • Advanced user
  • 192 posts
  •  
    Netherlands

Posted 08 October 2020 - 11:55 AM

Not sure if this would help, but when I turn a boot.wim from a Windows 10 preview into a PE, I have to use this:

dism /image:d:\mount /set-targetpath:x:\

 


  • Tokener and antonino61 like this

#91 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 08 October 2020 - 12:59 PM

so, translated in our terms, supposing we want install.wim as c:\, ...



#92 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 08 October 2020 - 01:47 PM

Issues:

 

Not able to run Event viewer.

Maybe, better/smaller than AIDA :unsure: :

https://www.nirsoft....ent_viewer.html

 

:duff:

Wonko



#93 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 08 October 2020 - 02:19 PM

Caveat!! or Cave canem!!! as u like it. deal with each entry one by one in win_reduce, last to first (backwards), and do a registry1staid-or-the-like run in between for greater probability of success. save each successful try by backing up ur vhd.



#94 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 08 October 2020 - 04:15 PM

Well, a big attaboy to all the contributors to the project. Such a historic day! I guess reboot.pro should apply for patenting. we, and even more so u, deserve recognition. I think I have got everything working back again even after erasing syswow64: the culprit was nothing other than nvapi.dll, which I obviously copied back, so my alacran-labeled hotcake baker is working again. I am 90% thru, though. What is left is .net - now, I installed framework libraries at the outset together with directx. Does that mean I now can get rid of them? What apps will not work anymore?

#95 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 08 October 2020 - 04:22 PM

As for straight *.wim booting, would it handle persistence?

#96 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 08 October 2020 - 04:55 PM

Re : Win_Reduce_Trusted (this utility needs a separate thread)

 

Working ok with the programs I normally use.

 

- it might be better to install drivers before using this tool, I did it after.

- install / use any programs that need .NET ( e.g. I use fontsizechanger) before,

- poppeeper needs httpapi.dll in syswow, once copied it worked ok.

- VC++ installer by abbodi1406 also install before. If someone is a member at MDL, please request "only 64-bit" install.

EDIT : looks like VC 2005 & 2008 installer needs .NET. The others install ok.

 

btw, win size with the programs I normally install is 5GB. Removed defender and apps.



#97 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 08 October 2020 - 05:02 PM

Sure, no doubt about that. Me I almost entirely rely on portables.

#98 wimb

wimb

    Platinum Member

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

Posted 08 October 2020 - 05:02 PM

Here it is   :)    Win_Reduce_Trusted as a separate tool

 

Download: Win_Reduce_Trusted from GitHub Or Win_Reduce_Trusted from reboot.pro - Use 7-zip context menu to Unpack here
 

Download and Unpack here and just double click to run Win_Reduce_Trusted.cmd to Reduce in 30 seconds Offline Windows  in  Mounted VHD

 

1. Fresh Install Win10x64 2004 in VHD -  Capture WimBoot mode and Apply WIM Size 4.46 GB in Compact LZX mode  - 

2. Win_Reduce_Trusted.cmd - 1.5 GB reduction in 30 seconds gives VHD UsedSize = 3.55 GB

3. Capture WimBoot mode and Apply WIM Size 2.86 GB in Compact LZX mode in 5 GB VHD - Boot in MBR BIOS mode as FILEDISK - Install SVBus driver

4. Boot in MBR BIOS mode with Grub4dos and select 5 GB VHD for booting from RAMDISK using SVBus driver - Used Size is now 2.94 GB

 
Reduction = 1.5 GB in Win10x64 Compact LZX in VHD
 
Prog User Interface == 10x64 Before 5.04 GB == 10x64 After 3.55 GB == Apply Compact LZX in 5GB VHD  UsedSize = 2.94 GB and booting from RAMDISK using SVBus driver

 

attachicon.gifWin_Reduce_2020-10-07_154939.jpg == attachicon.gifWin_Red_0_2020-10-07_154802.jpg == attachicon.gifWin_Red_1_2020-10-07_155241.jpg == attachicon.gifWin_Red_SVBus_2020-10-08_155247.jpg

 

After Win_Reduce_Trusted it is useful to do again  Capture WimBoot mode and Apply WIM in Compact LZX mode

 

FILEDISK  Compact LZX == RAMDISK Compact LZX - VHD Used Size = 3 GB  with Windows folder = 21300 files and 2150 folders

 

Attached File  Win_Red_C_LZX_2020-10-08_185410.jpg   107.59KB   0 downloads == Win_Red_SVBus_2020-10-08_155247.jpg



#99 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 08 October 2020 - 05:13 PM

It might be better to say "...in  Mounted VHD or disk partition" :-)

 

People may have a doubt.



#100 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 08 October 2020 - 05:27 PM

1by1 doesn't work. Popup says : "Play init error" WaveOutOpen

 

but foobar works ok.

 

EDIT : Iby1 works Ok if I manually choose output device.

 

EDIT 2 : Image with full syswow attached.

 

EDIT 3: I'm 90% sure the error is due to absense of ksuser.dll in syswow.

Attached Files





Also tagged with one or more of these keywords: wimlib-imagex, wimlib-clc, winsxs_reduce, reduce os footprint

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users