GPT partition in Linux

Source: Internet
Author: User

GPT partition in Linux

GPT partition in Linux. This is another partition. For MBR partition, it has many advantages:

(1) It almost broke the limit on the number of partitions.

A gpt Partition Table supports a maximum of 128 primary partitions.

(2) there is almost no limit on the capacity of a single partition.

A single partition supports a maximum capacity of 1 EB.

Therefore, in GPT partitions, the concept of primary partitions, extended partitions, and logical partitions is vague. This is not even necessary. Actually, we know that

Extended partitions exist to solve the limit on the number of partitions in MBR. In GPT, the number of partitions is almost no

Restrictions, so these concepts are vague.

Well, let's talk about the GPT partition steps.

We still want to partition a new hard disk. The tool used is "parted". This tool can be used for both MBR partitioning and

GPT partition. Of course, we should mainly use it for GPT partitioning. Let's start partitioning.

On the command line, type "parted" as follows:


Old Rules: Let's take a look at the help information of parted, and type help as follows:


There are a lot of help information that cannot be fully presented. In short, carefully reading help information can help us partition.

Next, select the new hard disk. Here, its name is/dev/sdb. Select this device to enter the partition:


Select the partition table format as the gpt format. It indicates that we are a GPT partition, and type "mklabel gpt" as follows:


Okay, the key moment is now. In parted, you can select interactive partitions (that is, you can answer questions) or

Command method. Let's use the interactive partitioning method.

Type the mkpart command as follows:


Here is a name for the partition. Because GPT partitions blur the primary partition and extend the partition concept, there is no such rule,

Therefore, the partition name can be used as needed. You can name fuly as follows:


Let you select the file system type. You can leave it alone by default. Press enter as follows:


Here is the starting point for the input file size. Note: This is different from the starting point in the MBR partition. Here, we enter the starting point of the actual file size.

For example, if I want to differentiate this score by 2000 MB, the starting point is 0 here, and enter 0, as shown below:


This is to let the input end point, Enter 2000. As follows:


A warning is prompted, which probably means that the storage on the disk has not reached the best alignment mode. The reason is that our starting point starts from 0.

If you don't understand it, remember. Here we cancel and start from 1. As follows:


In this way, the partition is completed after another step. Then let's see if this partition is correct. Type print as follows:


The created partition fuly is displayed. The actual size is 1999 MB.

The above is partitioned using an interactive method. It's easy. Next we will create another partition and use the command line method for partitioning. As follows:


Is it simpler? In fact, this command is used to create a partition named kun with a size of 1000 M and a starting point of 2000 (

Because our last point is 2000.) The last point is 3000.

Is the partition successful? Take a look at it with print, as shown below:


The partition kun exists.

Well, suppose we need two partitions, then the partition is complete. How can I save and exit?

Just type quit. As follows:


Well, unlike MBR, which also uses w to write data to Partitioned Tables, GPT takes effect directly when exiting with quit.

In this way, our entire partition is complete.

++ ++ ++

We used the "fdisk-l" command to check hard disk partitions. Now we can try again, as shown below:


We can't find the partition information we just found. Because the fdisk tool cannot view detailed information about the gpt partition type.

Only msdos-type partition information (MBR partition) can be viewed ). So how to view it? You still need to use the parted tool. Select a partition like gpt.

And print it. You can directly type the command "print all". as follows:


This article permanently updates the link address:

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: 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.