How to make a bootable USB flash drive using the command line. Creating a bootable Windows USB drive via the command line.

💖 Do you like it? Share the link with your friends

Hello, dear blog readers. Today I want to tell you about such a wonderful program as. What's so wonderful about it? - 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 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 simpler than it seems at first glance.


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

In the command line that appears, we write, thereby launching the disk management program. Click Enter.



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


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



Then we enter the command. Thus, 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 quick or complete. Full formatting executed by the command format fs=NTFS. If you don’t want to wait and time is running out, then do it quick formatting team format fs=NTFS QUICK. Click Enter.


We are waiting for the formatting to finish.


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


The flash drive is automatically assigned a letter, and then the media automatically starts.

Now you can shut down the program. Enter the command exit and press Enter.


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

I would like to note that with the help of the program you can carry out many manipulations with both 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:

Formatting a flash drive to NTFS
How to recover data from a flash drive after deleting or formatting?

For creating bootable flash drive We will use programs from both third-party manufacturers and the built-in interpreter Windows commands. Each method is different and has its own specifics, but I think that a simple end user will be able to cope with creating a bootable flash drive using any of the proposed methods:

  • how to make a bootable USB flash drive using the command line
  • how to make a bootable USB flash drive using UltraISO programs
  • how to make a bootable USB flash drive using Windows7 USB/DVD Download Tool

If you are interested in information about creating a bootable USB flash drive for a family of operating systems Linux systems, then you can read the information at this link “bootable USB flash drive for Linux”.

So, I propose to start creating a bootable flash drive in order, as defined in the above list, accordingly we proceed to the first method.

BOOT FLASH DRIVE using the command line (method I)

Next, we will use only those commands that we need when creating a bootable flash drive. Therefore, the figure below shows the sequential entry of commands to create a bootable USB flash drive. And please pay attention to the fact that the commands you enter are indicated by a red underline!

Graphical representation of command input on the command line

Now let's describe the previously entered commands:

DISKPART- launch the program, a text-mode command interpreter that allows you to manage objects (disks, partitions or volumes) using scripts or directly entering commands from the command line.

list disk- display the list disk drives connected to a personal computer.

select disk 1- select disk number “1”, since in our case it is a removable flash drive.

clean- clears all data from removable media - flash drive.

create partition primary- create a primary partition.

select partition 1- select the created section.

active- make the section active.

format fs=NTFS- format the flash drive in the NTFS file system.

assign letter=T- if necessary, you can assign a letter for the flash drive in this way.

Exit- exit the DISKPART program.

BOOTABLE FLASH DRIVE CREATED!

NOTE: Once you have created a bootable USB flash drive, you need to transfer the operating system files to this removable media. Files must be transferred in unpacked form, do not under any circumstances simply add an operating system image, for example one *.ISO file, it WILL NOT WORK!!! Don't forget to install on the I/O system BIOS loading primary device, that is, make sure that the computer boots from removable media - the bootable flash drive you created.

You can see the complete list of Diskpart program commands in the following table:

Table of commands of the "DISKPART" program

TEAM EXPLANATION
ACTIVE- Mark the selected section as active.
ADD- Adding a mirror to a simple volume.
ASSIGN- Assign a name or mount point to the selected volume.
ATTRIBUTES- Working with volume or disk attributes.
ATTACH- Attaches a virtual disk file.
AUTOMOUNT- Enable and disable automatic connection base volumes.
BREAK- Splitting the mirror set.
CLEAN- Clear configuration information or all data on the disk.
COMPACT- Attempts to reduce the physical size of the file.
CONVERT- Convert disk formats.
CREATE- Create a volume, partition or virtual disk.
DELETE- Delete an object.
DETAIL- View object parameters.
DETACH- Detaches the virtual disk file.
EXIT- Shutdown DiskPart.
EXTEND- Expand volume.
EXPAND- Increasing the maximum available space on the virtual disk.
FILESYSTEMS- Displays the current and supported file systems for the volume.
FORMAT- Formatting a given volume or partition.
GPT- Assigning attributes to the selected GPT partition.
HELP- Display a list of commands.
IMPORT- Import a disk group.
INACTIVE- Marking the selected section as inactive.
LIST- Display a list of objects.
MERGE- Merging a child disk with its parents.
ONLINE- Transferring an object marked as "offline" to the "online" state.
OFFLINE- Transferring an object marked as “online” to the “offline” state.
RECOVER- Update the status of all disks of the selected package. Attempting to rebuild disks of the wrong package and resynchronizing mirrored and RAID5 volumes with outdated plex or parity data.
R.E.M.- Does not perform any actions. Used to comment scripts.
REMOVE- Deleting a drive name or mount point.
REPAIR- Recovering a RAID-5 volume with a failed member.
RESCAN- Search for disks and volumes on your computer.
RETAIN- Placing a service partition on a simple volume.
SAN- Display or set the SAN policy for the currently loaded OS.
SELECT- Setting focus on an object.
SETID- Changing the partition type.
SHRINK- Reduce the size of the selected volume.
UNIQUEID- Display or set the GUID Partition Table (GPT) code or Master Boot Record (MBR) signature of the disk.

BOOT FLASH DRIVE using the UltraISO program (II method)

The UltraISO program is designed for creating and editing disk images. When creating a bootable flash drive, we will use the built-in functions of this program.

First of all, a bootable USB flash drive is intended for installing, reinstalling or restoring an operating system. This article discusses a method for creating a bootable USB flash drive on the command line using the Diskpart utility.

