Aug 20, 2012

Creating a USB Installation Source of Windows 7 or Windows 8 OS

Hi, and welcome to my first ever tutorial blog-post. In this tutorial I will be demonstrating to you on how you can prepare a USB flash drive to use as a Windows 7 or Windows 8 installation source without using any third party software (i.e. using the windows operating system’s command prompt (CMD) only). The operating system used for this tutorial is Windows 7- Ultimate.

Prerequisites: a USB storage device (at least 4GB of free space), a computer running Windows 7 or Windows Vista, A windows 7 or Windows 8 installation DVD.

Note: Your USB drive will be completely wiped out- so make sure you don’t have any important stuff in it before this process. Backup your USB contents. Also you can use a windows 7 or Windows 8 ISO file mounted to a virtual drive instead of a windows 7 or Windows 8 installation DVD to perform the same process. The process requires that you run the command prompt (cmd) as administrator- to achieve this, right click on the command prompt found at: start > all programs > accessories > command prompt; and select yes when the user account control (UAC) appears.

Process:
1. Insert the Windows 7 or Windows 8 installation DVD to the DVD drive and connect the USB storage device to the computer
2. Open an elevated command prompt and type diskpart which is used to manage and maintain partition drives. Then press enter. In the diskpart command line utility that appears, issue the following commands:

a. list disk (this will help you identify which of the disks connected to the computer represents the USB flash drive)
b. select disk disknumber (where disknumber is the the number of the disk that you have identified as the USB flash drive that you want to operate on)
c. clean (Note: This will remove the existing partition formatting and data from the USB flash drive.)
d. create partition primary ( creates a partition of type primary)
e. format fs=fat32 quick (quick-formats the created partition and changes its file system to fat32)
f. active (makes the actual partition an active partition)
g. exit (quits diskpart)

diskpart and bootsect operations
Image depicting the process...
3. Now we need to execute the bootsect command to update the volume with the BOOTMGR boot loader program to make the USB drive bootable. To perform this you need to specify the path to your windows 7 or Windows 8 installation DVD; and navigate to the folder called boot which contains a program called bootsect. We will then run this program with the /nt60 (/nt60 applies the master boot code that is compatible with BOOTMGR to the ) parameter, specifying the USBdriveLetter that our USD is connected to. This will copy the boot manager files to our USB drive: 

<Path> /boot/bootsect.exe /nt60 <USBdriveLetter:> 

4. Now copy all the files located on the Windows 7 or Windows 8 installation DVD to the USB flash drive. You are done. Your USB device is now bootable and you can now use it as an installation source as if you are running a regular installation DVD. Just make sure your BIOS setting are set to “boot from USB device” so that once your computer boots, it can boot from it.

No comments:

Post a Comment