Archive

Posts Tagged ‘How-To’

Installing Windows 7 from USB stick

2009/10/16 1 comment

So I got hold of the new Windows 7,but the DVD drive in my laptop has lost some functionality over the years, and no longer reads DVDs.  It does however support booting over USB.

Solution?  - install from USB of course!

Requirements:

  • A working Windows(Vista or 7) installation
  • USB drive with enough space (about 2.5 GiB)
  • Windows 7 installation files

What you need to do:

  1. Make the USB drive bootable
  2. Put Windows 7 install files on USB drive
  3. Reboot computer and select USB drive as primary boot device
  4. Install Windows 7 at your leisure

So lets go.

 

STEP 1. Making the USB drive bootable

NOTE: This procedure will require you to remove all current content of the USB drive.
BACKUP your content to a safe place before continuing!

Again. BACKUP the content of your USB drive. All content WILL be erased i later steps.

Now start a command prompt with administration rights, by expanding the start menu and typing cmd in the search box. Now press ctrl + shift + enter to start cmd in admin rights mode.

Using cmd, start DISKPART from the Windows System32 directory;

  • cd c:\windows\system32
  • DISKPART

Now in DISKPART we need to locate the USB drive.  Enter LIST DISK.
Looking at the size column i can locate my disk as number 1. I will use number 1, but you of course will use whatever number your disk has.

Now I select my disk by entering SELECT DISK 1

Disk is selected so I will clean (erase) it by entering CLEAN

Now create a new primary NTFS partition and set it to active by entering;

  • CREATE PARTITION PRIMARY
  • SELECT PARTITION 1
  • FORMAT FS=NTFS (this might take a couple of minutes)

Now assign a drive letter to the drive and mount it by entering ASSIGN. Note that you can also specify a drive letter by entering ASSIGN LETTER=X where x is a letter of your choice. Using assign without specifying a letter will assign the next available letter for you.

Now exit DISKPART by entering EXIT.

Here’s how your procedure should look like:

Step1.1 Using DISKPART

Step1.1 Using DISKPART

 

OK. So the USB Drive is partitioned and formatted, now let’s apply a boot sector to it.  I will do this using the Windows 7 BOOT directory located on the install dvd (which i happen to have mounted as drive E). In the boot directory there’s an application called bootsect.exe which is used to update master boot code on partitions and restore boot sectors. You can read more about bootsect.exe here.

Keep in mind that my Windows 7 dvd i mounted as drive letter E and my USB drive is assigned the drive letter G. You should use whatever drive letters are assigned your drives.

So. Still in cmd, locate and enter your Win7 boot directory, in my case

  • E:
  • cd boot

Now start bootsect.exe using this command to update the USB drive with a BOOTMGR compatible boot code for Vista/Win7

bootsect.exe /nt60 G: (NOTE! G: is the drive letter to my USB drive. Change to whatever letter corresponds to yours)

It should look something like this:

Step1.2 updating boot sector

Step1.2 Updating boot code

 

Now that’s that!  The USB drive is ready to be booted from, nicely done :)

 

STEP 2. Putting Windows 7 install files on USB drive

So all we need to do in this step is to copy all files from the Windows 7 DVD to our USB drive.

If you still have the command prompt open, just go back to the Win7 install root directory (enter CD .. ) and run XCOPY* G:\ /E to copy all files and directories to the USB drive at G:. Of course change G: to your drive’s letter. /E makes xcopy copy files and directories recursively.

Make sure all files where copied by checking the number of files and folders. For me, 874 files and 200 folders.

Step1.3 All files copied

Step1.3 All files copied

 

Well. We are done!

I leave Step 3 and 4 to you. All you really need to do is reboot, set change your boot settings (e.g. in BIOS settings) to boot from USB, and you should be OK.

 

Categories: How-To, Windows Tags: ,
Follow

Get every new post delivered to your Inbox.