Linux partition command Follow-up

Source: Internet
Author: User

sudo fdisk-lsudo fdisk/dev/sdb

Help command

Command (mfor help): m

Command Action
A toggle a bootable flag
b Edit BSD Disklabel
C Toggle the DOS compatibility flag
D Delete a partition
L list known partition types
M Print this menu
n Add a new partition
o Create a new empty DOS partition table
P Print the partition table
Q Quit without saving changes
s create a new empty Sun Disklabel
t change a partition ' s system ID
U Change display/entry units
V Verify the partition table
W Write table to disk and exit
X Extra functionality (experts only)

Command (M for help): P

disk/dev/sdb:16.1 GB, 16131293184 bytes
255 heads, sectors/track, 1961 cylinders, Total 31506432 sectors
Units = sectors of 1 * MB = bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

Device Boot Start End Blocks Id System
/DEV/SDB1 2 614457 307228 b W95 FAT32
/DEV/SDB2 614459 12001823 5693682+ af hfs/hfs+

Delete Patition

Command (M for help): D
Partition number (1-4): 1

Command (M for help): P

disk/dev/sdb:16.1 GB, 16131293184 bytes
255 heads, sectors/track, 1961 cylinders, Total 31506432 sectors
Units = sectors of 1 * MB = bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

Device Boot Start End Blocks Id System
/DEV/SDB2 614459 12001823 5693682+ af hfs/hfs+

Command (M for help): D
Selected Partition 2

Command (M for help): P

disk/dev/sdb:16.1 GB, 16131293184 bytes
255 heads, sectors/track, 1961 cylinders, Total 31506432 sectors
Units = sectors of 1 * MB = bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

Device Boot Start End Blocks Id System

New Patitioin

Command (M for help): n
Partition Type:
P Primary (0 primary, 0 extended, 4 free)
E Extended
Select (default P): p
Partition number (1-4, default 1): 1
First sector (2048-31506431, default 2048):
Using Default Value 2048
Last sector, +sectors or +size{k,m,g} (2048-31506431, default 31506431):
Using Default Value 31506431

Command (M for help): P

disk/dev/sdb:16.1 GB, 16131293184 bytes
255 heads, sectors/track, 1961 cylinders, Total 31506432 sectors
Units = sectors of 1 * MB = bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

Device Boot Start End Blocks Id System
/DEV/SDB1 2048 31506431 15752192-up Linux

Change Patition type

Command (M for help): t
Partition number (1-4): 1
Hex code (type L to list codes): b
Changed system type of partition 1 to B (W95 FAT32)

Command (M for help): P

disk/dev/sdb:16.1 GB, 16131293184 bytes
Heads, 6 sectors/track, 109397 cylinders, total 31506432 sectors
Units = sectors of 1 * MB = bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

Device Boot Start End Blocks Id System
/DEV/SDB1 2048 2000000 998976+ b W95 FAT32
/DEV/SDB2 2000001 30000000 14000000-up Linux
/DEV/SDB3 30000001 31506431 753215+-up Linux

Command (M for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 87
Changed system type of partition 2 to (NTFS volume set)

Command (M for help): P

disk/dev/sdb:16.1 GB, 16131293184 bytes
Heads, 6 sectors/track, 109397 cylinders, total 31506432 sectors
Units = sectors of 1 * MB = bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

Device Boot Start End Blocks Id System
/DEV/SDB1 2048 2000000 998976+ b W95 FAT32
/DEV/SDB2 2000001 30000000 14000000 NTFS Volume set
/DEV/SDB3 30000001 31506431 753215+-up Linux

sudo mkfs-t ntfs/dev/sdb2

Cluster size has been automatically set to 4096 bytes.
Initializing device with zeroes:3% ....

Linux partition command Follow-up

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.