Need to change a partition type to a Recovery or EFI System Partition? Follow our complete step-by-step guide to using the Diskpart "set id=" command, or use AOMEI Partition Software to change partition types safely without coding.
Quick Answer:
How do you change a partition type ID in Windows 11/10?
A partition type ID tells the Windows Operating System what a specific partition is used for (e.g., a basic data drive, a hidden Recovery partition, or an EFI system partition). You can change this ID using two primary methods:
In the world of Windows disk management, not all partitions are created equal. Behind the scenes, the Windows Operating System assigns a unique identifier—known as a Partition Type ID—to every single partition on your hard drive.
This ID dictates how Windows treats the partition. For example, a "Basic Data" partition is given a specific ID, so Windows knows it can assign a drive letter (like C: or D:) to it. Meanwhile, an "EFI System" or "Recovery" partition is assigned a completely different ID so Windows knows to hide it and protect it from accidental deletion.
Sometimes, system administrator users need to change this partition type ID manually. Whether you are trying to hide a sensitive data drive, fix a broken recovery environment, or configure a custom boot partition, you need the right tools.
In this comprehensive guide, we will teach you how to change a partition type ID using the native Windows Diskpart utility. More importantly, we will highlight the extreme risks of this method and show you the safest, visual GUI alternative to get the job done without crashing your system.
Before you type a single command, you must know what disk style you are using: MBR (Master Boot Record) or GPT (GUID Partition Table). The format of the partition type ID changes depending on your disk style.
Diskpart is a highly advanced tool. There is no "Undo" button. If you accidentally select your active C: drive and change its ID to an OEM Recovery partition, your computer will immediately crash and refuse to boot. Proceed with extreme caution.
Step 1. Press the Windows Key + R, type cmd, and press Ctrl + Shift + Enter to open Command Prompt as an Administrator.
Step 2. Type diskpart and press Enter to launch the utility.
Step 3. Type list disk and press Enter. Note the number of the disk containing the target partition.
Step 4. Type select disk N (replace N with your disk number) and press Enter.
Step 5. Type list partition and press Enter. Note the number of the partition you want to modify.
Step 6. Type select partition M (replace M with your partition number) and press Enter.
To set the new ID, type the following command depending on your disk style:
Step 7. Press Enter. If executed correctly, Diskpart will display: "DiskPart successfully set the partition ID."
Step 8. Type exit to close the utility.
Note: If Windows refuses to change the ID because the partition is actively in use, you can force the change by appending override to the end of the command, e.g., set id=27 override.
For 99% of computer users, risking a total system failure by typing long strings of GUID code into a black command terminal is simply not worth it. If you want to change a partition type ID safely, quickly, and visually, you should use AOMEI Partition Software.
Instead of memorizing complex hex codes and risking typos, AOMEI provides a clean Graphical User Interface (GUI). It allows you to select your partition visually, choose the new ID from a pre-labeled drop-down menu, and preview the change before permanently applying it to your hard drive.
A safe and reliable disk partition management tool that helps you migrate OS to SSD or HDD, reorganize disk space, and improve overall PC performance.
Step 1. Install and Launch
Download, install, and open AOMEI Partition Software. You will immediately see a clear, color-coded visual map of all your disks and partitions.
Step 2. Select the Target Partition
Locate the specific partition you want to modify. Right-click on it, navigate to the Advanced menu, and click on Change Partition Type ID.
Step 3. Choose the New ID from the Menu. Select the ID you need and click OK.
A simple dialog box will pop up. Instead of making you type a code, the software provides a drop-down menu.
Step 4. Apply the Changes.
You will return to the main interface. The change has not been finalized yet—AOMEI protects you with a "Virtual Preview." Review the pending operation on the left panel. If everything looks correct, click Apply at the top left and then Proceed. The software will safely execute the backend code for you.
Changing a partition type ID is a powerful disk management technique that allows users to configure recovery environments, hide sensitive data, or repair corrupted EFI system partitions.
While the native Windows Diskpart command-line utility is capable of executing the set id= command, the requirement to memorize complex MBR Hex codes and lengthy GPT GUIDs makes it incredibly risky for the average user.
To guarantee the safety of your data and prevent accidental OS corruption, utilizing a visual GUI tool like AOMEI Partition Software is highly recommended. By trading risky command-line typing for a simple, pre-labeled drop-down menu, you can configure your hard drive's partitions exactly how you want them with zero stress and absolute precision.
Q: Will changing the partition type ID format the drive or delete my files?
A: No, changing the partition type ID does not alter the actual file system (like NTFS or FAT32) or delete the data stored inside the partition. It simply changes the "label" that tells Windows how to interact with the partition.
Q: I changed a partition ID to "Hidden/Recovery" and now I can't see the drive in File Explorer. How do I fix it?
A: This is normal! When a partition is tagged as a Recovery or EFI System Partition, Windows automatically removes its drive letter to protect it from being tampered with by the user. To make it visible again, use AOMEI or Diskpart to change the ID back to a Basic Data Partition (0x07 for MBR), and then assign it a new drive letter.
Q: What is the difference between changing the partition type ID and converting MBR to GPT?
A: Changing the partition type ID only affects a single partition's identifier label. Converting from MBR to GPT changes the entire physical hard drive's architecture and how the motherboard reads the boot sector. If you need to convert an entire disk to GPT for Windows 11 compatibility, AOMEI Partition Software has a dedicated "Convert to GPT" tool that does this without data loss.
Q: Can I use Diskpart on a Mac or Linux system?
A: No, Diskpart is a proprietary command-line disk partitioning utility created exclusively for Microsoft Windows Operating Systems.