Page 1 of 1
WIM woes reducing the size of final WIM
#1
Posted 17 March 2010 - 06:05 AM
Hi,
So I've read up a lot and got the customisation down to a t', but I can't for the life of me get the WIM size to reduce...
Here's my procedure at the moment:
Extract Windows 7 x86 to D:\win_source
Use imagex to /mountrw image 5 (ultimate) install.wim to D:\win_mount
Run the hive access tool
Use DISM to remove a number of packages (~20)
Manually delete about 900mb of files/folders from D:\win_mount
Use imagex to /unmount /commit
Use imagex to /export /compress fast (image 5) install.wim to D:\my_wim.wim
The result is my_wim.wim having almost exactly the same size as the original install.wim
I'm thoroughly confused.
What am I missing from the above steps to get the final wim size down?
So I've read up a lot and got the customisation down to a t', but I can't for the life of me get the WIM size to reduce...
Here's my procedure at the moment:
Extract Windows 7 x86 to D:\win_source
Use imagex to /mountrw image 5 (ultimate) install.wim to D:\win_mount
Run the hive access tool
Use DISM to remove a number of packages (~20)
Manually delete about 900mb of files/folders from D:\win_mount
Use imagex to /unmount /commit
Use imagex to /export /compress fast (image 5) install.wim to D:\my_wim.wim
The result is my_wim.wim having almost exactly the same size as the original install.wim
I'm thoroughly confused.
What am I missing from the above steps to get the final wim size down?
#3
Posted 17 March 2010 - 08:25 AM
You are recommitting the Ultimate WIM back into the full source. Why not try to export the Ultimate WIM first, then make your changes, then export it again.
But I am wondering why you are trying to make the WIM smaller...
But I am wondering why you are trying to make the WIM smaller...
#4
Posted 17 March 2010 - 08:28 AM
Interesting, thanks for the reply, I'll give it a go...
#5
Posted 17 March 2010 - 09:27 AM
Ok, 900mb was a bit excessive, I remove about 500mb give or take...
I don't want to compress it further than it already is, which I assume is 'fast'. Seeing as I removed ~500mb from the mounted image, I'm wondering why this is not reflected in the final wim size.
I run a tight ship hahha
Ok, updated procedure
imagex /export full_image 5 single_image
imagex /mountrw single_image mount_dir
[remove 500mb]
imagex /unmount /commit mount_dir
imagex /export single_image 1 new_image
Results:
full_image = 1.77 GB
single_image = 1.67 GB
new_image = 1.64 GB
500mb is still there somewhere...
I'm already short of hair, I can't afford to pull much more out :/
Am I meant to do anything in between any of the steps, like delete/move excess files before exporting? scratches head, oops
Sp0iLedBrAt, on 17 March 2010 - 08:04 AM, said:
Maybe imagex /compress maximum ?
I don't want to compress it further than it already is, which I assume is 'fast'. Seeing as I removed ~500mb from the mounted image, I'm wondering why this is not reflected in the final wim size.
Tripredacus, on 17 March 2010 - 08:25 AM, said:
You are recommitting the Ultimate WIM back into the full source. Why not try to export the Ultimate WIM first, then make your changes, then export it again.
But I am wondering why you are trying to make the WIM smaller...
But I am wondering why you are trying to make the WIM smaller...
I run a tight ship hahha
Ok, updated procedure
imagex /export full_image 5 single_image
imagex /mountrw single_image mount_dir
[remove 500mb]
imagex /unmount /commit mount_dir
imagex /export single_image 1 new_image
Results:
full_image = 1.77 GB
single_image = 1.67 GB
new_image = 1.64 GB
500mb is still there somewhere...
I'm already short of hair, I can't afford to pull much more out :/
Am I meant to do anything in between any of the steps, like delete/move excess files before exporting? scratches head, oops
#6
Posted 17 March 2010 - 09:39 AM
depends on what 500 Mb of files you deleted. If you forgot to delete the backups in the winsxs folder you will not see any size reduction.
For instance, there are 3000 printer driver files in the winsxs folder, and an identical set of 3000 files in the Drivers\File Repository\ folder. Unless you delete both copies, it doesn't really do much.
Then to top that off, there is the matter of compression. An 8Gb image fits on a 2.33 Gb WIM because it is compressed at least 60%-70%. This means if you delete 1 Gb of files, you might only see 300Mb of reduction. But this is further exacerbated by many files being extremely compressed (taking nearly 1 to 1 space inside the wim) and others being easy to compress text files. The winRE.wim file inside the system32 folder is a 150 Mb file and removing it reduces size by 150Mb because it cannot be compressed much further. On the other hand, if you deleted thousands of text files that can be compressed to 90% or higher, removing them doesn't really reduce the WIM much.
FYI, on a 2.3 Gb x86 WIM, I had to remove close to 5Gb of files to get the WIM near 1Gb in size. and of course you should be using the /MAXIMUM compression setting, you are trying to reduce the wim are you not ??? Fast is for people who don't care what size the WIM is.
For instance, there are 3000 printer driver files in the winsxs folder, and an identical set of 3000 files in the Drivers\File Repository\ folder. Unless you delete both copies, it doesn't really do much.
Then to top that off, there is the matter of compression. An 8Gb image fits on a 2.33 Gb WIM because it is compressed at least 60%-70%. This means if you delete 1 Gb of files, you might only see 300Mb of reduction. But this is further exacerbated by many files being extremely compressed (taking nearly 1 to 1 space inside the wim) and others being easy to compress text files. The winRE.wim file inside the system32 folder is a 150 Mb file and removing it reduces size by 150Mb because it cannot be compressed much further. On the other hand, if you deleted thousands of text files that can be compressed to 90% or higher, removing them doesn't really reduce the WIM much.
FYI, on a 2.3 Gb x86 WIM, I had to remove close to 5Gb of files to get the WIM near 1Gb in size. and of course you should be using the /MAXIMUM compression setting, you are trying to reduce the wim are you not ??? Fast is for people who don't care what size the WIM is.
#7
Posted 17 March 2010 - 09:46 AM
Thanks Jinje, that makes a lot of sense regarding file compressibility.
The main removals were:
; \Program Files\Microsoft Games (140mb)
; \Windows\Help\mui\0409 (4mb)
; \Windows\Help\Windows\en-US\*.h1s (20mb)
; \Windows\System32\Recovery (140 mb)
; \Windows\System32\WindowsPowerShell (8mb)
; \Windows\Web\Wallpaper\ (38mb)
; \Windows\winsxs\Backup (400mb)
So roughly 750mb, but still with maximum compression the same new_image came out at 1.54 GB, still a long way off of perfect...
The main removals were:
; \Program Files\Microsoft Games (140mb)
; \Windows\Help\mui\0409 (4mb)
; \Windows\Help\Windows\en-US\*.h1s (20mb)
; \Windows\System32\Recovery (140 mb)
; \Windows\System32\WindowsPowerShell (8mb)
; \Windows\Web\Wallpaper\ (38mb)
; \Windows\winsxs\Backup (400mb)
So roughly 750mb, but still with maximum compression the same new_image came out at 1.54 GB, still a long way off of perfect...
#8
Posted 17 March 2010 - 09:52 AM
Hmm maybe the problem is you are using Imagex to do your mount and unmount? Why aren't you using DISM for everything?
#9
Posted 17 March 2010 - 09:53 AM
nlitened, on 17 March 2010 - 09:46 AM, said:
; \Windows\System32\WindowsPowerShell (8mb)
First rule of MSFN you do not delete Powershell.
Second rule of MSFN you do not delete Powershell.
J/K, looks like you save about 200Mb or so, that sounds about right.
This post has been edited by MrJinje: 17 March 2010 - 10:08 AM
#10
- ← issues with unattend.xml driver path
- Unattended Windows 7/Server 2008R2
- Using SetupComplete command through usb? →
Share this topic:
Page 1 of 1



Help
Back to top










