Windows 8, EFI boot and dism image Capture and Apply method.

来源:互联网 发布:淘宝评价模版 编辑:程序博客网 时间:2024/06/11 06:43

Hard drive 1 has Windows 8 os installed with EFI.

How to clone the hard drive 1 to hard drive 2?

Install a third hard drive

Boot the computer with Windows 8 PE

The third hard drive will have the Drive Letter E.

Diskpart

list disk

    disk ###
    disk 0====OS
    disk 1====empty
    disk 2====data drive E:

select disk 1
  clean
  convert gpt
  Create partition primary size=1000
  Format quick fs=ntfs label="Windows RE tools"
  assign letter="T"
  create partition efi size=100
  rem == Note: for Advanced Format Generation One drives, change to size=260.
  format quick fs=fat32 label="System"
  assign letter="S"
  create partition msr size=128
  rem ==Note: no format operation
  create partition primary
  format quick fs=ntfs label="Windows"
  assign letter="W"
  select disk 0
  select partition 1
  assign letter=b
  select partition 2
  assign letter=a 
exit

  dism /capture-image /imagefile:E:\win8.wim /captureDir:C:\ /Name:Drive-C

dism /capture-image /imagefile:E:\recovery.wim /captureDir:b:\ /Name:Drive-b

dism /capture-image /imagefile:E:\system.wim /captureDir:a:\ /Name:Drive-a

dism /apply-image /imagefile:E:\recovery.wim /index:1 /applydir:T:\

dism /apply-image /imagefile:E:\system.wim /index:1 /applydir:s:\

dism /apply-image /imagefile:E:\win8.wim /index:1 /applydir:w:\

shutdown the computer

disconnect disk 0 and disk 2 from the computer

restart the computer==won't boot

Start the computer with Windows 8 DVD---UEFI---Automatic Repair couldn't repair your PC.

Go to command prompt

diskpart
  select disk 0
  list volume
  select volume 3
  rem volume 3 is the System type.
  assign letter=b
  select partition 1
  remove letter=c
  select partition 4
  remove letter=d
  assign letter=c 
  exit

bcdboot c:\windows /l en-gb /s b: /f all

bcdedit /export c:\savebcd

copy c:\savebcd c:\newbcd

bcdedit /store c:\newbcd

Delete the entry==device:unknown

e.g.

bcdedit /store c:\newbcd /delete {identifier}

bcdedit /import newbcd /clean

restart the computer.

success!