Boot disk command line. Create a bootable Windows flash drive using the command line.

💖 Like it? Share the link with your friends

In this lesson I will teach you how to make a bootable windows flash drive via command line without third party programs .

Windows bootable flash drive- this is a flash drive from which it is possible to boot before starting the operating system.

There are many uses for this flash drive. For example, this may be needed when you want to install or restore operating system after an error or virus damage, check or format HDD, test the OS when you don't have dvd drive etc. Agree that it is much more convenient to take with you small device than to carry a disc. Also, the reading speed in this case is much faster than from an optical disc.

There are many ways to create a flash drive - standard means, native or third-party programs. In this tutorial, I'll show you how to do it with command line. We'll need removable drive, i.e. flash drive that needs to be connected to the computer. We also need a command line. You can launch it in several ways. If you have Windows 8, then you can click "Start", and then on the right upper corner Enter "Command Prompt" in the search box.

If you have Windows 7 or lower, then you can do this through the "Run" command, by the way, I talk about it in. It can be launched through the Start menu or by pressing Win+R. Next, enter the command "cmd" in the field and click "OK".

We start the command line, in which we will now work. We will enter commands that will eventually lead us to a bootable USB flash drive. The figure below shows a ready-made list of commands. Below the screenshot you will find a description of each step that you will need to take.

Let's look at everything in order as we entered the commands:

diskpart- launching the program - command interpreter of the text mode. It allows you to manage objects (disks, partitions or volumes) by entering commands from the command line;

list disk- show a list of disks that are connected to the computer;

select disk 1- select the disk that we have at number 1. If you look at the list of disks, then by size you can understand that it is removable media which we need;

clean- delete all data from the flash drive;

create partition primary- create a primary partition;

select partition 1- select the section that you just created;

active- make the selected section active;

format fs=NTFS The next step is formatting. We specify the file system "NTFS";

assign letter=Z- an optional item that allows you to assign a letter to the carrier;

exit- at the final step, exit the Diskpart program.

Congratulations, the bootable flash drive has been successfully created. Now we transfer files with the operating system to it. Files must be transferred in unpacked form, not a disk image in *.iso format.


Now, in order, for example, to install Windows, it is enough for us to set in BIOS boot from a flash drive, i.e. so that the computer boots from removable media first, and not from the hard drive.

In the following lessons, we will look at how you can create a bootable USB flash drive using a third-party program and a program from Microsoft.

Below you can watch the video version of the lesson and find out how to create a bootable flash drive.

New TOP-project from a reliable admin, REGISTER!

Stay up to date with site updates, be sure to subscribe to the channel Youtube and group

A bootable Windows 10 flash drive is designed to install, reinstall or restore the operating system. To perform these steps, the computer will boot the Windows image from an external USB drive (flash drive).

A bootable Windows 10 flash drive created through the command line will work on any computer. On my site you will find many articles about creating bootable flash drive through various programs. In this article, we will look at how you can make a bootable Windows 10 USB flash drive using the operating system tools, through the command line.

With this method, you can create a universal bootable Windows USB flash drive without using third party applications. An operating system image recorded on a bootable flash drive can be installed on any computer with a regular BIOS and MBR, or with UEFI and GTP. Modern computers are issued with the UEFI interface and the GTP partition table, while, bootable media must be formatted to the FAT32 file system.

In this way, you can create a bootable USB flash drive with the operating system Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista. Keep in mind that Windows 7 will boot without problems on computers with BIOS and MBR, and to install the system on UEFI and GTP, UEFI support and additional steps are required.

All the work to create a bootable Windows flash drives from the command line consists of two stages: preliminary USB preparation flash drive and copying files from the operating system image Windows systems 10.

Preparing a bootable flash drive on the command line

Prepare USB flash a drive large enough to record the Windows 10 operating system. Next, insert the USB flash drive into the computer's USB port.

Then right click on the start menu context menu Select "Command Prompt (Admin)". This will open a command line interpreter window.

