Formatting an external hard drive from the command line. How to format a hard drive: methods

Greetings to all readers of my blog, Denis Trishkin here.
When using a computer for a long time, sooner or later the need arises Windows reinstallation. This can be done in several ways. The correct one is the one before which you need to do formatting hard drive. In this article I will tell you exactly how this happens, and also introduce you to the main concepts.

So what is formatting? Even at school, this process was presented as a division into sectors and tracks, with the loss of all information previously recorded on the storage medium. In the realities of today's technological world, formatting is the process of marking an electronic storage medium, regardless of its shape and structure, be it optical or HDD, memory card, flash drive.

To put it simply, the process involves erasing all existing files in a specified area. At the same time, when new ones appear, they are already placed on top in a seamless manner. Because of this, access to them will be easier in the future, and, consequently, the speed of processing requests will decrease. OS and individual programs will work faster.

File system types( ^)

Before moving directly to familiarization with the process itself, it is important to introduce you to such a concept as file system and its types. So, it is a table that indicates the order of storing, recording and naming information on media. In other words, it is responsible for all processes related to transferring and reading data.

There are several most famous and used types:


Formatting process( ^)

We immediately need to clarify that we are talking about formatting before Windows installation. Therefore, we will talk about working with hard drives, and not with other data storage devices.

This process consists of three stages:

    1 Low-level formatting is considered the most important. During this process, the information storage area is marked. This is carried out directly during the manufacture of the hard drive. With low-frequency formatting, all the structures necessary for operation are created in the corresponding area. These include:

    • tracks (tracks);

    • information management program.

    In the future, during the entire use of the media, this markup does not change. Many utilities that claim to be able to do low-level formatting actually don't do this. At best, they only prescribe new program management.

    2 Partitioning. During this process, the entire volume of the hard drive is divided into logical parts (most often they are called letters of the Latin alphabet: C, D, E and others). This is done by the built-in services itself. operating system or third party programs. The process is optional - you can skip it - the media will only have one partition. But due to the fact that modern hard drives have large amounts of memory, they are usually divided into logical partitions.


    increase

    3 High-level formatting. During the process, logical structures are formed that are responsible for storing files. This type is divided into two types:

Formatting methods before installing a new system( ^)

There are only a few ways to format before installing new Windows:

Step-by-step instructions for formatting with built-in capabilities( ^)

It should be noted right away that I will talk about Windows 7, 8, 10, because previous versions Microsoft has stopped supporting it. So, when, during the installation of a new operating system, you reach the disk selection point, you need to:


The built-in tool allows you to format the disk only in a quick way.

However, it does not provide additional functions. That is why many specialists use special formatting programs that work even without an installed operating system. The above is considered the most convenient Acronis Disk Director. This application is paid, although there is the possibility of temporary use.

Formatting using Acronis Disk Director( ^)

To use the application you need:

    1 Download the program image file using a torrent tracker.


    increase

    2 Write the downloaded image to a USB flash drive


    increase

    3 Using the BIOS, check that the system boots first from the flash drive, press the F10 button and agree.


    increase


    increase

    4 After rebooting, confirm working from the flash drive.

    5 A black screen appears where you need to select full version Acronis Disk Director.


    increase

    6 On the pop-up window, mark “manual” mode.

    7 After this, select the section and click on the item in the left menu.


    increase


    increase

    9 After this, the program sends us to the initial partition selection window. This is necessary to make additional changes. But since we are only formatting the disk on which Windows will later be installed, we click on the checkbox.


    increase


    increase

    10 We are waiting for the process to complete. After this, you can exit the program and continue installing the OS. In this case, there is no longer any need to format the disk with the built-in program.


    increase

Formatting via the command line( ^)

Almost no one uses this method, since the methods described above are sufficient for most. But sometimes there are situations when he is the only one left. enlarge(^)

Several times I encountered situations where malicious software(aka virus) damaged system files on your hard drive. As a result, the operation of important mechanisms is disrupted, which leads to a formatting error in the standard utility. It turns out that in order to cope with the “infection”, you need to install a new Windows. And it won't make sense without formatting.

The situation can be resolved using a third-party computer. An infected hard drive is connected to it and standard system cleared. To do this, after booting the system in the section " My computer"you need to select the damaged partition, click on it right click, and then select the appropriate menu. Specify the file system, cluster size, and volume label.


increase

After hard formatting The disk is installed on the original computer and Windows is installed. Sometimes during this, the system requires you to re-divide the partition into sectors and tracks. Don't worry - this is normal.

