# WinPE 救援环境 - PXE 启动包

## 概述

通过 PXE 网络启动 Windows PE（WinPE）救援环境，用于系统维护、数据恢复、密码重置、磁盘分区等操作。

## 文件结构

```
tools/rescue/winpe/
├── boot.ipxe       # iPXE 启动脚本
└── boot.wim        # WinPE 启动镜像 (~400 MB)
```

## 依赖文件

需要 `boot/` 目录下的通用文件：wimboot、boot.sdi、BCD。

## 制作 WinPE boot.wim

使用 Windows ADK（评估和部署工具包）：

1. 安装 Windows ADK + WinPE 插件
2. 打开 "部署和映像工具环境"
3. 创建 WinPE 工作目录：
   ```
   copype amd64 C:\WinPE_amd64
   ```
4. （可选）添加驱动、工具、脚本
5. 生成 boot.wim：
   ```
   MakeWinPEMedia /ISO C:\WinPE_amd64 C:\WinPE.iso
   ```
6. 从 ISO 提取 `sources/boot.wim`

## 常用 WinPE 工具

- 磁盘分区：diskpart
- 系统修复：sfc /scannow, dism
- 密码重置：ntpasswd（独立工具）
- 数据恢复：TestDisk, PhotoRec
- 网络诊断：ipconfig, ping, tracert
- 注册表编辑：regedit
