为了对现有的wim映像进行小的更改,可以通过将以前的wim文件用作基本wim和仅包含“changes”作为主wim的文件来显着减lessnetworkingstream量。
wimlib是一个用于播放wim文件的开源库,它具有创build这些“仅更改”wim文件的function。 你只是做:
.\wimlib-imagex.exe capture <folder_to_capture> <output.wim> --delta-from=<base.wim>
结果是一个很小的output.wim,它只有元数据和与base.wim不同的文件。 然后,即使使用Microsoft的工具,也可以应用该图像,如下所示:
Expand-WindowsImage -ImagePath <output.wim> -Index 1 -ApplyPath ` <output_folder> -SplitImageFilePattern <base.wim>
两个问题:
微软的第一方imagex / dism工具提供了什么方法来获得相同的function(只要我可以避免添加其他依赖如果可能的话)? 他们提供了将现有的wim分解成片断,但是我没有看到任何东西来帮助从文件夹/ wim和基本wim中创build“delta”types的wim。
如果不是的话,使用wimlib时应该注意哪些问题? 我的用例是通过微软的部署工具包捕获和应用图像。 我看到wimlib不支持NTFS扩展属性,但MDT并没有捕获那些据我所知。
根据Microsoft Docs提供的文档,没有增量捕获选项可用: https : //docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/deployment-image-servicing-and-management –dism -命令行选项
Dism /Capture-Image /ImageFile:<path_to_image_file> /CaptureDir:<source_directory> /Name:<image_name> [/Description:<image_description>] [/ConfigFile:<configuration_file.ini>] {[/Compress:{max|fast|none}] [/Bootable] | [/WIMBoot]} [/CheckIntegrity] [/Verify] [/NoRpFix] [/EA] Parameter Description /ConfigFile Specifies the location of a configuration file that lists exclusions for image capture and compress commands. For more information, see DISM Configuration List and WimScript.ini Files. /Compress Specifies the type of compression used for the initial capture operation. The maximum option provides the best compression, but takes more time to capture the image. The fast option provides faster image compression, but the resulting files are larger than those compressed by using the maximum option. This is also the default compression type that is used if you do not specify the argument. The none option does not compress the captured image at all. /Bootable Marks a volume image as being a bootable image. This argument is available only for WinPE images. Only one volume image can be marked as bootable in a .wim file. /CheckIntegrity Detects and tracks .wim file corruption when used with capture, unmount, export, and commit operations. /CheckIntegrity stops the operation if DISM detects that the .wim file is corrupted when used with apply and mount operations. /Verify Checks for errors and file duplication. /NoRpFix Disables the reparse point tag fix. A reparse point is a file that contains a link to another file on the file system. If /NoRpFix is not specified, reparse points that resolve to paths outside of the value specified by /ImageFile will not be captured. /WIMBoot Use /WIMBoot to append the image with Windows image file boot (WIMBoot) configuration. This only applies to Windows 8.1 images that have been captured or exported as a WIMBoot file. This feature isn't supported in Windows 10. /EA New in Windows 10, version 1607. Captures extended attributes. The switch must be explicitly specified to capture extended attributes. DISM will capture extended attribute bits if they are set in the components to be captured in the WIM image. If the bits are not set, DISM won't set them. Only the inbox components of CAB packages and drivers will have these extended attribute bits, not the AppX package components or Win32 application components. Extended attributes with prefix “$Kernel.” in name will be skipped because only user mode extended attributes are captured. If you use DISM in Windows 10, version 1607 to capture extended attributes and use an earlier version of DISM to apply the image, the operation will succeed but the extended attributes will not be set to the applied image.
我的经验没有兼容性问题。
当我使用Windows PE SE时,偶尔使用WIMLib。
当我为Windows构build可启动的Live CD环境时,不会造成任何问题。
BCD能够正确引导图像。
现在,那些只使用标准的WIM选项,我没有试图做任何先进的WIM文件。