/ / DiskPart: commands for Windows

DiskPart: commands for Windows

Let it not scare you the name of this team andusing the command console per se. The DiskPart commands (meaning the attributes entered along with the main string) allow you to use such powerful tools of Windows operating systems that are not available in the standard mode.

For what this tool is used and how to use it, read on. The information is useful to all those who are going to perform the administration of hard disks or the creation of new sections.

DiskPart commands: what is it and why are they needed?

The most important purpose of this tool is that its application allows (based on their elementary understanding of the reduction) to break up hard disks into logical partitions.

diskpart commands

However, if someone does not know, create a section withoutformatting is impossible. And if it concerns a system partition, it must necessarily contain a boot record, thanks to which the operating system and starts after checking the "hardware" in the BIOS.

But only this is possible for any DiskPart commandnot limited. The point is that even when restoring the system from the console or the command line when booting from a removable media, this tool helps to eliminate many problems that can not be fixed by conventional means.

So, for example, sometimes even at the stage of installing the OSit is necessary to convert the partition into which it will be installed (most often this is due to the boot from USB-drives or the choice of hard disks larger than 2 TB). Typically, the system displays a message stating that the installation to the selected GPT partition is not possible, because there is no support for the MBR boot record.

diskpart is not an internal or external command

To get rid of this can be quite simple, using the BIOS settings with the choice of a drive that does not have an EFI label.

But what if the selected partition really does have the GPT format, although it does not exceed the capacity of 2 TB? In this case, DiskPart commands are used to convert from GPT to MBR.

And partitioning the hard drive into logical partitions is notthe most important thing. The first issue is the question of formatting and creating an active boot record (for example, when replacing a hard disk or installing an additional hard drive for RAID arrays).

Getting information about features and attributes

To use this tool, you first need to call the command console. Whether you like it or not, it works this utility built into the system in this way.

In the command console, as well as for all other tools of the system, you can simply register the name of the command itself, then enter a question mark (space and right slash)diskpart /?). The screen displays all available attributes for use. But in this case we are only interested in some of them.

Script Support

In the simplest way, selecting a partition in the DiskPart command makes it fairly simple. To split a selected partition, use the string create partition logical size = XXXXXX, where XXXXX - the size of the created logical disk in megabytes.

diskpart conversion commands from gpt to mbr

Naturally, the system should see a section marked with a specific literal in the file manager. For this, the command assign letter = X, where X is an unused letter. It means that if you assign a new section, for example, a letter F or E, under which the OS recognizes removable USB-media and DVD / CD-drive, then either they will not work then, or the created partition will be inactive.

DiskPart Windows Commands for Previous Versions

As for the modifications of Windows-systems up toseventh, the use of this command is radically different. The trouble is that in systems of lower rank (like XP, 2000 or Server 2003) this utility can only partition disks or delete them.

Not about any formatting with the choice of filesystem issue is not even worth it. But in Windows 7 and higher, this problem is eliminated by using the initially included in the program formatting tools for disks and partitions, and with support for even mobile OS.

The simplest algorithm for using the console command

Now about the practical use of thistool. Initially, the command line is invoked. If it is run in a running system, it is mandatory to start on behalf of the administrator. If it's a recovery console when booting from an external media, it does not matter.

of the command diskpart windows

First of all teams start diskpart and list disk (in some cases, you can use the addition volume to view the letters of the selected section). The first activates the main tool, the second provides information on all disks and partitions in the system. The partition selection command in DiskPart looks like this: select disk X, where X - the number of the partition or disk specified when viewing all available.

command to select a partition in diskpart

Line clean removes the entire contents of the partition, then uses the command to create the primary boot record create partition primary, then the line select partition 1 (indicating the number of the created partition), then the partition is activated by a line active and, finally, the formatting is done - format fs = ntfs, if you need this particular file system.

But the above command produces full formatting. If you do not want to waste time, you can add quick at the end of the line, which corresponds to fast formatting.

Now it's a little thing. The created section must be assigned to the letter with a command assign, after which you can exit the command console either by its normal closing, or by entering a line exit, which contributes to the correct completion of its work.

Possible errors and failures

But not always everything happens so smoothly. Sometimes you can find situations when the system displays a message stating that DiskPart is not an internal or external command. This can be observed when starting the boot from removable media when selecting the GPT partition (by the way, and checking the drive as a combination chkdsk from this is not insured). What to do in this case?

diskpart commands

Here you can enter the cleaning and transformation (clean and convert mbr) after the disk selection line (select disk). It is claimed that this process can take several hours, but it works, as they say, one hundred percent. But to use such a tool is necessary only if there is no information on the disk. Otherwise, all data will be destroyed.

In general, the DiskPart command is nothing complicatedin use do not represent. Here the most important thing is to observe the input sequence from the algorithm described above, naturally, taking into account some additional parameters. And notice, the application of this tool can solve not only the problems of partitioning disks into logical partitions, but also the issues of formatting or eliminating some critically dangerous failures. But that is another topic.

</ p>>
Read more: