培训
模块
Employ file recovery in Windows client - Training
In this module, you will learn about the Windows file backup and recovery tools.
恢复介质(裸机恢复)有助于将 Windows 设备还原到出厂状态,即使用户需要更换硬盘驱动器或完全擦除驱动器。
Windows使用内置的 Windows 文件(包括最新的 Windows 和驱动程序更新,以及 OEM 预配包中包含的任何自定义项)来创建恢复介质。
如果你使用默认的分区布局来部署 Windows,则默认情况下,你的用户将能够创建裸机恢复介质。
如果你要使用自定义分区布局来部署 Windows,则需要添加一些配置文件,使你的用户能够创建裸机恢复介质:
备注
在 Windows 10 版本 1607 及更高版本中,不会使用此介质还原在孤立的预配包中捕获的桌面应用程序和设置。 使用 ScanState 工具捕获的常规自定义包 (.ppkg) 不受此问题的影响。
在记事本中创建一个配置文件,用于在重置硬盘驱动器后对硬盘驱动器进行分区。 此脚本应与用于在硬盘驱动器上创建分区的脚本相同,但存在以下例外:
脚本不应包含用于选择或清理驱动器的命令。 Windows 自动标识系统驱动器。 若要了解详细信息,请参阅本主题中后面部分的标识系统驱动器。
此脚本应向系统分区、Windows 分区和 Windows RE 工具分区分配分区号。
备注
使用自定义分区布局时,Windows RE 工具分区应有足够的可用空间,这样才能在将来扩大该分区。 Windows RE 工具分区的建议大小为 990 MB,至少保留 250 MB 的可用空间。
示例:
UEFI(基于 UEFI/GPT 的硬盘驱动器分区):
rem == ResetPartitions-UEFI.txt ==
rem == These commands are used with DiskPart to
rem reset the drive and recreate five partitions
rem for a UEFI/GPT-based computer.
rem Adjust the partition sizes to fill the drive
rem as necessary. ==
rem == The differences between this file and
rem CreatePartitions-UEFI.txt
rem are noted in parenthesis.
rem (NOT USED: select disk 0)
rem (NOT USED: clean)
convert gpt
rem == 1. System partition =========================
create partition efi size=100
rem ** NOTE: For Advanced Format 4Kn drives,
rem change this value to size = 260 **
format quick fs=fat32 label="System"
assign letter="S"
rem == 2. Microsoft Reserved (MSR) partition =======
create partition msr size=128
rem == 3. Windows partition ========================
rem == a. Create the Windows partition ==========
create partition primary
rem == b. Create space for the recovery tools ===
shrink minimum=500
rem ** Update this size to match the size of
rem the recovery tools (winre.wim)
rem plus some free space.
rem
rem == c. Prepare the Windows partition =========
format quick fs=ntfs label="Windows"
assign letter="W"
rem === 4. Recovery tools partition ================
create partition primary
format quick fs=ntfs label="Recovery tools"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
list volume
BIOS(基于 BIOS/MBR 的硬盘驱动器分区):
rem == ResetPartitions-BIOS.txt ==
rem == These commands are used with DiskPart to
rem reset the drive and create three partitions
rem for a BIOS/MBR-based computer.
rem Adjust the partition sizes to fill the drive
rem as necessary. ==
rem == The differences between this file and
rem CreatePartitions-BIOS.txt
rem are noted in parenthesis.
rem (NOT USED: select disk 0 )
rem (NOT USED: clean )
rem == 1. System partition ======================
create partition primary size=100
format quick fs=ntfs label="System"
assign letter="S"
active
rem == 2. Windows partition =====================
rem == a. Create the Windows partition =======
create partition primary
rem == b. Create space for the recovery tools
shrink minimum=500
rem ** Update this size to match the size of
rem the recovery tools (winre.wim)
rem plus some free space.
rem == c. Prepare the Windows partition ======
format quick fs=ntfs label="Windows"
assign letter="W"
rem == 3. Recovery tools partition ==============
create partition primary
format quick fs=ntfs label="Recovery"
assign letter="R"
set id=27
list volume
在记事本中,创建指向一键重置分区脚本的配置文件。
若要了解如何配置此文件,请参阅 ResetConfig XML 参考。
UEFI:
<?xml version="1.0" encoding="utf-8"?>
<!-- ResetConfig.xml for UEFI -->
<Reset>
<!-- May be combined with custom scripts – insert Run Phase elements here -->
<SystemDisk>
<DiskpartScriptPath>ResetPartitions-UEFI.txt</DiskpartScriptPath>
<MinSize>75000</MinSize>
<WindowsREPartition>4</WindowsREPartition>
<WindowsREPath>Recovery\WindowsRE</WindowsREPath>
<OSPartition>3</OSPartition>
</SystemDisk>
</Reset>
BIOS:
<?xml version="1.0" encoding="utf-8"?>
<!-- ResetConfig.xml for BIOS -->
<Reset>
<!-- May be combined with custom scripts – insert Run Phase elements here -->
<SystemDisk>
<DiskpartScriptPath>ResetPartitions-BIOS.txt</DiskpartScriptPath>
<MinSize>75000</MinSize>
<WindowsREPartition>3</WindowsREPartition>
<WindowsREPath>Recovery\WindowsRE</WindowsREPath>
<OSPartition>2</OSPartition>
</SystemDisk>
</Reset>
使用 UTF-8 文件格式保存文件:
单击“文件”,然后单击“另存为”。 在“编码”框中选择“UTF-8”,将此文件另存为 E:\Recovery\RecoveryImage\ResetConfig.xml。
用户可根据需要使用此选项创建恢复介质。
在目标计算机上,插入包含配置文件的 USB 闪存驱动器。
将配置文件复制到目标计算机:
Copy E:\Recovery\RecoveryImage\* R:\RecoveryImage\*
其中 E 是 USB 闪存驱动器的驱动器号,R 是恢复映像分区的驱动器号。
重启目标计算机,完成开箱即用体验 (OOBE)。
单击“启动”,键入“创建恢复驱动器”,然后选择“创建恢复驱动器”,在 UAC 提示符处单击“是”。
插入 USB 闪存驱动器。
选择“将恢复分区从电脑复制到恢复驱动器”>“下一步”>“下一步”>“创建”。
select disk 0
、clean
)。Windows 使用以下方法标识系统驱动器:
基于 BIOS 的计算机:使用 BIOS 报告的系统驱动器。
基于 UEFI 的计算机:使用 reagentc /setreimage
命令来启用 Windows RE 时,Windows 会将系统磁盘的适配器位置路径和 GUID 写入 UEFI 变量。 只有在系统和 OS 分区都位于系统驱动器上时,才执行此步骤。 在禁用 Windows RE 然后又重新启用它后,系统会根据需要更新该变量。
Windows 搜索其 GUID 与固件中存储的值匹配的驱动器。
Windows 搜索其位置路径与固件中存储的值匹配的驱动器。
Windows 搜索具有某个现有 ESP 的驱动器。
如果找到多个具有 ESP 的驱动器,恢复过程将不会继续。
Windows 搜索未初始化(原始)磁盘。
如果找到多个未初始化磁盘,恢复过程将不会继续。
培训
模块
Employ file recovery in Windows client - Training
In this module, you will learn about the Windows file backup and recovery tools.
文档
裸机重置/恢复:在部署新设备时创建恢复介质
裸机恢复功能的工作原理
ResetConfig XML 参考