A brief discussion on disk partitioning--from MBR to GPT

Source: Internet
Author: User

This command of DiskPart has been used for many years.

As an old SCCM veteran, remember that in system Center Configuration Manager's OSD (operating system deployment), in order to implement single-mirror single-sequence deployment to different computer hardware, write scripts that provide different disk partitions.

This is due to the fact that when Windows is provided by different vendor OEMs, a reserved partition is often partitioned on disk to hold the recovery image. If there is a need for a non-online recovery system in an enterprise or organization, the image Wim generated by the OSD can be saved to a reserved recovery partition for system response when needed.

In addition, for a production environment, users often want to retain their own data partitions and only restore the system partition. In this case, it is very important to standardize the partition and identify and process it in the task sequence of the OSD.

For a long time, the understanding of disk partitioning satisfies the primary, extended, active, and MBR (Master boot records) to roughly meet the daily requirements. In the Pc/at era, the BIOS will look for the active boot partition on the disk, and then, depending on the boot sector information above, load the boot control program, such as SYS or BOOTMGR, to boot into the operating system.

Remember to use the 16 binary disk editor to view the partition table and see the 0x80 tag of the active partition? Remember to look at the boot sector and the last two double bytes for 0x55 0xAA? Here are a few articles to help you remember:

Why are used as the boot signature on IBM PCs?

Http://stackoverflow.com/questions/11075003/why-55-aa-is-used-as-the-boot-signature-on-ibm-pcs

The Pc/at boot process

Http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/pcat-boot-process.html#Active

However, the technology will not stay, in order to adapt to new requirements, for example, in order to exceed the 2TB disk limit, GPT disk partitions appear. Accordingly, the disk type ID is also changed from a previous double byte to a GUID.

The reason I think about this is because I took out the recovery partition that comes with the machine. So by the way, learn about the GPT partition.

How to create, delete partitions, search a heap, not within the scope of this discussion. Mainly want to see the partition type. When I delete the recovery partition, I can see these types of partitions on my SSD through the DiskPart detail Partition command.

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/74/99/ Wkiol1yjqjbxhh8uaap5st0sid8998.jpg "width=" 592 "height=" 861 "/>

In addition to the familiar partition/volume information, there are two main information I want to know, one is the partition type, because the use of GPT disk, is displayed as a GUID, one is a property.

Use the DiskPart setid command to modify the partition type and, of course, to view it.

Diskpart> Help SetID

Change the partition type field for the partition with focus.

Syntax: SET id={<byte> | <guid>} [OVERRIDE] [NOERR]

id={<byte> | <guid>}

Specifies the new partition type.

For master boot Record (MBR) disks, you can use the 16 binary form
Specifies the partition type byte for the partition. You can use this parameter to specify any
Partition type Byte, except type 0x42 (LDM partition). Please note that
When you specify a hexadecimal partition type, the leading "0x" is ignored.

For a GUID partition table (GPT) disk, you can specify a partition for the
The partition type GUID. The identified GUIDs include:

EFI system Partition:
c12a7328-f81f-11d2-ba4b-00a0c93ec93b

Basic Data partitioning:
Ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

You can use this parameter to specify any partition type GUID,
Some of the following types are excluded:

Microsoft Reserved Partitions:
E3c9e316-0b5c-4db8-817d-f92df00215ae

LDM metadata partitions on dynamic disks:
5808c8aa-7e8f-42e0-85d2-e1e90434cfb3

LDM data partitions on dynamic disks:
Af9b60a0-1431-4f62-bc68-3311714a69ad

Cluster metadata partition:
Db97dba9-0840-4bae-97f0-ffb9a327c7e1


