Create a bootable USB Flash Drive without any software ( using CMD prompt )



Creating a bootable USB flash drive using Command Prompt (cmd) in Windows involves a series of steps that include formatting the USB drive and copying the necessary boot files. Here's a step-by-step guide to help you create a bootable USB flash drive:

Create a bootable USB Flash Drive without any software  using CMD prompt

1. Insert the USB Flash Drive

  • Plug in the USB Flash Drive: Ensure that the USB flash drive you want to use is connected to your computer.

2. Open Command Prompt as Administrator

  • Open Start Menu: Press Windows + S to open the search bar.
  • Search for Command Prompt: Type "cmd" in the search bar.
  • Run as Administrator: Right-click on "Command Prompt" and select "Run as administrator."

3. Launch Diskpart Utility

  • Start Diskpart: In the Command Prompt window, type diskpart and press Enter. This will open the Diskpart utility.

4. List Available Disks

  • List Disks: Type list disk and press Enter. This command will display all the storage devices connected to your computer, including the USB flash drive.

5. Select the USB Flash Drive

  • Identify the USB Drive: Look for the USB drive based on its size. Make sure you select the correct drive to avoid data loss.
  • Select the USB Drive: Type select disk X and press Enter, replacing X with the number corresponding to your USB drive from the list.

6. Clean the USB Flash Drive

  • Clean Command: Type clean and press Enter. This command will remove all partitions and data from the USB drive.

7. Create a New Primary Partition

  • Create Partition: Type create partition primary and press Enter.
  • Select the Partition: Type select partition 1 and press Enter.
  • Make it Active: Type active and press Enter.

8. Format the USB Drive

  • Format Command: Type format fs=ntfs quick (or format fs=fat32 quick for FAT32) and press Enter. This command will quickly format the USB drive using the specified file system.

9. Assign a Drive Letter

  • Assign Command: Type assign letter=Y and press Enter, replacing Y with the drive letter you want to assign to the USB drive. Ensure that the letter you choose is not already in use.

10. Exit Diskpart

  • Exit Command: Type exit and press Enter to close the Diskpart utility.

11. Copy Windows Installation Files to the USB Drive

  • Mount the Windows ISO: If you are using a Windows ISO file, you need to mount it. Right-click on the ISO file and select "Mount." This will create a virtual drive with the contents of the ISO.
  • Copy Files: Note the drive letter of the mounted ISO (e.g., D:) and the USB drive (e.g., Y:). Use the following command to copy all files from the ISO to the USB drive:
    xcopy D:\* Y:\ /E /F /H
    Replace D: with the letter of the mounted ISO and Y: with the letter of the USB drive.

12. Make the USB Drive Bootable (For Windows Installation)

  • Open Command Prompt as Administrator if you haven't already.
  • Use the Bootsect Command: If you're creating a bootable USB for Windows installation, you'll need to use the Bootsect tool. Navigate to the boot folder of the mounted ISO drive and run:
    bootsect /nt60 Y:
    Replace Y: with the letter of your USB drive. This command will make the USB drive bootable.

Conclusion

Your USB flash drive is now ready to be used as a bootable device. You can use it to install Windows or boot into a live operating system. Simply restart your computer and change the boot order in the BIOS/UEFI settings to boot from the USB drive.


Comments