Creating a bootable pendrive is a straightforward process when using the Command Prompt in Windows. This method is especially useful for installing operating systems like Windows or Linux. Follow these steps carefully.
Step 1: Open Command Prompt as Administrator
- Press
Win + S
and typecmd
. - Right-click on “Command Prompt” and select
Run as administrator
.
Step 2: Use Diskpart to Manage the USB Drive
- In the Command Prompt, type:
diskpart
This opens the Diskpart utility.
- List all connected drives by typing:
list disk
This displays all storage devices connected to your computer.
- Identify your pendrive based on its size. It will be listed as
Disk X
(whereX
is the disk number). - Select the USB drive by typing:
select disk X
Replace
X
with the number corresponding to your USB drive.
Warning: Ensure you select the correct disk to avoid data loss on other drives. - Clean the USB drive by typing:
clean
This removes all data and partitions on the drive.
Step 3: Create a Bootable Partition
- Create a new primary partition:
create partition primary
- Select the newly created partition:
select partition 1
- Make the partition active:
active
- Format the partition as
NTFS
(orFAT32
if required):format fs=ntfs quick
Use
fs=fat32
for UEFI-based systems that require FAT32. - Assign a drive letter to the USB drive:
assign
- Exit Diskpart:
exit
Step 4: Copy Bootable Files to the USB Drive
Now that the pendrive is bootable, you need to copy the bootable files (e.g., Windows ISO or Linux ISO files) to the USB drive.
- Mount the ISO file:
- Right-click the ISO file and select
Mount
. - Note the drive letter of the mounted ISO.
- Right-click the ISO file and select
- Copy all files from the mounted ISO to the USB drive:
xcopy F:\* G:\ /E /H /F
Replace
F:
with the ISO’s drive letter andG:
with the USB drive’s letter.
Step 5: Verify the Bootable USB
- Safely eject the USB drive and reconnect it.
- Check if the files are intact.
- Test the USB by booting your PC with it:
- Restart the PC and enter the BIOS/UEFI setup (usually by pressing
F2
,Del
, orEsc
during startup). - Set the USB drive as the primary boot device.
- Restart the PC and enter the BIOS/UEFI setup (usually by pressing
Tips and Warnings
- Backup Data: Ensure you back up important data from the USB drive before starting, as this process erases all data.
- Correct Disk Selection: Be cautious when selecting the disk in Diskpart to avoid accidental data loss.
- ISO Compatibility: Ensure the ISO file you are using matches your system’s architecture (e.g., 64-bit or 32-bit).
By following these steps, you can easily create a bootable USB drive for your system installation or repair tasks.