What are MBR and GPT partition tables? Detailed description of MBR and GPT partition tables

Source: Internet
Author: User

Detailed description of MBR and GPT partition tables

Before the new hard disk (not initialized) is mounted to the system, it must be aligned for Partitioning. The hard disk partition initialization format includes MBR and GPT. Of course, there is a dedicated Apple partition map for Mac computers based on PowerPC, which will not be introduced here.

The full name of MBR is Master Boot Record (Master Boot Record)MBR was proposed as early as 1983 in ibm pc dos 2.0. The primary boot record is called because it is a special boot sector that exists at the start of the drive. This sector contains information about the boot loader of the installed operating system and the logical partition of the drive.
The primary boot sector is the first sector of the hard disk. It consists of three parts: the master boot record MBR, the hard disk partition table DPT, and the hard disk effective mark. The MBR occupies 512 bytes in a total of 446 bytes of the primary boot sector, with the offset 0000H--0088H). It is responsible for loading from the active partition and running the system boot program; the second part is the Partition table area (DPT Partition table), which occupies 64 bytes. The third part is the Magic number, which occupies 2 bytes.
The start loader is a small piece of code used to load a larger loader on other partitions on the drive. If you have installed Windows, the initial information of the Windows boot loader is stored in this area. If the MBR information is overwritten, Windows cannot be started, you need to use Windows MBR repair function to restore it to normal. If you have installed Linux, the GRUB loader is usually located in MBR.
The DPT partition table offset address is 01BEH--01FDH. Each partition table item is 16 bytes long. A total of 64 bytes are Partition item 1, partition item 2, partition item 3, and partition item 4, corresponding to the four primary partitions of MBR respectively.
Magic number is the ending flag. It is 2 bytes of the offset address 01FE--01FF and is fixed to 55AA. If this flag is incorrect, the system cannot start.
MBR supports a maximum of 2 TB disks. It cannot process disks larger than 2 TB. MBR also supports up to four primary partitions-if you want more partitions, you need to create the so-called "extended partitions" and create logical partitions in it.
The full name of GPT is Globally Unique Identifier Partition TableThe GUID Partition Table is introduced in concert with uefi bios. Given that the disk capacity and number of partitions of MBR cannot meet the requirements of hardware development, the primary task of GPT is to break through the limit of 2.2T partitions and support a maximum of 18EB partitions.

GPT partitioned table system
In terms of the number of partitions, GPT will allocate a globally unique identifier for each partition. In theory, GPT supports unlimited disk partitions. However, due to system restrictions, A maximum of 128 disk partitions are supported, which can meet the storage requirements of all users. In each partition, This identifier is a randomly generated string, which can ensure that each GPT partition on the Earth is assigned a completely unique identifier.
In terms of security, GPT partitioned tables have also been comprehensively improved. On an early MBR disk, the partition and startup information are stored together. If this part of data is overwritten or damaged, it will be troublesome. In contrast, GPT stores multiple copies of this part of information on the entire disk, so it is more robust and can recover this part of information that is damaged. GPT also saves the cyclic redundancy checksum (CRC) for the information to ensure its integrity and correctness-if the data is damaged, GPT will detect these damages, and recover from other locations on the disk.
Summary:
Therefore, GPT partition table format is strongly recommended for new platform users (Intel 6 Series and AMD 900 series and A series, currently, Windows Vista, 7, 8, 8.1, and 10 support reading and using GPT partition tables. For users using Windows 8, 8.1, and 10, the startup speed is also significantly improved after GPT is used.
Uefi bios details
UEFI stands for the uniied Extensible Firmware Interface, which is a Unified and Extensible Firmware Interface developed based on the EFI 1.10 Standard. It is worth noting that before UEFI was formally established, intel began to actively promote the upgrade scheme of traditional BIOS, and finally established the EFI standard for the transition scheme. In 2007, Intel handed over the improvement and improvement of the EFI standard to the uniied EFI Form for full responsibility, the EFI standard is officially renamed as UEFI.

Traditional BIOS interface
Compared with traditional BIOS, UEFI has the following major differences:
1. Encoding 99% is completed in C language;
2. Change the previous interrupt and hardware port operations, and adopt a new Driver/protocol approach;
3. The X86 real-time mode is not supported, but Flat mode is used directly (that is, DOS is not supported. Some EFI or UEFI can be used because of compatibility, but in fact this part is not defined by UEFI );
4. The output is no longer a pure Binary code, but it is changed to Removable Binary Drivers;
5. When the OS is started, protocol/device Path is directly used instead of Int19;
6. For third-party development, the former is basically impossible, unless involved in the BIOS design, but also limited by the ROM size, and the latter will be more profitable.
7. Make up for the BIOS's lack of support for new hardware.
UEFI and GPT complement each other and are indispensable. To use a GPT partition table, you must use the uefi bios environment. The most typical feature of UEFI is the use of graphical interfaces. Although the graphic interaction function of the operating system interface has not yet been achieved, the user-friendly interface and mouse operations, the BIOS has become very easy to use. For many computer beginners, you can also view and set BIOS related options and functions.

| Uefi bios interface
In addition to the graphical interface, UEFI provides support for file systems compared to the traditional BIOS. It can directly read files in the FAT and FAT32 partitions, for example, if you update the BIOS of a uefi bios environment on a motherboard such as Asus or Huawei, you can directly read the BIOS and other files in the USB flash drive. In addition, the new UEFI motherboard provides the screenshot function, these screenshots can be stored in the USB flash drive.
Another important feature of UEFI is to run applications under UEFI, which usually end with efi. UEFI can be used to directly identify the files in the FAT partition and run the application directly. We can make the Windows installer into an efi application, and then put it in any FATA partition to run it directly.
The modular design of UEFI is logically divided into two parts: hardware control and OS (operating system) software management. Hardware control is shared by all UEFI versions, OS software management is actually a programmable open interface. With this interface, motherboard manufacturers can implement a variety of functions. For example, the various backup and diagnostic functions we are familiar with can be implemented through UEFI, and the motherboard or firmware manufacturer can use them as a major selling point of their own products. UEFI also provides powerful networking functions. Other users can perform reliable remote fault diagnosis on your host, which does not need to enter the operating system.
Of course, because UEFI is mainly written in the advanced language (C language), compared with the traditional BIOS assembly language, uefi bios is weaker in terms of security protection than the traditional BIOS and is vulnerable to virus attacks, security needs to be further improved. However, in the face of graphical interfaces and application extensions, uefi bios is still very successful.
One More Thing...
After talking about MBR/GPT partition table and uefi bios, we will introduce how to install Windows in UEFI. The above section describes that UEFI and GPT are complementary. If you install Windows in UEFI mode, the hard disk partition table must be GPT.
Remarks: To be compatible with MBR partition tables, the motherboard generally provides options for Legacy BIOS and uefi bios boot mode. To install Windows in UEFI mode, you must enable UEFI boot mode.
Currently, 64bit Windows Vista, 7, 8, 8.1, and 10 support GPT partition tables, while Windows 8, 8.1, and 10 support UEFI native. When installing these systems: as long as the hard disk is set to GPT partition table + the motherboard is set to UEFI boot, you can directly start to install the operating system.
For Windows Vista and 7 systems, you need to manually add UEFI support. We can find a Windows 8 or 10 installation image and extract Bootmgfw from the installation file. rename the efi file to BOOTX64.EFI and copy it to \ EFI \ Boot \ In The win7 installation file. If there is no BOOT folder, create a new one.
So far, the installation of Windows in UEFI mode has come to an end. If you have any questions, please comments below.

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.