Making a USB Boot with Command Prompt is a complex process, involving numerous commands compared to the simpler Rufus software. If you want to enhance your USB Boot creation skills using CMD, follow the instructions in the article below.
Before proceeding with this method, ensure you have the ISO file for the USB Boot, such as Windows or Hiren Boot, and a USB with a capacity of 4GB or more.
1. Format USB Boot with CMD
Step 1: Open CMD with Administrator rights. To open cmd with Admin rights on Windows 10, go to Search (1) => type cmd (2) => Run as administrator (3).
Step 2: Enter the command diskpart => press Enter.
Step 3: Type the command list disk => press Enter. At this point, the system will display the available drives on your computer, and you can identify your USB based on its capacity.
Example: A 32GB USB will show Size as 28GB and be identified as Disk 1 in the sample image below.
Step 4: Enter the command select disk 1 => press Enter.
In this step: select disk 1 can be replaced with select disk 2, select disk 3… depending on your USB order.
Step 5: Type the command clean => press Enter to erase the USB partition.
Step 6: Enter the command create partition primary
Step 7: Enter the command select partition 1 => press Enter.
Step 8: Type the command active => press Enter to activate the partition on the USB.
Step 9: Enter the command format fs=ntfs quick => press Enter to format the USB as NTFS.
For Boot USB with a capacity less than 4GB, you can use the command format fs=fat32 quick to quickly format the USB in FAT32 format.
Step 10: Enter the command assign letter=X => press Enter to assign a shortcut name to the USB. You can replace X with another drive letter like D, E, F, G, H…
Finally, type the command exit => press Enter to exit Disk Part and proceed to the next operation.
2. Copy files from the Boot USB to USB using CMD
Step 1: Extract the ISO Boot file to a virtual drive. On Windows 10, you can extract the file by right-clicking the ISO file (1) => Mount (2). After successfully mounting to the virtual drive, you will see a new drive containing the installation file (3).
Step 2: Take note of the drive letter for the virtual drive (1) and USB (2) , and accurately copy files from the virtual drive containing Boot to the USB.
In the illustration below, drive D is the virtual drive mounted from the ISO file, and drive X is the USB created in part 1.
Step 3: Return to the Command Prompt and enter the command D: => press Enter.
Where D: is the drive letter of the virtual drive containing the Boot files.
Step 4: Enter the command cd boot => press Enter.
Step 5: Type the command bootsect /nt60 X: => press Enter.
Where X: is the drive letter of your USB.
Step 6: Enter the following command => press Enter.
xcopy D:\*.* X:\ /E /F /H
- Where:
D: is the virtual drive name
X: is the USB drive name
/E: Executes the copy command for all folders and subfolders excluding empty ones.
/F: Displays source and destination files during copying.
/H: Executes the copy command for files with attributes and hidden files. By default, the xcopy command does not allow copying of files with attributes and hidden files.
After successful copying and no error messages, consider it done. Close the Command Prompt window.
Step 7: After successfully creating the Boot USB, remember to eject the USB and virtual drive by right-clicking the drive (1) => Eject (2).
Following the instructions in this article, you've learned an innovative way to create a Boot USB without relying on supporting software, using the Command Prompt (CMD). If you encounter difficulties during the process, feel free to ask questions on Mytour in the comments section below!