GPT partition under Linux, using the parted command

Source: Internet
Author: User

The GPT partition under Linux, which is another partition for MBR partitioning, has many advantages:

(1) Almost break the limit of the number of partitions.

Up to 128 primary partitions can be supported in a GPT partitioned table.

(2) The capacity of a single partition is almost unlimited.

A single partition supports a maximum of 1EB capacity.

Therefore, the concept of logical partitioning in the GPT partition, the primary and extended partitions, is already blurred. It's not even necessary to call it that. Actually, we know.

The reason why the extended partition exists is to solve the limitation of the number of partitions in the MBR. Since in GPT, the number of partitions is almost no

Limitations, then these concepts are of course blurred.

Well, don't say much nonsense, explain the steps of GPT partitioning.

is still new to join a hard drive, we want to partition it. The tool used is "parted", this tool can do both MBR partition, but also can do

GPT partition. Of course, it is mainly used to do GPT partition, below the beginning of the partition bar.

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

As usual, let's take a look at parted's help for this tool, and type assist as follows:

Help information a lot, can not fully show, in short, carefully read the Help information to help us partition.

Select the newly added hard drive, here, its name is/dev/sdb. Select this device to enter the partition:

Next, to select the format of the partition table, it should be selected as GPT format. Indicates that we are a GPT partition, type "Mklabel GPT", as follows:

Well, the key moment is up, in parted, you can choose either interactive partitioning (that is, a way to ask and answer), or you can choose

command of the way, a word to fix. Let's start by partitioning it in an interactive way.

Type the command Mkpart, as follows:

This is where we give the partition a name. Because the primary partition is blurred in the GPT partition and the concept of extended partitioning is not defined,

So the name of the partition can come up at will. A name "Fuly", as follows:

And let you choose the type of file system, here, regardless of the default. Press the ENTER key directly, as follows:

Here is the starting point for the size of the input file. Note that this differs from the starting point in the MBR partition. The starting point for the actual file size is entered here.

For example, I want to give this partition 2000M, then its starting point here is 0, type 0, as follows:

This again lets the input end point, enter 2000. As follows:

Altogether pop-up warning, probably means that the storage on the disk does not achieve the best alignment, the reason is that our starting point starts from 0.

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

This way, the partition is completed in one step. So let's see if this partition exists, type print, as follows:

From here, we see the partition fuly we just created. You can also see that its size is actually 1999MB.

The above is partitioned in an interactive way, simple. Let's take another partition and partition it using the command line. As follows:

is not simpler, in fact this command means to create a partition named Kun, the size of 1000M, the starting point is 2000 (

Because we just finished at 2000), the end point is naturally 3000.

So did the partition succeed? Then check it out with print, as follows:

The partition Kun exists.

Well, assuming we need two partitions, the partition is done. How do I save the exit?

Just type quit. As follows:

Well, unlike MBR, which is also useful w to write to a partitioned table, GPT takes effect directly when it exits with quit.

This way our entire division work is done.


We have used the "fdisk-l" command to view the partition of the hard disk, now try again, as follows:

We found that we were not able to see the partition information we had just now. Because the Fdisk tool cannot be used to view the details of the GPT partition type.

You can only view partition information (that is, MBR partitions) of the MSDOS type. So how do you look at it? Or you want to use the parted tool. First select a sub-partition such as GPT

's hard drive, then print. You can simply type the command "Print all" below:

GPT partition under Linux, using the parted command

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.