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

#51 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 06 October 2020 - 06:37 PM

well, I can hopefully follow ur instructions and give u a list of all my files after my manual registry and file/folder cleaning is done (as I have always done the cleaning so far). In this case, I am slighlty past halfwaythru (40% still to be done, a couple hours). then I will also give u my exclusion list which I am making on a parallel basis procedure by procedure (registry cleaning, file/folder erasing, registryfirstaid run user and machine) the only procedure I know I cannot carry out registrywise is xbox (only file/folder erasure). so u will have plenty of feedback to use and warn me on.

 

oh, before I forget, u specified drive p: mine will be drive i:, will that be ok?



#52 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 06 October 2020 - 08:26 PM

Sure the Reduction can be applied straight on Mounted VHD and VHD is booting OK.  :)

 

After Reduction if desired you can use VHD_WIMBOOT to Capture in WimBoot mode

and Apply as Compact LZX in small Expandable VHD (max 3-5 GB :unsure: ) for booting with Grub4dos in MBR BIOS mode from RAMDISK by using SVBus driver

Unfortunately there is No UEFI mode  RAMDISK booting for VHD, but in that case we must as usual rely on Win10XPE

 

Win_Reduce_Trusted has speed and ease of use comparable to WinSxS_Reduce_Trusted  :magic:

 

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

 

--boot

Mark the new image as the "bootable" image of the WIM. The "bootable" image is the image which the Windows bootloader will use when loading Windows PE from the WIM.

 

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

 

And if 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).

 

EDIT-2: 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

Attached Files


  • antonino61 likes this

#53 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 06 October 2020 - 09:06 PM

ok, I think that even if wimb's wim file can boot directly the alacran way, it is so much the better. 



#54 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 06 October 2020 - 09:32 PM

well, I have just finished my brute force purging. here is my wimbootcompress.ini, which includes a plethoric exclusionlist.

 I now have the related vhd as I:

pls tell me the string that I have to type at the command prompt in order to yield the list wimb has required.

Attached Files



#55 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 06 October 2020 - 10:25 PM

btw, i managed to do it on c:\

here are my files:

 

Attached Files



#56 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 06 October 2020 - 10:33 PM

Just downloaded and saw your [ExclusionList], it is tailored to your own specific preferences/likes, assuming all you cut is in this list. you don't need to make an additional list.

 

Excuse me but I felt compelled to make the following warning for non advanced users:

 

WARNING: In no way the downloads on 2 previous posts can be of general use.

 

alacran


  • antonino61 likes this

#57 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 06 October 2020 - 10:43 PM

right u r. me, I gotta know if it is tailored well or if there are some caveats on ur part. u and wimb, u could see if, albeit personal, the list or part of it could be of use 2u and us all.



#58 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 06 October 2020 - 11:12 PM

I feel curious what is the used size on the first normal installed VHD (before capture), before and after the cut.

 

I would like to evaluate how much space you gain, before even think in start making my own additions to the current [ExclusionList], but strictly tailored to my personal preferences/likes.

 

Of course this will be the final step once we finish cutting/reducing the OS, in a way that can be applicable for general use.

 

alacran



#59 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 06 October 2020 - 11:36 PM

u want the used space? 3.439gig. I will give u the wim size in a bit.



#60 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 06 October 2020 - 11:47 PM

I feel curious what is the used size on the first normal installed VHD (before capture), before and after the cut.

 

alacran

 

 

u want the used space? 3.439gig. I will give u the wim size in a bit.

 

Your answer should contain 2 used sizes as requested:

 

I think what I wrote is clear enough, Used size before cuts and used size after cuts.

 

Of course if you don't have the info, just tell me that, and no problem my friend.

 

alacran



#61 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 07 October 2020 - 12:30 AM

About your [ExclusionList] additions:

 

Just analyzing your first added line, this are my findings:

 

You have 2 lines about perceptionsimulation:

\Windows\WinSxS\Manifests\*perceptionsimulation*
\Windows\System32\DriverStore\FileRepository\perceptionsimulation*\perceptionsimulation*

 

NOTE: And this is what your actual lines are NOT going to copy to the created WIM file:

