Saturday, October 22, 2016

Using Diskpart to Create Primary or Extended Partition

Using Diskpart to Create Primary or Extended
Partition
Why need to create partition?

Windows users know that many computers’ disks are not in
the best state at the first time. If you haven’t partitioned
your disk after you installed the system, you will find that the
disk seems not reasonable. You may want to partition a part
from the disk to put the data specially, thus, creating a
partition for your computer is necessary.
Diskpart is a disk partition management command line tool
built-in all Windows versions, such as Windows 10, Windows
8, Windows 7. You can use diskpart to create primary/logical/
extended partitions for your computer. Using the command-
line can totally replace the Windows interface.

Create partition using Diskpart
Diskpart provides three types of create partition, so it has
three different commands.
1. First, open a Command Prompt. Click Start -> All programs
-> Accessories -> Command prompt. Type: diskpart , or press
“WIN+R”, and type “cmd”.
2. At the Diskpart prompt, type: list disk
All the disks in current system will be listed so that you know
the disk number on which you want to create a partition.
3. Type: select disk n
n means the number of the disk. To create a partition, please
make sure there is unallocated space on the disk you select.
4. After selecting disk, type one of the following according to
your requirements.
create partition primary [size=n] [offset=n] [ID=byte | GUID]
[noerr]
or
create partition extended [size=n] [offset=n] [noerr]
or
create partition logical [size=n] [offset=n] [noerr]
5. Type:
assign letter=H
Assign letter can allocate the partition a name.
For example: how to create a primary partition with Diskpart?
You can see as the following example.
You can change the step4’s command to create other types
of partition. Is this the only way to create partition? No!
Diskpart alternative AOMEI Partition Assistant
Diskpart is a great disk management tool, but it does have
many limitations.
● To perform it on the computer, you must be a member of
the Backup Operators group, Administrators group, or you
must have been delegated the appropriate authority.
● You can create primary/extended/logical partitions only on
basic disks.
● You cannot create partitions on removable media.
To overcome those limitations, find a software to replace it is
an effective way. Fortunately, the AOMEI Partition Assistant
is a good software which provides both interface and
command-line to partition disks. To create partition with
CMD, AOMEI Partition Assistant can do it in simpler
commands.

How to create partition with AOMEI Command-line?
1. Open the command prompt by clicking Start and typing
“cmd” or pressing “WIN+R” and typing “cmd”. Then, type: cd
C:\Program Files\AOMEI Partition Assistant Standard Edition
5.8, and press Enter.
2. Type “list” to list all the disks. Then, type: partassist.exe /
hd:n /cre /pri /size:50GB /fs:ntfs /align /label: Data /letter:H
This will create a primary partition as the screen shot below.
If you want to create an auto size partition using the first
block of unallocated space on a disk, type the following
command at the command prompt:
partassist.exe /hd:n /cre /pri /size:auto /end/ fs:ntfs /align /
label:DATA /letter:E
If you want to create partition using offset, type:
partassist.exe /hd:n /cre /pri /size:n /offset:n /fs:fat32 /act /
align /label:DATA /letter:F
Notes:
> "/hd" followed by disk number, which starts with 0.
> The value of "/size" can be auto or specified size in MB by
default, and GB is also available.
> "/fs" means file system, whose value can be fat16, fat32 or
ntfs.
> "/pri" means creating a primary partition.
> "/end" means creating a specified size back end partition
using the unallocated space at the end of a disk.
> "/act" means creating an active partition.
> "/hide" means creating a hidden partition.
> "/letter" means assigning a drive letter to the partition.
> "/offset" means creating a partition from the location of
specified offset, starting with the beginning of the disk.
> "/label" means setting a label for the partition.
AOMEI partassist.exe uses the very simple command so that
it can be used more easy than Diskpart, you do not need to
list every disk every time, just do it with the whole
commands.
In case of any error please contact .

No comments:

Post a Comment