The GPT format introduce far more place to metadata.
To set a partition type in diskpart, one use :
DISKPART> create partition msr
or
DISKPART> create partition efi
or
DISKPART> create partition primary
But how to do change the type after partition creation like changing primary to efi ?
DiskPart can actually do this. Select the appropriate disk and partition, then use the set id
command. For example, this changes the selected partition into an EFI partition:
set id=c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Using a combination of the set id
TechNet article and detail partition
, I discovered these common possible values:
de94bba4-06d1-4d40-a16a-bfd50179d6ac
ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
c12a7328-f81f-11d2-ba4b-00a0c93ec93b
e3c9e316-0b5c-4db8-817d-f92df00215ae
It's probably a good idea to consult the partition attributes for a partition of a certain type (look at a healthy computer) so the set flags make sense. As you discovered, gpt attributes
sets flags; detail partition
displays them.
The TechNet documentation says that DiskPart won't let you make a partition into a Microsoft Reserved one. That claim is true, so you might want to use a different tool. If you really want to use DiskPart, you'll have to whack the Windows disk management infrastructure it so that it doesn't know what types are not allowed. Danger! I have not tested the following steps on a bootable disk; they're here for entertainment purposes only. Do them at your own risk, preferably on a throwaway computer or VM.
Break out a hex editor - I like XVI32 - and open a copy of vdsbas.dll
(in System32). That's the module that serves most disk-related operations, and it's the one responsible for policing partition types. The GUID of the Microsoft Reserved type starts at byte 0x21CD8 for the version that comes with Windows 10 x64; you should search for the hex string 16 E3 C9 E3
(0xE3C9E316 in little-endian). Flipping a bit there will make the whacked copy not know you're setting a special type. You'll have to change the security settings on the original copy of vdsbas.dll
before Windows will let you overwrite it. You'll also have to make sure the Virtual Disk service isn't running (stopping it in Services is fine), otherwise the file will be in use.
Note that such Reserved partitions must not be associated with a volume. I do not know whether DiskPart has a way to keep a partition that way.
There's probably a good reason Microsoft doesn't let you set this type, so make a back-up of anything important on the drive if you decide to go this route. If you direly need such a partition back, it's probably better to reinstall/repair Windows from official media.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다