ComputersSoftware

DiskPart: commands for Windows

Let you not be afraid of the name of this command and the use of the command console as such. DiskPart commands (meaning the attributes entered with the main line) 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.

However, if anyone does not know, it's impossible to create a partition without formatting. 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 possibility of any DiskPart command is not limited. The point is that even when you restore the system from the console or the command line when booting from removable media, this tool allows you to eliminate many problems that can not be fixed by usual means.

So, for example, sometimes even at the stage of installing the OS it 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.

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 a GPT format, although it does not exceed a 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 not the most important thing. The first issue is the issue 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 system tools, you can simply register the name of the command itself, then enter a question mark ( diskpart /? ) Through the space and the right slash. 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 partition the selected partition, use the create partition logical size = XXXXXX line , where XXXXX is the size of the logical disk being created in megabytes.

Naturally, the system should see a section marked with a specific literal in the file manager. To do this, use the assignment letter = X command, where X is an unused literal. It means that if you assign a new partition, for example, the letter F or E , under which the OS recognizes a removable USB-drive and a 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 to the seventh, 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.

About any formatting with a choice of file system the question 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 this tool. 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.

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

The clean line deletes the entire contents of the partition, then the command create the primary boot record create partition primary , then select select partition 1 (specify the number of the created partition), then the partition is activated by the active line and finally formatting is done - format fs = ntfs if needed This is the file system.

But the above command produces complete 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 partition must be assigned to the letter with the assign command, after which it is possible to exit the command console either by its normal closing or by typing the exit line, which contributes to the correct completion of its operation.

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 disk as a combination of chkdsk from this is not insured). What to do in this case?

Here you can enter the clean and convert mbr after the 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, DiskPart commands do not present anything difficult to use. 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 use 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.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.unansea.com. Theme powered by WordPress.