In addition to the restrictions mentioned, DiskPart does not check
Whether the partition type is valid, just make sure that the partition type
is a byte or GUID in hexadecimal form.

    override    enable DiskPart to force the file system on the volume to be unloaded first,
                 then change the partition type. When you change the partition type, DiskPart
                Will attempt to lock and unload the file system on the volume. If
                This parameter is not specified, And the call to lock the file system failed (because some
                 Other applications have open handles to the volume, the entire operation will be
                 failed. When this parameter is specified, uninstallation is enforced,
                This is true even if the call to lock the file system fails. After uninstalling the file system,
                All open handles to the volume will be invalid.

NOERR is only used for scripting. When an error is encountered, DiskPart will continue
Handle the command as if there were no errors. If
Without using the NOERR parameter, errors can cause DiskPart
Exit and return the error code.

Intended for use by original equipment manufacturers (OEMs) only.

You must select a partition to successfully perform this operation.

Warning:

Changing the partition Type field with this parameter may cause the computer to fail
or cannot be started. Unless you are an OEM or are familiar with GPT disks
IT Pros, otherwise do not use this parameter to change the GPT disk
The Partition Type field. However, you can always use on GPT disks
The Create PARTITION EFI command creates the EFI system partition, using the
The Create PARTITION MSR command creates a Microsoft reserved partition
and using the CREATE PARTITION PRIMARY without the ID parameter
command to create a primary partition on a GPT disk.

This command is not available on dynamic disks or on Microsoft reserved partitions.

Example:

SET id=07 OVERRIDE
SET ID=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

Here is a more complete introduction: https://technet.microsoft.com/en-us/library/cc771243.aspx

I noticed that the help did not explain my oem partition and then searched.

This is a partition used to implement the Intel Rapid Start Technology, documentation see: Http://download.intel.com/support/motherboards/desktop/sb/rapid_ Start_technology_user_guide_for_uefi1.pdf

So, what about the partitioning properties? You can get the partition properties using the DiskPart GPT command.

diskpart> Help GPT

On the basic GUID partition table (GPT) disk, assign the GPT attribute to the partition with focus.


Syntax: GPT attributes=<n>

Attributes=<n>

Represents the hexadecimal value of a property that can be applied to a partition with focus. GPT attribute Field
is a 64-bit field that contains two sub-fields. The high-level field is only
The partition type GUID is not interpreted in the environment, and the low field is
Fields that are common to the zone type.

You can set the following properties on all partitions:

0x0000000000000001 marks the partition as a required partition. This to all the magnetic
The Disk Management utility indicates that the partition should not be deleted. The EFI system partition contains only
Binary data required to start the operating system. This makes it easy to make original equipment
Vendor (OEM) or operating system-specific binary data is placed in other partitions.

For basic data partitions, the following properties are defined:

                0x8000000000000000
                 Gpt_basic_data_attribute_no_drive_letter
                 prevents automatically assigning drive letters to partitions. By default, each partition is assigned a
                A new drive letter and volume GUID path name. Drive letter and volume GUID path name
                Can be used to open volumes that use the Win32 API. Set this property to ensure that the disk
                When you move to a new computer, the system does not automatically generate a new drive letter. Instead, the user can
                manually assign a drive letter.

                0x4000000000000000
                 Gpt_basic_data_attribute_hidden
                 defines a partition's volume as hidden.
                Set this property to specify that the volume will not be assigned a drive letter or a volume GUID path name.
                Drive Letter and volume GUID Path names can be used to open volumes that use the Win32 API.
                Win32 API Volumes that do not report hidden partitions, such as Findfirstvolume and
                 Findnextvolume.

0x2000000000000000
Gpt_basic_data_attribute_shadow_copy
Define the partition as the volume Snapshot service shadow copy volume. File system filters Use this flag
Prevents the filter from being attached to the volume.

x1000000000000000
Gpt_basic_data_attribute_read_only
Prevents writing to the volume.

Microsoft may add additional properties at any time.


The GPT Partition property provides additional information about the usage of the partition.

You must select a basic GPT partition to continue this operation.

Warning:

Changing the GPT property may result in the inability to assign a drive letter to the base data volume or to prevent the file from being mounted
System. Unless you are an original equipment manufacturer (OEM) or an IT professional who is familiar with GPT disks,
Do not change the GPT properties.

Example:

GPT attributes=0x8000000000000000
GPT attributes=0xf000000000000001

The partitioning properties obtained from the detail Partition command can be found in the following categories:

0x0000000000000000;0x8000000000000000;0x8000000000000001

This makes it understandable that the partition in Disk Manager is not operational.

0X0000000000000000 is a standard data partition, the system will automatically assign the drive letter, but also can be normal through the Disk Manager operation management;

The 0x8000000000000000 system does not allocate a drive letter, so the disk is not required to mount to other operating systems. But the operation can be done when needed;

0x8000000000000001 In addition to the properties above, the properties that prevent the deletion of partitions are superimposed.

For the introduction of GPT disks and the corresponding GUIDs, there are special articles on TechNet and MSDN.

Frequently asked questions about the GUID partitioning Table disk architecture

https://support.microsoft.com/en-us/kb/302873

Windows and GPT FAQ

https://msdn.microsoft.com/en-us/library/windows/hardware/dn640535 (v=vs.85). aspx

Remember when you installed Windows, automatically two more partitions? What is a boot partition, which is called a reserved partition, and what does it do?

Check the previous GUID, the boot partition is actually an EFI partition, can also be referred to as ESP. This partition usually holds the files needed for booting, such as bootmgr. The benefit of making a separate partition is that viruses and malicious code generally do not affect this partition when the system is running.

The full name of the reserved partition is Microsoft Reserved partition. You must have this partition for the GPT partition disk where Windows is installed. What is the function of this partition? For example, a basic disk is converted to a dynamic disk, and the data for that partition can be converted to a database of LDM dynamic volumes.

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/74/99/ Wkiol1yjqjajlflgaae2ezigy1y515.jpg "width=" 566 "height=" 401 "/>

In order to verify the system EFI partition, I have viewed the contents of this mounted partition with the elevated system account.

There is also an excellent introductory article about partitioning:

Https://technet.microsoft.com/en-us/library/dd799232%28v=ws.10%29.aspx

The traditional MBR partitioning pattern is as follows:

650) this.width=650; "title=" Example of more than four partitions "alt=" Example of more than four partitions "src=" https:/ /i-technet.sec.s-msft.com/en-us/library/dd799232.fcb58eac-4e64-49e3-86c8-9d7ea7aef255 (v=ws.10) .jpg?f=255& mspperror=-2147217396 "/>

The GPT partition pattern is as follows:

650) this.width=650; "title=" Partitions:esp, MSR, Windows "alt=" Partitions:esp, MSR, Windows "src=" https:// I-technet.sec.s-msft.com/en-us/library/dd799232.f23f2d37-a8e3-4d41-8b12-42eed004cae9 (v=ws.10) .png?f=255& mspperror=-2147217396 "/>

A brief discussion on disk partitioning--from MBR to GPT

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.