One of the most common actions with hard drives of any type is to format them. There may be a lot of situations when a logical partition or hard drive requires formatting. But in some cases, in particular with respect to the system partition, the standard procedure cannot be performed using Windows. In this case, the command line is used (take Windows 10 as an example), which can be started by booting from removable media. Next, we will consider several options for carrying out the formatting process both in the operating system environment and when booting from an optical disk or a conventional flash drive.
Formatting the hard drive through the command line: why is this needed?
First of all, it is worth saying that absolutely all experts note the fact that formatting is best done from the command console, despite the fact that the system itself has its own tool.
Firstly, you can apply additional attributes to the basic formatting commands, which, in addition to carrying out the process itself, allow you to perform some additional actions. Secondly, the console becomes absolutely indispensable when reinstalling the operating system, fixing crashes or when the hard disk does not open, for example due to damage, and loading the OS becomes impossible. When critical failures appear on the hard drive, whether you want it or not, you cannot do without full formatting. Some users try to apply fast formatting, however, as practice shows, it can only clean the table of contents and ultimately, when you need to bring the hard drive to life, it turns out to be far from the best tool, unlike full formatting.
How is the Windows 10 command prompt called?
To begin, consider calling the console itself. There are a few simple ways on any Windows system.
The most used and most common method specifically for Windows 10 is to use the special Run menu, in which the cmd command is entered . In systems of a lower rank, this option can also be used, but before, a link to the console was displayed directly in the main menu, called through the Start button, but this is not the case in the tenth modification.
An equally simple way is to enter a query in the search field, which can be called up from the right-click menu on the "Start" button. Here, the console can simply be started, or you can start via PCM on behalf of the administrator (working with the command line very often requires administrator rights, especially for any critical actions with respect to the hard drive and the operating system itself as a whole).
Finally, in the standard Explorer, you can open the System32 directory located in the main system directory and start the cmd.exe file using the methods shown above (opening the file as administrator).
When booting from removable media (installation, recovery disks or USB-drives) in most cases the combination Shift + F10 is used.
Some nuances of disk access
Immediately I would like to draw the attention of all users at that time that even when using the cmd.exe applet, formatting the system partition will fail. This is understandable. Well, the system cannot format the drive on which it is located.
Therefore, formatting the hard disk via the Windows command line in the environment of the operating system itself is applied exclusively to logical partitions, removable media (including USB HDD), as well as to other hard drives installed on the computer (RIAD arrays). By the way, even if the operating system is not installed on drive C, but, for example, in partition D, formatting of the first partition will still be unavailable, since the primary BIOS system accesses this partition when it boots, and in any case there are files necessary to run the OS.
Standard logical partition formatting
Now directly about the process itself. While we will not touch the system partition, but dwell on logical and additionally installed disks of any type.
After calling the console in the simplest case, formatting the hard disk through the command line is performed using the universal format command, after which a letter of the disk or colon is entered after a space. For example, the disk in the system is indicated by the letter H. The command in this case will look like "format h:".
This is the full formatting of the hard drive via the command line, although you can use another method, which will be described in more detail below.
Additional attributes of the format command
As already mentioned, this command is good in that you can add additional attributes to it, due to the application of which some other actions can be performed.
You can view the full description of all possible options for executing the command in the console itself, if you enter the line format /? (this command opens the full list of additions). There are a lot of attributes, but among all separately it should be noted quick formatting with input after the main / q command, formatting with the installation of a certain file system, for example fs: ntfs, as well as using the V: NAME combination to specify the volume label, where NAME is an arbitrary disk name or section.
Booting from removable media and calling the command line
In situations where there are problems with access to the system partition, in particular, the hard disk does not open, you can format it (if other troubleshooting methods do not help), you can only from the command console that was started when booting from removable media. One of the most revered tools is considered to start with LiveCD.
Formatting the hard disk via the command line, accessed by the combination of Shift + F10 (from the recovery console or without it), can be done with the same format command with the letter of the system partition and setting additional formatting options.
Using the diskpart tool
However, as most experts recognize, it is not always appropriate to use a standard team. Another method is considered more effective, although in most cases it is customary to use it for removable USB devices, including USB hard drives, from which you need to make a boot device.
In this case, formatting the hard disk via the command line (diskpart) begins with the command of the same name, after which the list disk combination is entered to view all the drives installed in the system.
All disks are marked not with letters, but with numbers. Therefore, some users are faced with the problem of identifying their device. The easiest way is to recognize it by the indicated size (obviously you canβt confuse the same USB flash drive with the hard drive).
Next, to select a disk, use the select disk X command, where X is the number of the desired disk from the list. After that, the clean line cleans up the contents of the medium, and then the primary partition is created (create partition primary command). After that, the current partition (select partition 1) is again selected and activated (active). This command is not always applied. When you initialize a disk that is not planned to be bootable, you can skip it.
Only at this stage does the direct formatting of the active primary partition begin, indicating the preferred file system, for which the format fs = ntfs (or fat32) command is used. If you need to perform quick formatting, quick is added to the line with a space. But to achieve the optimal result, it is not worth using it.
At the end of the process, you must assign a volume label to the partition (device). This is done with the assign command (a letter will be assigned to the device automatically). After that, it remains only to transfer the installation distribution files to the created drive.
Third Party Utilities
If someone doesnβt like such methods, any freeware program for formatting a hard disk like Acronis Disk Director, HDD Low Level Format Tool, Partition Magic, Paragon Hard Disk Manager, etc. can be used to simplify the work.
True, they are all equipped with a graphical interface, and we are not talking about using the command console, although it will be much easier for many users to work with such utilities. But, since in this case it is the use of the command line that is considered, it makes no sense to dwell on such utilities and their capabilities.
Conclusion
As a result, it remains to say that using the console, which introduces commands specially provided for in Windows systems, which, incidentally, migrated to these OSes from DOS, is not particularly difficult. In addition, it is the command line that allows you to eliminate a great many problems, which are not always possible to fix with Windows tools and system tools. And the formatting process itself is a cut above that if it were launched in the operating system environment. It's no secret, after all, that quite often you can see the appearance of a message stating that Windows for some reason cannot complete formatting. And when working with the console, such problems practically never arise. And that is precisely why in most cases it is recommended to perform all processes related to cleaning, formatting disks and partitions, preparing bootable media, etc. using standard console commands and not other built-in system tools.