1、使用WinPE啟動,winPE制作可以參考我的另一文章http://www.cnblogs.com/karl-F/p/6934086.html
2、捕獲C盤鏡像
(1)查看磁盤
在PE提示符:輸入diskpa
X:> diskpart
DISKPART>
(2)list volume 查看分區
通過此命令人工識別 windows分區盤符和U盤盤符
(3)捕獲
根據實際情況替換U盤盤符U,和windows盤盤符C,注意U盤必須是ntfs格式,並且空間要夠大
Dism /Capture-Image /ImageFile:U:\my-windows-partition.wim /CaptureDir:C:\ /Name:"My Windows partition"
---------------------------------------------------恢復分割線-------------------------------------------------------------------------------------------------------------------
1、使用此PE去啟動需要恢復的目標機器
2、分區
使用diskpart工具創建分區如下:
select disk 0 clean create partition primary size=500 format quick fs=ntfs label="System" assign letter="S" active create partition primary format quick fs=ntfs label="Windows" assign letter="C" create partition primary format quick fs=ntfs label="Application" assign letter="E" exit
注意:注意盤符沖突,如果你U盤盤符為D,則不能使用D
備注:也可以使用 diskpart /s <script> script為要執行的所有命令文件
3、應用映像
Dism /apply-image /imagefile:D:\my-windows-partition.wim /index:1 /ApplyDir:C:\
4、使用 BCDboot 工具復制常見系統分區文件並初始化啟動配置數據
C:\Windows\System32\bcdboot C:\Windows /l en-US