Plus this method creating a bootable flash drive is the use of standard operating system tools, and also the fact that the bootable flash drive is universal and can be used for installation on any computer or laptop. Modern computers and laptops are produced with a UEFI interface instead of a regular BIOS. UEFI interface supports FAT32 as file system, which means that it can only boot from media formatted in the FAT32 file system. Also, from such a bootable flash drive you can install an operating system on a computer or laptop with a regular BIOS, which makes the bootable flash drive universal.

The process of creating a bootable USB flash drive consists of preparing a USB flash drive at the command line and copying files to it.

Preparing a bootable USB flash drive at the command line

Prepare a USB flash drive of sufficient size and insert the flash drive into the USB connector of the computer.

Run command prompt as administrator, to do this press the keyboard shortcut + X or right-click on the Start button in the taskbar and in the appeared context menu select item Command line ( A administrator)

In the command line window that opens, you must enter several commands sequentially. To execute the entered command, press the key Enter↵


To create a bootable USB flash drive, we need a utility for managing disks, volumes and partitions Diskpart

To launch the DiskPart utility, run the command:
To display all connected drives, run the command:
Next you need to select our flash drive. You need to be guided by the size of the disk, in this case a 15 GB USB flash drive, designated as Disc 2 (in your case there may be a different number).
To select a flash drive, run the following command:

Now you need to clean the flash drive, to do this run the command:
Next, create a partition on the flash drive by running the command:
Then select the created partition by running the command:
Now we mark the selected partition as active, to do this, run the command:
Next, we quickly format the flash drive into the file system FAT32 command:
And after successful formatting, all that remains is to assign a drive letter to the flash drive by running the command:
To exit the Diskpart utility, run the command:

Used specialized software, which you need to download, install and understand the settings. It would be nice to be able to install Windows without all this manipulation, wouldn't it? There is such a way, it is done using console command Diskpart, which can 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 the Diskpart program.

Using Diskpart when creating a Windows boot loader 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 downloading the required program is not possible or desirable. To view all the features of this program, use "Help".

IMPORTANT. Before starting to work with the drive, it is recommended to transfer all the necessary data to another location. The flash drive will be formatted and all documents on it will be lost.

Let's get started

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

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

We're inside the command line. We execute the following commands:

  1. DISKPART - Launch the program itself, to do this we simply enter its name
  2. list disk - shows all disks that are on this moment connected to the computer.
  3. select disk 1 - select a disk, where “1” is the serial number of the flash drive; we need to calculate this number based on the results of the previous request. We look at the storage capacity and compare it with the declared capacity of the flash drive.
  4. clean - disk cleaning.
  5. create partition primary - creating 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 regular formatting we use quick formatting, adding the word QUICK. The choice of file system is largely based on personal preference and various other factors. If you don’t know what to choose, then leave the command unchanged; most likely NTFS will be preferable for you.
  9. assign letter=T - assigning the letter “T” to the carrier.
  10. Exit - exit.

We have created a bootable USB flash drive, all that remains is to transfer files from Windows to it. Please note, files, not an image. You must unpack the image yourself.

Conclusion

So, we did it using Diskpart's built-in solution. A bootable USB flash drive with Windows 7 has been created, we can install it every day with a calm heart. Many novice users are intimidated by the very word “Command Line”. There is no need to be afraid of it, in many cases it makes life much easier, although you should not play with it if you do not have a specific understanding of what you are going to do. In our case, just follow the specified commands and everything will work out.

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

Boot Windows flash drive 10 is intended for installing, reinstalling or restoring the operating system. To perform these actions, the computer will load a Windows image from an external USB drive (flash drive).

A bootable Windows 10 USB flash drive created via the command line will work on any computer. On my website you will find many articles about creating a bootable USB flash drive using various programs. In this article we will look at how you can make a bootable Windows 10 USB flash drive using operating system tools via 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 USB flash drive can be installed on any computer with a regular BIOS and MBR, or with UEFI and GTP. Modern computers are available with a UEFI interface and a GTP partition table, while bootable media must be formatted as FAT32 file system.

Using this method, 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, but installing the system on UEFI and GTP requires UEFI support and additional steps.

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

Preparing a bootable USB flash drive at the command line

Prepare USB flash a drive of sufficient size to record the Windows 10 operating system. Next, insert the flash drive into the USB connector of the computer.

Then right-click on the “Start” menu and select “Command Prompt (Admin)” from the context menu. This will open a command line interpreter window.

Next, you will need to enter the commands sequentially into 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 completed action.

To launch the DiskPart utility, you must enter the following command:

Diskpart

Information about the utility will be displayed below the entered command.

List disk

Pay attention to the disk number of the flash drive. You need to be guided by 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

Disc 4 has been selected.

Now you need to run the 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 created successfully.

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 letter for a disk (flash drive):

The drive name or mount point assignment was successful.

To exit the DiskPart utility, enter the command:

Shutting down DiskPart.

Now you can close the command line interpreter; it will no longer be needed. Let's move on 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 a virtual drive. First, select and then copy all the operating system files to the USB flash drive. The Windows copying process will take some time.

In other words, open Windows image To copy files, you can use an archiver, or using a program for working with images (for example, UltraISO).

After copying is complete, the image of the Windows 10 operating system, recorded on a bootable USB flash drive using the command line, is ready for use.

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

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

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


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

Re-creating a bootable USB flash drive

With this method you can prepare the flash drive once and then use this USB drive for recording different Windows images.

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

The procedure for using a bootable USB flash drive created on the command line:

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

Conclusion

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



tell friends