OEM partition creation technique in Win8 operating system

  

Most of the computers pre-installed with Win8 now use the new version of UEFI firmware + GPT format disk, no longer like the previous BIOS + MBR. The benefits of using UEFI and GPT are many, such as enabling new features such as secure boot, and supporting more hard disk partitions and larger partition capacity.

Branded notebooks like Dell have some diagnostic tools that can be run before the system is booted. In fact, these tools are often stored in a hidden OEM partition on the hard drive. If you accidentally delete the system when you reinstall it yourself, how can you restore the OEM hidden attributes of the partition even if you copy the program files from elsewhere?

For the MBR format hard disk, search through Baidu We can get the solution; for GPT format hard drives, there is no effective solution on the network. In the following, I will reveal how to apply OEM partition attributes to GPT hard drives.

Let's quickly review how to set up an OEM partition on an MBR disk: In the Diskpart command, execute "create partition primary id=xx size=xx" for the selected partition, where id is identified OEMs, such as id=DE, declare to Windows that it is Dell's OEM partition. For more vendor code descriptions, you can execute the command "help create par pri" to understand:

So what about the GPT format disk?

The above command is of course no longer applicable. . Is it as the Internet says, can only use the OEM to send some "One-click recovery" software to completely format and restore the disk partition, or use Ghost to reload the previous hard disk backup to set up? Some foreign forums The answer also indicated that you have to contact the OEM to recover. In fact, the answer is that we can set it ourselves, and the same is the tool that comes with the Diskpart system, but it is easily overlooked by everyone.

One of the commands in the new version of Diskpart is "gpt". With this command and the corresponding partition attribute code, you can easily set its properties. For example, we need to set the OEM partition attribute, let Windows automatically hide the partition, then we can create a primary partition (create par pri size=xxx), execute "Gpt attributes=0x0000000000000001" to set it as an OEM partition.

What is the meaning of 0x0000000000000001 here? We can view it by executing "help gpt":


Computer Common Sense

Here, in addition to using the 0x0000000000000001 attribute With one primary partition set to be an OEM partition, we can also apply other attributes to the partition with other code:

64-bit ID

effect

0x0000000000000001

Mark the partition as required partition /Set OEM

0x8000000000000000

Set to default to not assign drive letter to it

0x4000000000000000

Hide on volume Partition (the mount manager will not detect it)

0x2000000000000000

Declare a partition as a shadow copy of another partition

0x1000000000000000

Set to read-only to prevent data from being written

To cancel an applied attribute, Just add a minus sign "-" in front of the attribute ID in the gpt <64-bit attribute ID> command. It is not excluded that Microsoft will add more new properties for GPT disks in the next version of Windows.

Copyright © Windows knowledge All Rights Reserved