How to change GPT partition type on windows?

user2284570

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 ?

Ben N

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:

  • Recovery: de94bba4-06d1-4d40-a16a-bfd50179d6ac
  • Normal: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
  • EFI: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
  • Reserved: 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.

Danger zone: setting the Reserved type

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] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Change GPT partition file system type with parted

분류에서Dev

How to install Ubuntu on a GPT partition table without using EFI boot?

분류에서Dev

GPT disk partition recovery

분류에서Dev

Clean install of Windows 7 Pro 64-bit on a UEFI laptop with GPT partition?

분류에서Dev

Windows cannot be installed on the disk. The selected disk is of the GPT partition style.

분류에서Dev

How to change the disk interface type for my Windows 8.1 guest on KVM

분류에서Dev

grub-install: this GPT partition label contains no BIOS Boot Partition

분류에서Dev

How to compress an encrypted partition or drive in Windows?

분류에서Dev

How To Defrag Windows 8 System Reserved Partition

분류에서Dev

How can I shrink a Windows 10 partition?

분류에서Dev

How to resize a Windows partition after Ubuntu installed?

분류에서Dev

How to boot into Windows 7 when grub is installed in the Windows partition?

분류에서Dev

GPT partition table warning message during install of ubuntu

분류에서Dev

Manual Cloning of a mutli partition gpt disk to smaller target

분류에서Dev

Why do I have MBR and GPT as partition tables?

분류에서Dev

How to access ubuntu partition from windows using virtualbox

분류에서Dev

How to partition hard disk for dual boot for Windows 7 and Ubuntu Linux

분류에서Dev

How to list all files on Windows OS partition from a Linux OS?

분류에서Dev

Windows detects GPT disk as MBR in EFI boot

분류에서Dev

Install Windows 7 with Ubuntu in GPT UEFI mode

분류에서Dev

unable to access windows partition after deleting partition

분류에서Dev

application not work correctly after change type to windows application

분류에서Dev

How to change target based on link type in XSL

분류에서Dev

How to change target based on link type in XSL

분류에서Dev

Install grub2 on UEFI GPT,create /boot partition and transfer clonezilla image

분류에서Dev

How to change a font/background color in transparent windows?

분류에서Dev

How to change windows explorer view by keyboard?

분류에서Dev

How to change Windows 7 zip icon

분류에서Dev

How to change the theme of Windows 8 to the classic theme?

Related 관련 기사

  1. 1

    Change GPT partition file system type with parted

  2. 2

    How to install Ubuntu on a GPT partition table without using EFI boot?

  3. 3

    GPT disk partition recovery

  4. 4

    Clean install of Windows 7 Pro 64-bit on a UEFI laptop with GPT partition?

  5. 5

    Windows cannot be installed on the disk. The selected disk is of the GPT partition style.

  6. 6

    How to change the disk interface type for my Windows 8.1 guest on KVM

  7. 7

    grub-install: this GPT partition label contains no BIOS Boot Partition

  8. 8

    How to compress an encrypted partition or drive in Windows?

  9. 9

    How To Defrag Windows 8 System Reserved Partition

  10. 10

    How can I shrink a Windows 10 partition?

  11. 11

    How to resize a Windows partition after Ubuntu installed?

  12. 12

    How to boot into Windows 7 when grub is installed in the Windows partition?

  13. 13

    GPT partition table warning message during install of ubuntu

  14. 14

    Manual Cloning of a mutli partition gpt disk to smaller target

  15. 15

    Why do I have MBR and GPT as partition tables?

  16. 16

    How to access ubuntu partition from windows using virtualbox

  17. 17

    How to partition hard disk for dual boot for Windows 7 and Ubuntu Linux

  18. 18

    How to list all files on Windows OS partition from a Linux OS?

  19. 19

    Windows detects GPT disk as MBR in EFI boot

  20. 20

    Install Windows 7 with Ubuntu in GPT UEFI mode

  21. 21

    unable to access windows partition after deleting partition

  22. 22

    application not work correctly after change type to windows application

  23. 23

    How to change target based on link type in XSL

  24. 24

    How to change target based on link type in XSL

  25. 25

    Install grub2 on UEFI GPT,create /boot partition and transfer clonezilla image

  26. 26

    How to change a font/background color in transparent windows?

  27. 27

    How to change windows explorer view by keyboard?

  28. 28

    How to change Windows 7 zip icon

  29. 29

    How to change the theme of Windows 8 to the classic theme?

뜨겁다태그

보관