먼저 부팅가능한 USB 플래시 드라이브 를 준비합니다. (Win10_1703_Korean_x64.iso 파일)


http://pico.tistory.com/126



샘플 : Windows PE 및 DiskPart 를 사용하여 UEFI / GPT 기반 하드 드라이브 파티션 구성

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-8.1-and-8/hh825686(v=win.10)


샘플 스크립트 ( ※ OEM Windows 데스크톱 배포 및 이미징 랩 )

https://msdn.microsoft.com/ko-kr/library/windows/hardware/dn898441(v=vs.85).aspx


rem == CreatePartitions-UEFI.txt ==

rem == These commands are used with DiskPart to

rem    create five partitions

rem    for a UEFI/GPT-based PC.

rem    Adjust the partition sizes to fill the drive

rem    as necessary. ==

select disk 0

clean

convert gpt

rem == 1. Windows RE tools partition ===============

create partition primary size=450

format quick fs=ntfs label="WinRE"

assign letter="T"

set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"

gpt attributes=0x8000000000000001

rem == 2. System partition =========================

create partition efi size=260

rem    ** NOTE: For Advanced Format 4Kn drives,

rem               change this value to size = 260 **

format quick fs=fat32 label="SYSTEM"

assign letter="S"

rem == 3. Microsoft Reserved (MSR) partition =======

create partition msr size=16

rem == 4. Windows partition ========================

rem ==    a. Create the Windows partition ==========

create partition primary

rem ==    b. Create space for the recovery image ===

shrink minimum=12000

rem       ** NOTE: Update this size to match the size

rem                of the recovery image           **

rem ==    c. Prepare the Windows partition =========

format quick fs=ntfs

assign letter="W"

rem === 5. Recovery image partition ================

create partition primary

format quick fs=ntfs label="Recovery"

assign letter="B"

set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"

gpt attributes=0x8000000000000001

list volume

exit


위 코드를 부팅가능한 USB 플래시 드라이브에 CreatePartitions-UEFI.txt 로 저장합니다.



Windows, 시스템 및 복구 파티션 캡처 및 적용 ( 03/17/2014, 05/02/2017 )

https://msdn.microsoft.com/ko-kr/library/windows/hardware/dn898498(v=vs.85).aspx


rem == ApplyImage.bat ==


rem == These commands deploy a specified Windows

rem    image file to the Windows partition, and configure

rem    the system partition.


rem    Usage:   ApplyImage WimFileName

rem    Example: ApplyImage B:\Recovery\RecoveryImage\install.wim ==


rem == Copy the Windows image to the

rem    Recovery image partition ==

md B:\Recovery\RecoveryImage

xcopy /h D:\Recovery\Windows\install.wim B:\Recovery\RecoveryImage\


rem == Apply the image to the Windows partition ==

dism /Apply-Image /ImageFile:%1 /Index:1 /ApplyDir:W:\


rem == Copy boot files to the System partition ==

W:\Windows\System32\bcdboot W:\Windows /l ko-KR /s S: /f ALL


rem == Copy the Windows RE image to the

rem    Windows RE Tools partition ==

md T:\Recovery\WindowsRE

xcopy /h D:\Recovery\WinRE\Winre.wim T:\Recovery\WindowsRE\


rem == Register the location of the recovery tools ==

W:\Windows\System32\Reagentc /Setreimage /Path T:\Recovery\WindowsRE /Target W:\Windows


rem == Verify the configuration status of the images. ==

W:\Windows\System32\Reagentc /Info /Target W:\Windows


위 코드를 부팅가능한 USB 플래시 드라이브에 ApplyImage.bat 로 저장합니다.



디스크 1 번( 0 번은 절대로 안됨, 2, 3, 4 가능 )의 D 드라이브에 폴더를 생성하고

D:\Recovery ┬ Windows\install.wim

              ├ WinRE\Winre.wim

              ├ ApplyImage.bat

              └ CreatePartitions-UEFI.txt


위와 같이 파일을 복사합니다.


그 다음 부팅가능한 USB 플래시 드라이브를 이용하여 재부팅 합니다.

( 로고 화면에서 F10 키 USB 선택 )


부팅한후 첫 화면에서 [ Shift ] + [ F10 ] 키를 눌러 줍니다.



명령 프롬프트 창이 실행되면 다음과 같이 명령을 입력합니다.


diskpart /s E:\Recovery\CreatePartitions-UEFI.txt

cd /d E:\Recovery\

ApplyImage B:\Recovery\RecoveryImage\install.wim



위 작업이 끝났으면 명령 프롬프트 창을 닫고 [ 다음 (N) ] 클릭

-> 컴퓨터 복구(R) 클릭 -> [ PC 끄기 ] 선택 후 재부팅 합니다.




Posted by 피코
,