Creating bootable USB using Diskpart

Some of My friends asked me how to create a bootable USB drive to install windows and at that time I was unable to help them but after spending some time on internet I found the solution and got a way to do it, so in this article I will describe how to do it with nothing more than the Windows DVD and a separate Windows workstation.

Before we begin you will need to know a few things. You will need to know the drive letters of your drives such as the DVD drive with the Windows 7 media, the drive letter the USB stick.


WARNING: The drive letter of the USB drive might change during this process.
WARNING: All information on your USB drive will be erased.
WARNING: Your USB drive must be large enough to store the content of your DVD drive. (4 GB or larger) 
WARNING: This article assumes you have significant administrative experience and understand the consequences of each command. Proceed at your own risk.

Task 1: Making the USB drive an Active Primary Partition.

  1. Open a command prompt (with administrative rights if required by your OS).
  2. At the command Prompt type Diskpart and press enter
  3. Type List Disk and press enter
  4. You will see a list of all the disks on your computer.. A number will identify each disk.
    1. If you do not know which disk is you USB drive go through the list by typing Select Disk 1 enter and then type details. repeat until you know you are on the right USB drive. Hint: It is probably the last one.
  5. Type select disk 3* and press enter. The system will report: "Disk 3* is now selected" (*Where disk 3 is the number of the USB drive, change this number to reflect your system).
  6. Type Clean and press enter. The system will report "DiskPart succeeded in cleaning the disk." This will remove the disk from your current drive letter for your USB.
  7. Type create partition primary and press enter. The system will report "DiskPart succeeded in creating the specified partition."
  8. Type select partition 1 and press enter. The system will report "Partition 1 is now the selected partition."
  9. Type active and press enter. The system will report "DiskPart Marked the current partition as active."
  10. Type assign and press enter.  The system will report "DiskPart successfully assigned a drive letter ..."
  11. Type detail disk and press enter. Details will be listed and under the column heading "LTR" you will see the drive letter. I will assume it is U: for the remainder of the explanation.
  12. Type  exit  and press enter. This will leave the DiskPart context.

Task 2: Formating the USB Drive and copying the install files.

  1. If the command prompt is not still open, open the command prompt.
  2. Type format U: /fs:fat32 /q and press enter. (Where U: is the letter of your USB Drive)
  3. A warning will appear indicating all information on the drive will be lost. Type Y and press enter.
  4. You will be prompted to enter a label for the drive. Press enter to continue.
  5. We have now formatted the drive and can proceed to copying the files. Assuming Drive d: for DVD and Drive u: for USB
  6. Type xcopy d:\*.* /s/e/f u:\  . The files will copy and may take a long time depending on the USB drive performance.
Once the files have completed copying, the USB drive is bootable. You may have to change the Boot Order in the BIOS settings of the machine you which to boot from the USB drive.

No comments:

Post a Comment