Formatting your hard drive before installing Windows is an important step. If you don't do it, a new version will work with errors and most likely not for long.

I hope this article will clarify for you the main issues that are associated with the formatting procedure. Subscribe, recommend me to your friends and along with you become computer literate.

When installing the operating system, as well as when changing files or redistributing space between partitions, you need to clean out the hard drive. This is a fairly common operation performed by PC users. If you haven’t done anything like this before, then let’s look at the theoretical part of the question.

What is the formatting process?

Marking areas for storing information, in which some of it is deleted, is called formatting. It creates a system for accessing stored information and is performed for:

  • changing one file system to another;
  • deleting files from disk space.

On this moment exists a large number of various file systems. They are used on a variety of equipment, including not only computers, but also mobile devices. To work in the latest Windows versions The NTFS file system is used.

How to format a hard drive: detailed video instructions

Why delete files from disk?

Formatting is performed to delete files from the hard drive, as well as to change one file system to another.

Why clean your disk?

In most cases they resort to it:

  • before installing a new OS;
  • to create an installation Windows image, for example, on a flash drive;
  • due to the need to clean the disk from files if they are not needed.

Windows utilities for deleting files

Despite the large number of programs for working with disks, Windows OS has its own set of utilities.

Let's look at the process of formatting disks using Windows:

  1. select the disk that needs to be cleaned;
  2. press the right mouse button;
  3. select Format;
  4. in the window that appears, select the file system, cluster size, and formatting method;
  5. It is recommended to set NTFS as a file system, and leave the cluster size at the default – 4096;
  6. after installation required parameters you should click Start.

Windows also includes more full service for working with a hard drive.

To open this menu, do the following:

  1. right-click on My Computer;
  2. select Management;
  3. open Disk Management;
  4. V this menu the user can perform various operations with hard drive.

You can perform this operation using command line:

  • Press the key combination Win+R;
  • enter cmd and press Enter;
  • in the command line we write the command format y:, where y is the letter of your drive, maybe, for example, c or d;
  • the system will ask you to confirm the operation by pressing the Y key;
  • after confirmation, the system will begin the cleaning process;
  • When finished, this message will appear



If you need to format a disk partition from the BIOS, you will have to tinker a little. Unfortunately, the BIOS does not have tools for this purpose, so you should use third party software to perform these operations.

One of the most common is Acronis Disk Director. To work with it, you need to create bootable media in the operating system with the files of this program. But before you start creating bootable media, you should consider another option - formatting using Windows Installer. This solution is a simpler option compared to Acronis Disk Director.

For this method All you need is a disk or flash drive with a recorded Windows installation package, and you also need to perform the following steps:


Attention! The drive partition letters may not match. For a more precise definition required disk use the wmic logicaldisk get deviceid, volumename, size, description command.

To create a bootable flash drive you will need:


Algorithm of actions:

  1. insert the flash drive;
  2. install and open the program;
  3. in the application, open the Tools section and select Acronis Bootable Media Builder;
  4. click “Next”;
  5. select the Windows PE boot media type;
  6. in the next menu you should mark the necessary components for recording to a flash drive;
  7. After selection, you must select the media on which to record and click Next. The flash drive should be formatted in FAT 32 format using the Windows utility;
  8. you can also create an image for later burning to a flash device or disk using Ultra ISO.

To load a flash drive you need:


How to format an external file drive to NTFS

The most convenient formatting method is to do everything using standard utilities OS. This solution does not require additional software installations or creation of boot disks.

If you do not have an OS installed, then in this case you should use special programs, such as Acronis.

To run as ntfs:

Utilities

In addition to the standard ones, Windows has a variety of utilities used for the same purpose. The most common options include the following:


What is the best program to format drives in ntfs?

Each program has its own characteristics, but the main direction for all utilities remains the same - working with disks, including creating partitions, forming into others file systems etc. Therefore, their choice is a purely personal question for each user.

Problems and their solutions


  • format command - cannot be used for system disk, if she is in his environment;
  • if the OS is located in another section of the HDD, it cannot be deleted;
  • antivirus settings can block access to different partitions of the hard drive;
  • various applications and viruses can block access.

If you have removed the above factors, but still cannot start the process, you will have to resort to special programs. The most popular tool is HDDscan, which is easy to install and free.

Algorithm of actions:

  • download the utility;
  • open and install;
  • run as administrator;
  • click on the icon in the form of a sphere located in the center of the interface;
  • select Surface tests;
  • check the box next to Erase;
  • go to the Add test tab;
  • click on Scan;
  • in the lower right corner, write down the error data;
  • set the EraseWAITs option to ON and select Scan again;
  • repeat until the error is cleared.

