Bernard Quayson - IT Specialist
INTRODUCTION
If you’re looking for a step-by-step guide on how to create a bootable USB drive using CMD commands, you’ve come to the right place. This process is perfect for installing a new operating system or running a live Linux distribution.
What is a bootable USB or Drive?
A bootable drive, also known as a bootable disk or bootable media, is a storage device that contains the necessary files and data to start a computer’s operating system (OS) during the boot process. This device can be a USB flash drive, an external hard drive, or even an SD card. When you boot your computer from this drive, the operating system on the drive loads into your computer’s memory and runs as if it were installed on the computer’s internal hard drive.
Bootable drives are commonly used for:
- Installing Operating Systems: You can use a bootable drive to install a new operating system on a computer. This is especially useful when building a new computer or upgrading to a new version of an operating system.
- System Recovery: If your computer’s operating system becomes corrupted and won’t start, you can use a bootable drive to repair it. Many operating systems provide system recovery tools that you can put on a bootable drive.
- Testing and Troubleshooting: If you want to test a new operating system without installing it on your computer, you can put it on a bootable drive and run it from there. This is also useful for troubleshooting hardware issues.
- Running Portable Operating Systems: Some operating systems are designed to run entirely from a bootable drive. This allows you to carry your operating system, along with all your files and software, with you wherever you go.
A simple and straightforward method to create a bootable USB drive using CMD commands
STEP I
- Insert your USB flash drive into your computer.
STEP II
- Open PowerShell: Press
Win + X
and selectWindows PowerShell (Admin)
to open an elevated PowerShell window or - Start Command Prompt: Access the Command Prompt by pressing
Win + X
and selectingCommand Prompt (Admin)
. This opens an elevated Command Prompt window. - click here to learn how to “Open Command Prompt as an administrator”.
STEP III
- Type
diskpart
and press Enter to open the diskpart tool.
STEP IV
- Type
list disk
and press Enter to see the available disks on your system. Note the disk number or drive letter of your USB flash drive.
STEP V
- Type
select disk n
(wheren
is the disk number or drive letter of your USB flash drive) and press Enter to select it.
in my case; select disk 2
STEP VI
- Type
clean
and press Enter to erase all the data on the USB flash drive.
STEP VII
- Type
create partition primary
and press Enter to create a primary partition on the USB flash drive.
STEP VIII
- Type
select partition 1
and press Enter to select the newly created partition.
STEP IX
- Type
format fs=fat32 quick
(orformat fs=ntfs quick
if you are using legacy BIOS) and press Enter to format the partition with the FAT32 or NTFS file system.
STEP X
- Type
active
and press Enter. This command marks the selected partition as active, which is necessary for booting.
STEP XI
- Type
assign
and press Enter. This command assigns a drive letter to the partition, making it visible in Windows Explorer
STEP XII
- Type
exit
and press Enter. This command exits the diskpart program.
Warning: Formatting your USB drive will erase all its data. Backup important files before proceeding. Use caution and ensure you choose the correct USB drive number (replace 'n' with your drive number) to avoid potential data loss from other drives.
Once formatted, your USB drive will be ready for booting. To install an operating system, copy the installation files from an ISO or DVD to the USB drive. Just select all files from the source, copy, and paste them into the USB drive.
Your article helped me a lot, is there any more related content? Thanks!
Take a tour and see for yourself