Friday, July 17, 2009

How to Install Windows 7 or Vista from Bootable Portable USB Flash Memory Key or Hard Disk Drive

From http://www.mydigitallife.info/2009/07/15/how-to-install-windows-7-or-vista-from-bootable-portable-usb-flash-memory-key-or-hard-disk-drive/ we read:

1. Open a command prompt with administrator’s privileges.
2. Run Microsoft DiskPart utility with the following command:

diskpart

3. Identify the number (Disk ###) of the USB device drive with the following command:

list disk

Typically, if you only have one physical hard disk with no other USB drive plugged in, the USB flash or hard drive will be Disk 1.

Tip: If you have partitioned the USB hard disk or flash memory key, use list volume instead to select the volume number, and see the tip of next step to deal with the partition only.

4. Format the USB drive with the following commands one by one. Remember to replace the # with the actual disk number shown in step above.

Important: The following steps will erase ALL data on the USB flash drive or hard disk.

select disk #
clean
create partition primary
select partition 1
active
format fs=NTFS
assign
exit

Note: If there are error while creating primary partition, just add size=4000 (representing 4.0GB, replace with your USB drive actual size) to the end of the “create partition primary” command, making it create partition primary size=xxxx.

Tip: If you have partitioned the USB hard disk or flash pen drive, and do not wish to reformat the whole drive, use select volume # instead to select the partition to make active, where the volume number is determined from tip section of above step. Then, skip the first 4 commands above, and continue from active and format fs=NTFS (can be skipped if the partition already empty).

5. Do not close the command prompt window yet, which may be needed in the next few steps.

Make the USB Flash Drive or External Hard Disk Bootable

There are plenty of ways to make a disk bootable, among them is using bootsect utility that comes with the Windows 7 and Windows Vista installation DVD ISO or disc.

1. Insert the Windows Vista or Windows 7 DVD disc into DVD drive. If you only have a DVD ISO image, mount it in a virtual CD/DVD-ROM drive powered with a virtual drive program instead. Virtual drive works in much the same way as physical CD/DVD drive, but virtually in the operating system only and allowing various CD or DVD disc images to be mounted and accessed.

2. At a elevated command prompt with administrator’s rights, change directory to the OS DVD’s boot directory with the following command:

cd x:\boot

Replace x with the actual drive letter of the CD/DVD drive.

3. Use bootsect command to install boot instructions and set the USB as a bootable NTFS drive:

bootsect /nt60 y:

Replace y with the actual drive letter of the USB flash drive or hard disk.

4. Close the command prompt.

Tip: If you have disk image utility such as WinISO or PowerISO, it’s possible to use the software to write the complete Windows 7 and Windows Vista ISO image into the partition you selected. In this case, this and next steps of making USB drive bootable and copying contents over can be bypassed.

Copy and Transfer Windows Vista or Windows 7 Installation and Setup Files from DVD to USB Drive

Use Windows Explorer to copy all content from the Windows 7 or Windows Vista DVD or ISO t the USB flash drive or external USB hard disk. It’s possible to use other file copy tool, or simply extract the ISO contents to the USB drive. As an example, use the following xcopy command to copy the contents of DVD to USB.

xcopy x:\*.* /s /e /f y:\

Where x: is the drive letter of DVD disc or image, and y: is drive letter path of USB drive.

The USB flash key or USB hard disk based Windows 7 or Windows Vista installer is now ready. In order to start installation, just go reboot the targeted PC, and then enter and access BIOS. Change the boot priority from hard disk or DVD to USB. Then, insert the prepared USB hard disk or USB flash drive into the computer’s USB port, and start the computer to boot up.

Tip: Above trick works for both 32-bit (x86) and 64-bit (x64) Windows Vista and Windows 7. However, for user with 32-bit OS, but want to create a 64-bit Windows 7 or Vista USB based installer, it’s impossible to run 64-bit bootsect.exe from 32-bit environment. In this case, just use a 32bit Windows 7 ISO or Vista disc to use the bootsect command, before copying the content of 64bit Windows 7 or Vista DVD to USB drive.

No comments:

Post a Comment