You can also use Acronis Disk Director. If it is impossible to format a portable drive using this program, it is most likely partially damaged. And the entire procedure can sometimes be performed only from bootable media, that is, not in the operating system.

How to force format a flash drive?

You can use the HP USB Disk Storage Format Tool to clean flash drives.

How to format a write-protected drive? Simply, first open the command line and enter the following commands in it:

  1. diskpart;
  2. list disk;
  3. select disk Z. Z - flash drive number, execution of the previous command is shown;
  4. attributes disk clear readonly;
  5. clean;
  6. create partition primary;
  7. format fs=ntfs;
  8. exit.

Windows includes utilities that:

  • provide the necessary set of functions;
  • They have a fairly simple interface that will be easy for novice users to work with.

Hello everyone Today we will talk about how to format a hard drive using the command line. And you know what I’ll tell you here? This information, well, I mean hard formatting disk via the command line, then you definitely need to know this information! This information, so to speak, is included in the list of the most important information that a more or less advanced user should know.

My opinion is that everyone should be able to work with the command line. Well, not that everyone, but if suddenly your computer breaks down, then you need knowledge of how to use the command line, then this knowledge can be very, very useful to you, I’m telling you this honestly!

I think that you don’t need to say that formatting a disk will completely delete all the files on it, everything in general, and programs and all sorts of photos, music, everything will be deleted on the disk that you format! I hope that you understand this anyway, but I still had to write about it..

Okay guys, back to our topic, namely how to format a hard drive using the command line. This can be done both from Windows itself and when loading it, but the main thing is that all the actions are the same, you just need to clearly understand what’s what and that’s exactly what I’ll show you now. So look, if you do all this in Windows (but keep in mind that the system disk itself cannot be formatted, because it is Windows), then you need to hold down the Win + R buttons, the Run window will appear, there you write the cmd command and click OK :


Then a black window will appear, like this:


Well, I think that you already understand that this black window is the command line. Here you can enter all sorts of commands and do something. In general, you can do a lot of things. To see a list of all commands, you need to type the following command in the line:

And press enter, after which you will see this list of commands:


You can take any team, well, the very first one on the list is ASSOC, so we’ll take it. Well, you can take any command, then add a space to it and something like /? and then press enter and there will be a mini-instruction for this particular command. Well, look, I wrote the following command:

I pressed enter and this is what I thought:


Well guys, in principle it’s more or less clear, right? That is, in this way you can somehow learn to use the command line yourself. But of course this is a little boring, but what can you do? Today I will show you how to format a disk using the command line, for this you need to use the following command:

Yes, you can look at the help on it, I have already shown how, but I think it would be better if I personally tell you about it, since I myself have used it more than once. And I didn’t just use it, there is one feature in this command, you may not be interested in it, but I’ll tell you about it anyway...

So what do you need to do to format a disk using the FORMAT command? You need to write the following command:

FORMAT C: /FS:NTFS /X

This is a standard command, it will format the disk as usual, so to speak. Where the letter C is, then you indicate the drive letter there. Such as /FS:NTFS is necessary for the disk to be formatted in the NTFS file system, it is also possible in FAT32, but I recommend NTFS. Such as /X is necessary so that the disk is forcibly disconnected before formatting, this is just necessary to ensure that everything goes correctly. Attention, guys! This command does the usual formatting, that is, it’s not so fast, but if you need everything to go quickly, then you need to add the /Q key, that is, so that it’s like this:

FORMAT C: /FS:NTFS /X /Q

It will be much faster and you won't have to wait. Because without the /Q switch, formatting can take a long time if the hard drive is not small... well, there is one terabyte or more...

That seems to be it, right? But I wrote about a trick, what kind of trick? Now I’ll tell you everything guys.. The trick is that there is also such a key /A:64KB, this key is so that when formatting the cluster is changed. A standard cluster is 4KB, that is, 4 kilobytes. What general cluster size can be can be found in the help for the FORMAT command. What is a cluster? I won’t burden you, I’ll just say that a cluster is the minimum unit that can be occupied on a disk.

