Creating a bootable USB drive in Windows using built-in command line tools offers a reliable way to prepare installation media for various operating systems. Utilities like DiskPart and Command Prompt provide direct, low-level control over formatting and partitioning. This ensures compatibility with both modern UEFI hardware and older BIOS environments.
Employing DiskPart to configure disk partitions allows for accurate selection of partition schemes, such as GPT for UEFI or MBR for BIOS. Formatting the USB drive with FAT32 or NTFS accommodates the target operating system’s boot requirements. Correct partition setup helps avoid boot errors and supports smooth installations on different architectures.
Relying on standard Windows components eliminates the need for external utilities and reduces potential compatibility risks. DiskPart and related commands enable precise control over the partitioning process, ensuring each configuration step aligns with specific system needs. This method leverages only core Windows features to produce fully functional installation media.
Steps to create a bootable USB in Windows:
- Insert the USB drive.
Ensure the USB drive is at least 8GB in size, especially for modern operating system images like Windows 10 or Ubuntu Desktop.
- Open Command Prompt as Administrator.
C:\Windows\system32> diskpart
- Run DiskPart.
- List connected disks.
DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- --- Disk 0 Online 465 GB 1024 KB Disk 1 Online 14 GB 0 B
Identify the USB drive based on its size.
- Select the USB disk.
DISKPART> select disk 1 Disk 1 is now the selected disk.
Ensure you select the correct disk number to avoid data loss on other drives.
- Clean the USB drive.
DISKPART> clean DiskPart succeeded in cleaning the disk.
- Create a primary partition.
DISKPART> create partition primary DiskPart succeeded in creating the specified partition.
- Select the partition.
- Mark the partition as active.
DISKPART> active DiskPart marked the current partition as active.
- Format the drive.
DISKPART> format fs=fat32 quick 100 percent completed DiskPart successfully formatted the volume.
Use NTFS if the system does not support UEFI.
- Assign a drive letter.
DISKPART> assign DiskPart successfully assigned the drive letter or mount point.
- Exit DiskPart.
- Mount the ISO file.
- Copy ISO files to the USB drive.
Ensure that the file transfer completes before safely ejecting the USB drive.
- Remove the USB safely.

Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.