Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

(시리즈 글이 6개 있습니다.)
Windows: 111. 복구(Recovery) 파티션 삭제하는 방법
; https://www.sysnet.pe.kr/2/0/2918

Windows: 142. Windows 10의 복구 콘솔로 부팅하는 방법
; https://www.sysnet.pe.kr/2/0/11207

Windows: 143. Windows 10의 Recovery 파티션을 삭제 및 새로 생성하는 방법
; https://www.sysnet.pe.kr/2/0/11209

Windows: 147. 시스템 복구 디스크를 USB 디스크에 만드는 방법
; https://www.sysnet.pe.kr/2/0/11598

Windows: 156. 가상 디스크의 용량을 복구 파티션으로 인해 늘리지 못하는 경우
; https://www.sysnet.pe.kr/2/0/11807

Windows: 263. Windows - 복구 파티션(Recovery Partition) 용량을 늘리는 방법
; https://www.sysnet.pe.kr/2/0/13586




가상 디스크의 용량을 복구 파티션으로 인해 늘리지 못하는 경우


경고!!!!!!!
이 글에서 설명하고 있는 diskpart.exe를 이용해 파티션 삭제 등의 작업을 할 때는 정말, 정말, 정말 주의를 해야 합니다. 자칫 실수로 작업 파티션을 날리면 하드 디스크 복구 업체를 통하지 않고는 데이터 복원이 안되는 사태를 경험할 수 있습니다.





가상 디스크(VHD, VHDX)의 용량이 모자라서 늘리긴 했는데, 다음과 같이 복구 파티션이 중간에 끼이는 경우가 있습니다.

move_recovery_partition_1.png

이 때문에 "볼륨 확장(Extend volume)" 명령을 사용할 수가 없는데, 해결책은 다음의 글에서 이미 설명했습니다.

Windows 10의 Recovery 파티션을 삭제 및 새로 생성하는 방법
; https://www.sysnet.pe.kr/2/0/11209

단순히 삭제 후 새롭게 만들어 주면 되지만 그럴 경우 winre.wim 파일을 다시 만들어야 하는 번거로움이 있으므로 그냥 단순하게 기존의 복구 파티션에 있는 내용을 그대로 재사용하는 것이 더 좋습니다. 따라서 Recovery Partition에 드라이브 문자를 할당하고,

C:\WINDOWS\system32> diskpart

Microsoft DiskPart version 10.0.14393.0

Copyright (C) 1999-2013 Microsoft Corporation.
On computer: TESTPC

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online           45 GB    11 GB
  Disk 1    Online           16 GB  1024 KB
  Disk 2    Online            8 GB  1024 KB

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> list part

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary            100 MB  1024 KB
  Partition 2    Primary             33 GB   101 MB
  Partition 3    Recovery           450 MB    33 GB

DISKPART> sel part 3

Partition 3 is now the selected partition.

DISKPART> assign letter=k

DiskPart successfully assigned the drive letter or mount point.

다음과 같이 robocopy를 이용해 백업해 둡니다.

C:\WINDOWS\system32> robocopy k:\ d:\temp\Kdrive\ /S

이제 복구 파티션을 삭제하고,

C:\WINDOWS\system32> diskpart

Microsoft DiskPart version 10.0.14393.0

Copyright (C) 1999-2013 Microsoft Corporation.
On computer: TESTPC

DISKPART> sel disk 0

DISKPART> sel part 3

Partition 3 is now the selected partition.

DISKPART> delete part override

DiskPart successfully deleted the selected partition.

아래와 같이 450MB 공간이 남도록 파티션을 재조정합니다.

move_recovery_partition_2.png

그다음, 다시 기존 백업해 두었던 내용을 새로운 드라이브에 복사해 준 후,

robocopy d:\temp\Kdrive\ f:\ /S /XF tracking.log

Recovery 파티션으로써 동작하도록 설정 작업을 마무리합니다.

F:\> reagentc /setreimage /path f:\recovery\WindowsRE\Winre.wim
Directory set to: \\?\GLOBALROOT\device\harddisk0\partition3\recovery\WindowsRE

REAGENTC.EXE: Operation Successful.


F:\> reagentc /enable
REAGENTC.EXE: Operation Successful.

"Windows 10의 Recovery 파티션을 삭제 및 새로 생성하는 방법" 글에서도 설명했지만, 여기까지 하면 복구 파티션으로의 동작은 합니다. 다만 이전과 동일하게 보이지 않도록 만들고 싶다면 다음과 같이 복구 파티션임을 명시하는 작업을 추가합니다.

F:\> diskpart

Microsoft DiskPart version 10.0.14393.0

Copyright (C) 1999-2013 Microsoft Corporation.
On computer: TESTPC

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online           45 GB  1024 KB
  Disk 1    Online           16 GB  1024 KB
  Disk 2    Online            8 GB  1024 KB

DISKPART> sel disk 0

Disk 0 is now the selected disk.

DISKPART> list part

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary            100 MB  1024 KB
  Partition 2    Primary             44 GB   101 MB
  Partition 3    Primary            462 MB    44 GB

DISKPART> sel part 3

Partition 3 is now the selected partition.

GPT 파티션인 경우에는 다음의 명령어로,

DISKPART> set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac

DiskPart successfully set the partition ID.


DISKPART>  GPT attributes=0x8000000000000001

DiskPart successfully assigned the attributes to the selected GPT partition.

DISKPART> detail part

Partition 3
Type    : de94bba4-06d1-4d40-a16a-bfd50179d6ac
Hidden  : Yes
Required: Yes
Attrib  : 0X8000000000000001
Offset in Bytes: 106688413696

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 3     F   New Volume   NTFS   Partition    462 MB  Healthy    Hidden

