问题 1:

问题 1:

为了将小的更改推送到现有的 wim 映像,您可以通过使用以前的 wim 文件作为基础 wim 并使用仅包含“更改”的文件作为主 wim 来显著减少网络流量。

维姆利布是一个用于处理 wim 文件的开源库,它有一个很棒的功能,可以创建这些“仅更改”的 wim 文件。您只需执行以下操作:

.\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>

两个问题:

  1. Microsoft 的第一方 imagex/dism 工具是否提供了任何方法来获得相同的功能(这样我就可以避免添加另一个依赖项,如果可能的话)?它们提供了将现有 wim 拆分成几部分的功能,但我没有看到任何有助于从文件夹/wim 和基本 wim 创建“delta”类型 wim 的功能。

  2. 如果没有,使用 wimlib 时我应该注意什么问题?我的用例是通过 Microsoft 的部署工具包捕获和应用图像。我发现 wimlib 尚不支持 NTFS 扩展属性,但据我所知,MDT 不会捕获这些属性。

答案1

问题 1:

长话短说:


根据 Microsoft Docs 中的文档,没有可用的增量捕获选项: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/deployment-image-servicing-and-management--dism--command-line-options

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.

问题2:

从我的经验来看,没有兼容性问题。

当我使用 Windows PE SE 时,我偶尔会使用 WIMLib。

当我为 Windows 构建可启动的实时 CD 环境时,它不会引起任何问题。

BCD 能够正确启动映像。

现在,这些仅使用标准 WIM 选项,我还没有尝试对 WIM 文件进行任何高级操作。

相关内容