How to Make a Pendrive Bootable Using Command Prompt (CMD)

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

  1. Press Win + S and type cmd.
  2. Right-click on “Command Prompt” and select Run as administrator.

Step 2: Use Diskpart to Manage the USB Drive

  1. In the Command Prompt, type:
    diskpart
    

    This opens the Diskpart utility.

  2. List all connected drives by typing:
    list disk
    

    This displays all storage devices connected to your computer.

  3. Identify your pendrive based on its size. It will be listed as Disk X (where X is the disk number).
  4. 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.

  5. Clean the USB drive by typing:
    clean
    

    This removes all data and partitions on the drive.


Step 3: Create a Bootable Partition

  1. Create a new primary partition:
    create partition primary
    
  2. Select the newly created partition:
    select partition 1
    
  3. Make the partition active:
    active
    
  4. Format the partition as NTFS (or FAT32 if required):
    format fs=ntfs quick
    

    Use fs=fat32 for UEFI-based systems that require FAT32.

  5. Assign a drive letter to the USB drive:
    assign
    
  6. 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.

  1. Mount the ISO file:
    • Right-click the ISO file and select Mount.
    • Note the drive letter of the mounted ISO.
  2. 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 and G: with the USB drive’s letter.


Step 5: Verify the Bootable USB

  1. Safely eject the USB drive and reconnect it.
  2. Check if the files are intact.
  3. Test the USB by booting your PC with it:
    • Restart the PC and enter the BIOS/UEFI setup (usually by pressing F2, Del, or Esc during startup).
    • Set the USB drive as the primary boot device.

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.

Leave a Reply