So, regarding the cluster, look. A 4 kilobyte cluster is usually installed on a hard drive. That is, if you have a file of 100 kilobytes, then it will be written in small parts of 4 kilobytes. Windows does not always write the entire file to one area at once. Usually part of the file is in one place, and another part is in another, this is called fragmentation and this is a normal phenomenon. Do you understand? As a result, we get this: if the cluster costs 4 kilobytes, then the file can have many parts and they can easily be scattered throughout the hard drive, and in order to read the file, it takes more time than if the file was written in one piece. If the cluster is 64 kilobytes, then a 100 kilobyte file will have only two parts on the disk, these are 64 kb and 64 kb, because these parts will fit the entire file. What remains, well, I mean two clusters are 128 kb, and the file is 100 kb, then nothing at all can be written to the remaining 28 kb, this is the only disadvantage of a 64 kb cluster. It seems that there are no more disadvantages, well, at least I don’t see them. A 100 KB file will only have 2 parts on a 64 KB cluster versus 25 parts on a 4 KB cluster, get it? Once again, about the disadvantage that I wrote, in other words, a 100 kb file on a disk with a 64 kb cluster will take up 128 kb of space. Because two clusters are 128 kb. Well, I hope it’s more or less clear, but if not, then I’m sorry, it means I’m not explaining it well..

In general, I personally always install a 64 kb cluster, I like it better, my mother also has a computer and I also installed a 64 kb one for her and the computer seems to work faster. But if you think about it, in theory it should work faster. A 64 kb cluster is the best cure for fragmentation, but does not eliminate it completely..

So what should the command be so that the cluster is 64 kb? I personally use this one:

FORMAT C: /FS:NTFS /X /A:64KB

A cluster of 64 kilobytes is the maximum size for a file NTFS systems. Well, you can also specify the /Q key to make formatting faster.

There is another joke. The fact is that there may be such a jamb that Windows does not want to be installed on a disk with a 64 KB cluster, there is such a thing. This is what I do here. At first I just stupidly install Windows, format the disk and everything is as usual. Then I reboot and go to system recovery and there I launch the command line, the system disk, well, that small, service disk of the type, it’s usually 500 MB, I DO NOT TOUCH it AT ALL. And the one where Windows is installed, then I put the FORMAT command on the command line and put a 64 kb cluster there and format it. Then I install Windows again, I don’t format ANYTHING in the installer, I just select the disk (which I formatted in a 64 KB cluster) and install it. As a result, Windows is easily installed on a disk with a 64 KB cluster

In fact, all this mess with clusters, I need it, but it’s not a necessity, almost all users have a 4 kb cluster and are happy with everything.. So you don’t have to worry about it, if you’re not interested in these clusters, then it’s not worth it change the cluster, that's it, my jokes so to speak.

Please note that in the command line, well, where the installer is, there is also a button Restore Windows or something like that, then there, in that command line, there the system drive can easily NOT HAVE THE LETTER C, but another, keep this in mind, because it is important! How to resolve the situation here? First you need to find out which letters belong to which sections. To do this you enter the following command:

And then write the following command:

And you will see what sections there are and what letters belong to them, look like mine:


Then, when you have looked, you need to enter this command:

This is to exit the DISKPART subsection, so to speak:


Another piece of information that will help you is the size of the disk; it is also easy to understand what kind of disk it is. There is also a command that will show you what is on the disk, this will also help you understand where which disk is, well, for example, to see what is on drive C, you need to write the following command:

And this is what the result will be:


What’s also good is that the disk size is also displayed here.

Here's another command:

This is to go to the directory, well, here above is just drive C as an example. Well, guys, everything seems to be more or less clear? I really hope so!

That seems to be all... And if something is wrong, then I'm sorry. By the way, it’s December, the 22nd, and therefore I congratulate you on the upcoming New Year 2017. I wish you happiness and that everything goes well with you.. By the way, the year of the rooster..

23.12.2016

When installing the operating system, as well as when changing files or redistributing space between partitions, it is necessary to format the hard drive. This is a fairly common operation performed by PC users. If you haven’t done anything like this before, then let’s look at the theoretical part of the question.

What is the formatting process?

Marking areas for storing information, in which some of it is deleted, is called formatting. It creates a system for accessing stored information.

Typically done for:

  • changing one file system to another;
  • deleting files from your hard drive.

At the moment there are a large number of different file systems. They are used on various equipment, including not only computers, but also mobile devices. To work in latest versions Windows uses the NTFS file system.

Video: How to format a hard drive

Why format your hard drive?

Formatting is performed to delete files from the hard drive, as well as to change one file system to another.

In most cases they resort to it:

  • before installing a new operating system;
  • to create a Windows installation image, for example, on a flash drive;
  • due to the need to clear the disk of files if they are not needed.

Formatting with Windows tools

Despite the large number of various programs for working with a hard drive, the Windows operating system has its own set of utilities.