MBR 파티션인 경우에는 다음의 명령어로,

DISKPART> set id=27 override

DiskPart successfully set the partition ID.

수행한 후, 마지막으로 (취향에 따라) 기존에 할당한 드라이브 문자를 제거합니다.

diskpart - remove letter 이후 재부팅 시 다시 드라이브 문자가 할당되는 경우
; https://www.sysnet.pe.kr/2/0/11804




그렇다면, 다음에도 디스크 용량이 부족하면 어떻게 해야 할까요? 당연히 위와 같은 작업을 또 해줘야 합니다. 이쯤에서, 왜??? 복구 파티션이 언제나 앞에 있었는지 그 이유를 알 수 있습니다. ^^

참고로, 여타의 파티션 관리 소프트웨어를 통해 이 작업을 좀 더 편하게 할 수 있습니다. 단지, 대부분의 프로그램들이 유료이거나 믿을 수 없는(untrusted) 소스로부터 다운로드하는 것이어서 개인적으로는 이렇게 직접 작업하는 것을 더 선호합니다. ^^




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 2/16/2023]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 



2019-11-14 07시46분
[궁금해요] 후미에 생성된 복구파티션을 맨 앞으로 옮기는 방법은 없나요..?
[guest]
2019-11-14 08시25분
넵 없습니다. 그렇긴 한데, 제가 알기로는 상용 파티션 도구들은 그런 기능을 제공하는 것도 있는 듯합니다.
정성태
2019-11-14 10시23분
[궁금해요] 그렇군요..답변 감사합니다.
[guest]
2021-01-24 08시51분
[마냥] 사용중인 PC에 복구 파티션 때문에 C 드라이브 크기 조절을 못하고 있었는데 이 글 덕분에 해결했습니다. 고맙습니다^^
[guest]

... 181  182  183  184  185  186  187  [188]  189  190  191  192  193  194  195  ...
NoWriterDateCnt.TitleFile(s)
254정성태6/1/200617569개발 환경 구성: 2. VPC에 Vista 설치하는 방법 [2]
255정성태6/1/200617310    답변글 개발 환경 구성: 2.1. msconfig 설정과 Windows Activation
259정성태6/1/200616408    답변글 개발 환경 구성: 2.2. Vista VPC에 터미널 서비스 - 원격 접속
253정성태6/1/200614707기타: 14. .NET 2.0 이 지원되는 NDoc 2.0 을 배포합니다.
251정성태6/1/200617735오류 유형: 4. [OS 지원 API] SHParseDisplayName과 Windows 2000
252정성태6/1/200617541    답변글 오류 유형: 4.1. NET BCL 에서 제공되는 FolderBrowserDialog [2]
249정성태6/1/200616983.NET Framework: 71. VB.NET 이외의 언어에서 My 네임스페이스 사용
250정성태6/1/200619635    답변글 .NET Framework: 71.1. VB.NET 이외의 언어에서 My 네임스페이스 사용
248정성태6/1/200617835기타: 13. Code Center Premium에서 Win32 API 소스 찾기
245정성태6/1/200625448오류 유형: 3. [C# / VC++] error C2146: syntax error : missing ';' before identifier 'GetType'
247정성태5/3/200622683    답변글 .NET Framework: 3.1. Interface를 사용하면. [1]
242정성태6/1/200623175오류 유형: 2. [COM+] CreateObject 와 HTTP 500 - Internal server error
243정성태6/1/200620629    답변글 오류 유형: 2.1. [COM+] Resolve Partial Assembly failed for Microsoft.VC80.CRT.mui
244정성태6/1/200621922    답변글 오류 유형: 2.2. [COM+] Server object error 'ASP 0178 : 80070005'
240정성태6/1/200619820스크립트: 9. setTimeout 과 jscript/vbscript 혼용 문제
239정성태6/1/200621110COM 개체 관련: 18. Internet Explorer는 Out-of-process COM 개체입니다.
238정성태6/1/200622958개발 환경 구성: 1. batch 파일에서 실행한 exe에서 batch 실행 문맥의 환경 변수 설정 [3]
236정성태6/1/200643751오류 유형: 1. [.NET COM+] UnauthorizedAccessException: 레지스트리 키 HKEY_CLASSES_ROOT\.... 에 대한 액세스가 거부되었습니다
235정성태6/1/200618399VS.NET IDE: 39. VS.NET 2003/2005에서도 제공되는 VS 6.0 MFC ClassWizard
234정성태4/14/200618102VC++: 24. error C2039: 'pOleStr' : is not a member of '_STRRET'
233정성태4/13/200617491.NET Framework: 70. Response.ContentType 과 Response.AddHeader( "Content-Type", "..." ) 의 차이
232정성태4/13/200617250.NET Framework: 69. Reusing C# Source Code Across Multiple Assemblies
231정성태4/13/200617675Team Foundation Server: 4. How to rename a Team Foundation Server
229정성태10/17/200619201.NET Framework: 68. Feb CTP 에서 동작하는 "Save XPS Document page(s) to .bmp" 예제 소스
230정성태4/13/200619471    답변글 .NET Framework: 68.1. -01 MSDN Magazine XPS Document 소스를 Feb CTP로 수정한 버전파일 다운로드1
228정성태4/13/200615882Team Foundation Server: 3. MSBUILD : warning : Visual Studio Team System for Software Testers or Visual Studio Team System for Software Developers is required to run tests as part of a Team Build.
... 181  182  183  184  185  186  187  [188]  189  190  191  192  193  194  195  ...