\Windows\WinSxS\Manifests\amd64_dual_perceptionsimulationheadset.inf_31bf3856ad364e35_10.0.19041.1_none_12ef5e2717e33aa3.manifest >>> 1,290 bytes size on disk= 4,096 bytes
\Windows\WinSxS\Manifests\amd64_dual_perceptionsimulationsixdof.inf_31bf3856ad364e35_10.0.19041.1_none_f4ec94a67cd216ca.manifest >>>  1,764 bytes size on disk= 4,096 bytes
\Windows\WinSxS\Manifests\amd64_perceptionsimulationsixdof.inf.resources_31bf3856ad364e35_10.0.19041.1_en-us_10715a7616bb7659.manifest >>> 303 bytes size on disk= 4,096 bytes

This is a full waste of time and effort to only remove 12,288 bytes of used space = 12 KB

 

But there are many more files/folders related to perceptionsimulation:

 

Spoiler


If you want to cut all of them use following line:

*perceptionsimulation*

 

Easy way to find all related to perceptionsimulation or any other item is:

 

Use SwiftSearch to search for perceptionsimulation or any other item and it will give you all locations, then if you want to cut all, use the suggested line.

 

If you want to cut strictly only certain lines select them, make a right clich and Copy Path(s), paste the info on Notepad and open Edition >>> Replace, and replace the Drive letter (E: in my picture) with nothing and the list will be now without drive letter, with a further analysis you can determine if using wild cards may help reduce the lines or not.

 

I'm afraid this is something you have to do yourself as you will have to take certain decisions nobody else can take for you.

 

alacran

Attached Files



#62 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 07 October 2020 - 12:41 AM

i can give u the difference in wim terms - 400meg gain.



#63 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 07 October 2020 - 01:05 AM

time is recovered by operation speed, I wrote this many a time. but together with ur syswow64 out the gain will be much greater spacewise too.



#64 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 07 October 2020 - 01:23 AM

I added a few more info to my previous post, please read it again.

 

alacran



#65 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 07 October 2020 - 01:23 AM

the lz4 compression of the full vhd features a much more sensible space gain (about 1.5gig gain)



#66 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 07 October 2020 - 06:58 AM

winntsetup does not seem to take exclusionlist into account when "baking" a vhd



#67 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 07 October 2020 - 01:34 PM

well, after some hour's sleep, I can give the conclusion (valid at least here) that I was talking of practically nothing (la nada) to alacran last night, in that I had actually applied the exclusion list to the capturing (wimming) of an already chopped vhd (so nonsense). i resorted back to the latest wimbootcompress.ini. and I will tell u in a bit.



#68 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 07 October 2020 - 01:45 PM