Next, you will need to sequentially enter the commands in the command line interpreter. To execute the entered command, press the "Enter" key. After executing the command, you will see information with system explanations about the action taken.

To run the DiskPart utility, enter the following command:

diskpart

Under the entered command, information about the utility will be displayed.

List disk

Pay attention to the disk number of the flash drive. You need to focus on the size of the disk. For example, I have 4 hard drives connected to my computer (two of them are external) and one flash drive. The size of the flash drive will be smaller than hard drives. This is clearly visible in the image.

Next, you need to enter a command to select a flash drive. Be careful! Your disk number will be different (I have Disk 4, as you can see in the image above), corresponding to the disk number of your flash drive. So enter your disk number:

Select disk 4

Disk 4 has been selected.

Now you need to run a command to clean the flash drive ( quick format):

Disk Cleanup completed successfully.

Enter the command to create the partition:

Create partition primary

The specified partition was successfully created.

Enter the command to select a partition (there was only one partition):

select partition 1

Section 1 selected.

Then enter the command to mark the active partition:

Format fs=FAT32 QUICK

DiskPart successfully formatted the volume.

Entering a command to assign a drive letter (flash drive):

Assignment of the drive name or mount point was successful.

To exit the DiskPart utility, enter the following command:

Shutting down DiskPart.

Now you can close the command line interpreter, you won't need it anymore. We proceed to the second stage of creating a bootable USB flash drive with Windows 10.

Copying files from a Windows 10 image to a bootable USB flash drive

The Windows 10 image will open in the virtual drive. First, select and then copy all the files of the operating system to a USB flash drive. The Windows copy process will take some time.

Otherwise, open Windows image to copy files, you can use an archiver, or use an imaging program (for example, UltraISO).

After copying is completed, the image of the Windows 10 operating system, written to a bootable USB flash drive using the command line, is ready for use.

A mounted Windows 10 image whose contents were used to copy operating system files can be extracted from virtual drive, it is no longer needed.

Right-click on the USB drive, name the bootable flash drive (for example, something like "WIN10PRO"), because the bootable flash drive is named after the drive letter.

After that, the Windows 10 Pro bootable flash drive will clearly appear in Explorer.


You can create a universal bootable USB flash drive with the Windows operating system by choosing an image with a 32-bit or 64-bit (Windows 10 x86 or Windows 10 x64) bit depth, or burn a combined Windows 10 x86 / x64 image, which can be downloaded for free from the Microsoft website using the program Media Creation Tool. You can read more about this.

Recreating a bootable flash drive

In this way, you can prepare the flash drive once, and then use this USB stick to capture different Windows images.

For example, you have a bootable USB flash drive with Windows 10, and you need a bootable Windows 10 Pro flash drive (systems may have different bitness), or you need to upgrade the system version to the current version. In this case, there is no need to prepare the flash drive again using the command line.

The order of operations with a bootable USB flash drive created on the command line:

  1. Format the flash drive to FAT32 (quick format). With this formatting, previously prepared partitions of the flash drive will not be affected.
  2. Copy the files from another image of the Windows 10 (Windows 8.1) operating system to the USB flash drive.
  3. The bootable flash drive is ready to be used on any computer.

Conclusion

The user can create a bootable USB flash drive with Windows 10 using the command line without using programs. The Windows Universal Boot Stick will work on any computer with BIOS and MBR, or UEFI and GTP.

Hello dear blog readers. Today I want to tell you about such a wonderful program as. What is so wonderful about her? - you ask. And the fact that with its help you can easily create a bootable flash drive (data from a flash drive after formatting) or a disk, and the most interesting thing is that this program is available to anyone Windows user through the command line, in other words, does not require installation. And don't let the phrase "command line" scare you - using it is much more convenient and easier than it seems at first glance.


So, after we have inserted the USB flash drive into the USB connector, we launch the command line. To do this, press Start and in the search bar write cmd, and press Enter.

In the command line that appears, we write, thereby launching the program for managing disks. Click Enter.