Let's look at the process of formatting disks using Windows:

  1. select the disk that needs to be formatted;
  2. press the right mouse button;
  3. select Format;
  4. in the window that appears, select the file system, cluster size, and formatting method;
  5. It is recommended to set NTFS as a file system, and leave the cluster size at the default – 4096;
  6. After setting the necessary parameters, click Start.

Windows also includes a more comprehensive service for working with hard drives.

To open this menu, do the following:

  1. right-click on My Computer;
  2. select Management;
  3. open Disk Management;
  4. In this menu, the user can perform various operations on the hard drive, including formatting.

Formatting via the command line

You can also perform this operation using the command line:

  • Press the key combination Win+R;
  • enter cmd and press Enter;
  • in the command line we write the command format y:, where y is the letter of your drive, maybe, for example, c or d;
  • the system will ask you to confirm the operation by pressing the Y key;
  • after confirmation, the system will begin the formatting process;
  • When finished, this message will appear

Formatting HDD in BIOS

If you need to format from the BIOS hard section disk, you'll have to tinker a little. Unfortunately, the BIOS does not have tools for formatting the hard drive, so you should use third party programs to perform these operations.

One of the most common is Acronis Disk Director. To work with it, you need to create bootable media in the operating system with the files of this program. But before you start creating bootable media, you should consider another option - formatting using Windows Installer. This solution is a simpler option compared to Acronis program Disk Director.

For this method, you only need a disk or flash drive with a recorded operating system installation package.

To format, you must perform the following steps:


Attention! The drive partition letters may not match. To more accurately determine the required disk, use the wmic logicaldisk get deviceid, volumename, size, description command.

Creating a bootable USB flash drive for Acronis Disk Director

To create a bootable flash drive you will need:


Algorithm of actions:

  1. insert the flash drive;
  2. install and open the program;
  3. in the application, open the Tools section and select Acronis Bootable Media Builder;
  4. click next;
  5. select the Windows PE boot media type;
  6. in the next menu you should mark the necessary components for recording to a flash drive;
  7. After selection, you must select the media on which to record and click Next. The flash drive should be formatted in FAT 32 format using the Windows utility;
  8. you can also create an image for later burning to a flash device or disk using the Ultra ISO program.

Working with a bootable USB flash drive Acronis Disk Director

To load a flash drive you need:


How to format an external hard drive to NTFS

The most convenient formatting method is to perform all actions using standard operating system utilities. This solution does not require installation additional programs and creating additional boot disks.

If you do not have an operating system installed, then in this case you should use special programs, such as Acronis.

Steps describing how to format a hard drive as ntfs:


Utilities

In addition to the standard Windows programs There are various utilities used for the same purpose.

The most common options include the following:


What is the best program to format drives in ntfs?

Each program has its own characteristics, but the main direction for all utilities remains the same - working with disks, including creating partitions, forming into other file systems, etc. Therefore, choosing a program is a purely personal question for each user, which depends on his preferences .

Problems and solutions when formatting

How to quickly format a disk without losing data?

Unfortunately this is not possible. All stored information will be deleted. Only part of the data can be recovered.

Which drive is better: external or external?

Formatting external drives is performed in the same way as for a regular hard drive. During this process, all information will be deleted, including windows, after execution the disk will be like new without windows.

Unable to format hard drive

If you did everything according to the instructions, but did not achieve results, do not sound the alarm. This doesn't always mean something bad.

  • format command - cannot be used for a system disk if it is in its environment;
  • if the operating system is located in another partition of the HDD, it cannot be deleted;
  • settings antivirus program access to different partitions of the hard drive may be denied;
  • various applications and viruses can block access.

If you have removed the factors described above, but still cannot format your hard drive, you will have to resort to special programs. The most popular tool is HDDscan, which is easy to install and free.

Algorithm of actions:

  • download the utility;
  • open and install;
  • run as administrator;
  • click on the icon in the form of a sphere located in the center of the interface;
  • select Surface tests;
  • check the box next to Erase;
  • go to the Add test tab;
  • click on Scan;
  • in the lower right corner, write down the error data;
  • set the EraseWAITs option to ON and select Scan again;
  • repeat until the error is cleared.

You can also use Acronis Disk Director. If it is impossible to format a portable hard drive using this program, most likely the hard drive is partially damaged. And the entire procedure can sometimes be performed only from bootable media, that is, not in the operating system.

How to force format a flash drive?

To format flash drives you can use the program HP USB Disk Storage Format Tool

  • provide the necessary set of functions;
  • They have a fairly simple interface that will be easy for novice users to work with.