Example of Linux using Fdisk to add partitions

Source: Internet
Author: User

Examples of adding partitions using Fdisk;

In this example we will add two 200M primary partitions, the others are extended partitions, we add two 200M-size logical partitions in the extended partition

Command (M for help): P Note: Lists the partition table;
disk/dev/sda:1035 MB, 1035730944 bytes
Heads, Sectors/track, cylinders
Units = Cylinders of 16128 * 8257536 bytes
Device Boot Start End Blocks Id System
Command (M for help): N Note: Add partition;
Command Action
E Extended
P primary partition (1-4)
P Note: Add primary partition;

Partition number (1-4): 1 Note: add primary partition 1;
First cylinder (1-125, default 1): Note: Direct carriage return, primary partition 1 start position, default is 1, default is good;
Using Default value 1
Last cylinder or +size or +sizem or +sizek (1-125, default): +200m Note: Specify the partition size and +200m to specify a size of 200M
Command (M for help): N Note: add a new partition;
Command Action
E Extended
P primary partition (1-4)
P Note: Add primary partition

Partition number (1-4): 2 Note: add primary partition 2;
First cylinder (26-125, default 26):
Using Default Value 26
Last cylinder or +size or +sizem or +sizek (26-125, default): +200m Note: Specify the partition size and +200m to specify a size of 200M
Command (M for help): N
Command Action
E Extended
P primary partition (1-4)
E Note: Add extended partition;
Partition number (1-4): 3 Note: specified as 3, because the primary partition has been divided by two, this is also the primary partition, starting from 3;
First cylinder (51-125, default 51): Note: direct carriage return;
Using Default Value 51
Last cylinder or +size or +sizem or +sizek (51-125, default 125): Note: Direct carriage return, all the rest of the space to the extended partition;
Using Default Value 125
Command (M for help): P
disk/dev/sda:1035 MB, 1035730944 bytes
Heads, Sectors/track, cylinders
Units = Cylinders of 16128 * 8257536 bytes
Device Boot Start End Blocks Id System
/DEV/SDA1 1 201568+ Linux
/dev/sda2 201600 Linux
/dev/sda3 604800 5 Extended
Command (M for help): N
Command Action
L logical (5 or over)
P primary partition (1-4)
L Note: Add logical partition;
First cylinder (51-125, default 51):
Using Default Value 51
Last cylinder or +size or +sizem or +sizek (51-125, default): +200m Note: Add a partition with a size of 200M;
Command (M for help): N
Command Action
L logical (5 or over)
P primary partition (1-4)
L Note: Add a logical partition;
First cylinder (76-125, default 76):
Using Default Value 76
Last cylinder or +size or +sizem or +sizek (76-125, default): +200m Note: Add a partition with a size of 200M;
Command (M for help): p lists the partition table;
disk/dev/sda:1035 MB, 1035730944 bytes
Heads, Sectors/track, cylinders
Units = Cylinders of 16128 * 8257536 bytes
Device Boot Start End Blocks Id System


Then we change the partition type by the T-command according to the previous.

Finally don't forget W save exit

This article is from "Rain" blog, be sure to keep this source http://gushiren.blog.51cto.com/3392832/1674050

Example of Linux using Fdisk to add partitions

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.