In the list of devices we find our flash drive - it can be recognized by its size. In my case it is Disc 6. Therefore, we write the following command. If your flash drive is number 4, then you need to enter the command. If under the number 2, then, respectively. Click Enter.


Then we enter the command clean, which will delete all files from a flash drive or disk. Click Enter.



Then we enter the command. Thus, we select the specified section and move the focus to it. Click Enter.


Then we execute the command. The system marks the partition as active. Click Enter.


Now you need to format the flash drive to NTFS. It can be fast or complete. Full formatting executed by command format fs=NTFS. If you don’t want to wait and time is running out, then we do a quick format with the command format fs=NTFS QUICK. Click Enter.


We are waiting for the end of formatting.


Now you need to assign a letter to the flash drive. We do this with the command assign. Click Enter.


The flash drive is automatically assigned a letter, and after that, the autorun of the media is triggered.

Now you can exit the program. We enter the command exit and press Enter.


The last thing to do is to copy the distribution files of the operating system (the one for which we made a bootable USB flash drive) to, in fact, our flash drive. After that, our flash drive will be bootable, and will boot absolutely everywhere, on any device. With its help, it will be possible to install your operating system anywhere.

I want to note that with the help of the program you can carry out a lot of manipulations both with hard drives(), and with flash drives. The example discussed today is only a small part of all the possibilities. I will consider other commands and examples of working with this program in the following articles.

Also read on this topic:

Format flash drive to NTFS
How to recover data from a flash drive after deletion or formatting?

used specialized software, which you need to download, install and deal with the settings. It would be nice to be able to install Windows without all these manipulations, wouldn't it? There is such a way, it is carried out using console command Diskpart, which is able to prepare your media for use without third-party programs. Not bad? Then let's figure out how to create a bootable Windows USB flash drive in Diskpart.

Using Diskpart when creating the Windows bootloader simplifies the process.

Diskpart has a fairly large number of commands that will help you manage disks, partitions and volumes using scripts. An indispensable tool when there is no possibility or desire to download the required program. To view all the features of this program, use "Help".

IMPORTANT. Before you start working with the drive, it is recommended that you move all the necessary data to another location. The flash drive will be formatted, all documents on it will be lost.

Getting Started

Diskpart - create a bootable flash drive. To manipulate commands, we need to get to the command line. You can do this in several ways:

  • We hold down the key combination "Win + R", the "Run" window will open, where we need to enter "cmd" and click "OK". You can also access Run via Start/All Programs.
  • Going to the Start menu, we drive the phrase "cmd" or "Command line" into the search bar. Click on the search result and continue.

We are inside the command line. We execute the following commands:

  1. DISKPART - Run the program itself, for this we simply enter its name
  2. list disk - shows all disks that are on this moment connected to a computer.
  3. select disk 1 - disk selection, where "1" is the serial number of the flash drive, we need to calculate this number from the results of the previous request. We look at the volume of the drive, compare it with the declared volume of the flash drive.
  4. clean - disk cleaning.
  5. create partition primary - create a primary partition
  6. select partition 1 - select this partition
  7. active - its activation
  8. format fs=NTFS - formatting in NTFS. You can also select the FAT file system. If we don’t want to wait a long time, then instead of the usual formatting, we use quick formatting by adding the word QUICK. The choice of file system is largely based on personal preference and various other factors. If you do not know what to choose, then leave the command unchanged, most likely NTFS will be preferable for you.
  9. assign letter=T - assignment of the letter "T" to the carrier.
  10. Exit - exit.

We have created a bootable flash drive, it remains to transfer files from Widows to it. Note the files, not the image. You must unpack the image yourself.

Conclusion

So we did it with the built-in Diskpart solution. A bootable USB flash drive with Windows 7 has been created, we can install it with peace of mind at least every day. Many novice users are intimidated by the very word "Command Prompt". You don’t need to be afraid of it at all, in many cases it makes life much easier, although you shouldn’t play with it if there is no specific understanding of what you are going to do. In our case, it is enough just to follow the indicated commands and everything will work out.

If you have any questions - ask them in the comments!



tell friends