well, not much of a change. a really shrunk (lz4'd) full vhd is the only thing that I got rambooting. the rest works only as filedisk (both wimboot and full vhd). maybe something wrong with wimbootcompress.ini but now I will try the chopping the alacran way, thru wimlib and let u know asap. well, I checked all other wims out and, they're all obviously chopped already. so, what else will I chop. the only thing that is left for me to do is make another reinstall of the same from scratch and then try the new chopping wimbootcompress.ini on a wim to see if it works.



#69 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 07 October 2020 - 05:08 PM

winntsetup does not seem to take exclusionlist into account when "baking" a vhd

 

well, after some hour's sleep, I can give the conclusion (valid at least here) that I was talking of practically nothing (la nada) to alacran last night, in that I had actually applied the exclusion list to the capturing (wimming) of an already chopped vhd (so nonsense). i resorted back to the latest wimbootcompress.ini. and I will tell u in a bit.

 

Yes, the [ExclusionList] section is only used during capture, but it is very obvious it is not going to cut/omit something that already is not there, from first post:

 

 

Then any files/folders added by the user to [ExclusionList] section will not be included on the new WIM file (no matter the consequences), edit it wisely to avoid future troubles after apply the new WIM on a new installation.

In fact it is as a chopping by brute force.

 

well, not much of a change. a really shrunk (lz4'd) full vhd is the only thing that I got rambooting. the rest works only as filedisk (both wimboot and full vhd). maybe something wrong with wimbootcompress.ini but now I will try the chopping the alacran way, thru wimlib and let u know asap. well, I checked all other wims out and, they're all obviously chopped already. so, what else will I chop. the only thing that is left for me to do is make another reinstall of the same from scratch and then try the new chopping wimbootcompress.ini on a wim to see if it works.

 

As I see on the sections I remarked on blue It seems you finally got the idea.

 

Make your first install from scratch, If you want to reduce WinSxS folder, do it before re-capture and then copy back your desired Manifests folder (if required), no more manual cutting required all should be done by your edited WimBootCompress.ini [ExclusionList] as long as it was made right.

 

You may use your eddited WimBootCompress.ini on VHD_WIMBOOT for capture, just go to VHD_WIMBOOT\makebt folder, rename the WimBootCompress.ini located there to WimBootCompress-wimb.ini to keep it, and copy yours, then run VHD_WIMBOOT

 

alacran



#70 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 07 October 2020 - 05:24 PM

wonderfully wise advice. I am at the same point as yesterday now, the only difference being I got the list today, so I only have to see if it works. so far it has worked just as filelist on bootmgr, not on g4d (neither as ramdisk nor as filedisk). probably something to do with svbus after the chopping or something. risks, none as long as i backup in advance. the problem will be to eliminate the couple of double vhds I got left. anything new from the wim_reduce automation department? u know, here the eradication of syswow64 leads to bsod. as far as wimlib is concerned, I did try, but I gave up because I am not sure I would do it right.



#71 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 07 October 2020 - 06:26 PM

To make things clear for future readers: you are talking of Wimboot install on VHD.

 

About SVBus driver, assuming you installed it, and boot from the VHD to verify on Device Management it installed fine, before capture:

 

Are you sure you have following line on WimBootCompress.ini [PrepopulateList]?

 

\Windows\System32\drivers\*.sys  >>> this line will install all drivers as real files not pointers.

 

If not, are you sure you have a line to keep SVBusdriver as real file not pointer during apply?

 

About SysWOW64:

 

If you remove that folder, you need to copy from Win10XPE_x64 ISO or VHD Flat or Compact installed the respective minimal SysWOW64 folder (OS versions shall match).

 

From post No. 16

 

I copied from my mounted Win10XPE_x64_LZX.vhd the SysWOW64 folder and now 32 bits programs are running fine.

 

alacran



#72 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 07 October 2020 - 07:29 PM

the error I get from g4d is error 13.

 

the syswow64 folder i did try it according to the file and folder list, but no dice; aint it better to tell me what to take out?

 

as a digression, what shall I do to boot the wim file directly to ram or from disk?



#73 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 07 October 2020 - 09:22 PM

eureka! a bad winbootcompress.ini was the culprit

everything is booting fine now, left right and center

so now I can give u the figures. my chopping shrinks the wim from 3.1gb to 2.6gb (and I have not reduced the services yet); the gain is even greater if we compare the full vhd's 5gb to 3.5gb. there is no telling which gain has been obtained when comparing the combos, as the min vhd is 1gb. the space used is about the same as before just a few dozen megs greater this time, probably on account of your \Windows\System32\drivers\*.sys edition, to be safe and secure. let me reduce the services now and pls brief me on the plain wim booting. btw, the registry shrunk by 24%. and it is a lot faster, so if I were u I would include the various brute forces in win_reduce, of course keeping them separately. guess how small it would be with a reduced syswow64. not only a curiosity, believe me, this is something. !un sistema siniguales!



#74 wimb

wimb

    Platinum Member

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

Posted 08 October 2020 - 03:59 AM

*
POPULAR

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

 

Attached File  Win_Reduce_2020-10-07_154939.jpg   47.7KB   0 downloads == Attached File  Win_Red_0_2020-10-07_154802.jpg   403.86KB   0 downloads == Attached File  Win_Red_1_2020-10-07_155241.jpg   404.69KB   0 downloads == Attached File  Win_Red_SVBus_2020-10-08_155247.jpg   121.41KB   0 downloads


  • Tokener, gbrao and alacran like this

#75 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 08 October 2020 - 04:08 AM

^ reboot link seems to be wrong.

 

edit. sorry delete this post.





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